diff --git a/.github/codecov.yml b/.github/codecov.yml index 74d4afc256..df639ffb2f 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -10,3 +10,4 @@ comment: after_n_builds: 3 ignore: - packages/client-rust + - packages/client-ts diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 485549b336..6842e50993 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -272,9 +272,10 @@ updates: - dependencies - package-ecosystem: docker-compose directories: + - /packages/client-go - /packages/client-rust + - /packages/client-ts # - /scripts # Maybe - - /scripts/api - /tests/e2e schedule: interval: daily diff --git a/.github/workflows/_reusable-docker-build-single.yml b/.github/workflows/_reusable-docker-build-single.yml index 7606d1ff7b..4b8a13411b 100644 --- a/.github/workflows/_reusable-docker-build-single.yml +++ b/.github/workflows/_reusable-docker-build-single.yml @@ -75,9 +75,6 @@ jobs: - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 with: go-version-file: "go.mod" - - name: Generate API Clients - run: | - make gen-client-ts - name: Build Docker Image uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 id: push diff --git a/.github/workflows/api-ts-publish.yml b/.github/workflows/api-ts-publish.yml deleted file mode 100644 index 8588100319..0000000000 --- a/.github/workflows/api-ts-publish.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -name: API - Publish Typescript client - -on: - push: - branches: [main] - paths: - - "schema.yml" - workflow_dispatch: - -permissions: - # Required for NPM OIDC trusted publisher - id-token: write - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - - id: generate_token - uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v2 - with: - app-id: ${{ secrets.GH_APP_ID }} - private-key: ${{ secrets.GH_APP_PRIV_KEY }} - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 - with: - token: ${{ steps.generate_token.outputs.token }} - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v5 - with: - node-version-file: web/package.json - registry-url: "https://registry.npmjs.org" - - name: Generate API Client - run: make gen-client-ts - - name: Publish package - working-directory: gen-ts-api/ - run: | - npm i - npm publish --tag generated - - name: Upgrade /web - working-directory: web - run: | - export VERSION=`node -e 'console.log(require("../gen-ts-api/package.json").version)'` - npm i @goauthentik/api@$VERSION - - name: Upgrade /web/packages/sfe - working-directory: web/packages/sfe - run: | - export VERSION=`node -e 'console.log(require("../gen-ts-api/package.json").version)'` - npm i @goauthentik/api@$VERSION - - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7 - id: cpr - with: - token: ${{ steps.generate_token.outputs.token }} - branch: update-web-api-client - commit-message: "web: bump API Client version" - title: "web: bump API Client version" - body: "web: bump API Client version" - delete-branch: true - signoff: true - # ID from https://api.github.com/users/authentik-automation[bot] - author: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com> - labels: dependencies - - uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3 - with: - token: ${{ steps.generate_token.outputs.token }} - pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} - merge-method: squash diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 26beb0c8be..10752d7b62 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -62,16 +62,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup authentik env uses: ./.github/actions/setup with: - dependencies: "system,python,runtime,rust-nightly" + dependencies: "system,python,go,node,runtime,rust-nightly" - name: generate schema run: make migrate gen-build - name: generate API clients run: make gen-clients - name: ensure schema is up-to-date - run: git diff --exit-code -- schema.yml blueprints/schema.json packages/client-go packages/client-rust + run: git diff --exit-code -- schema.yml blueprints/schema.json packages/client-go packages/client-rust packages/client-ts test-migrations: runs-on: ubuntu-latest steps: @@ -244,7 +246,6 @@ jobs: working-directory: web run: | npm ci - make -C .. gen-client-ts npm run build npm run build:sfe - name: run e2e @@ -287,7 +288,6 @@ jobs: working-directory: web run: | npm ci - make -C .. gen-client-ts npm run build npm run build:sfe - name: run conformance diff --git a/.github/workflows/ci-web.yml b/.github/workflows/ci-web.yml index 5cee6ea2a6..0784b03a84 100644 --- a/.github/workflows/ci-web.yml +++ b/.github/workflows/ci-web.yml @@ -40,8 +40,6 @@ jobs: - working-directory: ${{ matrix.project }}/ run: | npm ci - - name: Generate API - run: make gen-client-ts - name: Lint working-directory: ${{ matrix.project }}/ run: npm run ${{ matrix.command }} @@ -56,8 +54,6 @@ jobs: cache-dependency-path: web/package-lock.json - working-directory: web/ run: npm ci - - name: Generate API - run: make gen-client-ts - name: build working-directory: web/ run: npm run build @@ -84,8 +80,6 @@ jobs: cache-dependency-path: web/package-lock.json - working-directory: web/ run: npm ci - - name: Generate API - run: make gen-client-ts - name: test working-directory: web/ run: npm run test || exit 0 diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index f050b5ceaa..a02d356f0e 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -103,9 +103,6 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_CORP_USERNAME }} with: image-name: ghcr.io/goauthentik/${{ matrix.type }},authentik/${{ matrix.type }} - - name: Generate API Clients - run: | - make gen-client-ts - name: Docker Login Registry uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 with: @@ -163,9 +160,6 @@ jobs: working-directory: web/ run: | npm ci - - name: Generate API Clients - run: | - make gen-client-ts - name: Build web working-directory: web/ run: | diff --git a/.github/workflows/translation-extract-compile.yml b/.github/workflows/translation-extract-compile.yml index b87f13d136..de90ea9300 100644 --- a/.github/workflows/translation-extract-compile.yml +++ b/.github/workflows/translation-extract-compile.yml @@ -33,8 +33,6 @@ jobs: if: ${{ github.event_name == 'pull_request' }} - name: Setup authentik env uses: ./.github/actions/setup - - name: Generate API - run: make gen-client-ts - name: run extract run: | uv run make i18n-extract diff --git a/CODEOWNERS b/CODEOWNERS index df8cd900aa..988708a0d1 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -36,6 +36,7 @@ package.json @goauthentik/frontend package-lock.json @goauthentik/frontend packages/package.json @goauthentik/frontend packages/package-lock.json @goauthentik/frontend +packages/client-ts @goauthentik/frontend packages/docusaurus-config @goauthentik/frontend packages/esbuild-plugin-live-reload @goauthentik/frontend packages/eslint-config @goauthentik/frontend diff --git a/Makefile b/Makefile index f9b1d8955a..e58cdba32b 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,6 @@ else SED_INPLACE = sed -i endif -GEN_API_TS = gen-ts-api GEN_API_PY = gen-py-api BREW_LDFLAGS := @@ -123,7 +122,7 @@ core-i18n-extract: --no-obsolete \ --ignore web \ --ignore internal \ - --ignore ${GEN_API_TS} \ + --ignore packages/client-ts \ --ignore website \ -l en @@ -199,10 +198,6 @@ gen-diff: ## (Release) generate the changelog diff between the current schema a $(SED_INPLACE) 's/}/}/g' diff.md npx prettier --write diff.md -gen-clean-ts: ## Remove generated API client for TypeScript - rm -rf ${PWD}/${GEN_API_TS}/ - rm -rf ${PWD}/web/node_modules/@goauthentik/api/ - gen-clean-py: ## Remove generated API client for Python rm -rf ${PWD}/${GEN_API_PY} @@ -211,24 +206,13 @@ gen-clean: gen-clean-ts gen-clean-py ## Remove generated API clients gen-client-go: ## Build and install the authentik API for Golang make -C "${PWD}/packages/client-go" build -gen-client-rust: +gen-client-rust: ## Build and install the authentik API for Rust make -C "${PWD}/packages/client-rust" build version=${NPM_VERSION} make lint-fix-rust -gen-client-ts: gen-clean-ts ## Build and install the authentik API for Typescript into the authentik UI Application - docker compose -f scripts/api/compose.yml run --rm --user "${UID}:${GID}" gen \ - generate \ - -i /local/schema.yml \ - -g typescript-fetch \ - -o /local/${GEN_API_TS} \ - -c /local/scripts/api/ts-config.yaml \ - --additional-properties=npmVersion=${NPM_VERSION} \ - --git-repo-id authentik \ - --git-user-id goauthentik - - cd ${PWD}/${GEN_API_TS} && npm i - cd ${PWD}/${GEN_API_TS} && npm link - cd ${PWD}/web && npm link @goauthentik/api +gen-client-ts: ## Build and install the authentik API for Typescript into the authentik UI Application + make -C "${PWD}/packages/client-ts" build + npm --prefix web install gen-client-py: gen-clean-py ## Build and install the authentik API for Python mkdir -p ${PWD}/${GEN_API_PY} @@ -324,7 +308,6 @@ docs-api-clean: ## Clean generated API documentation ######################### docker: ## Build a docker image of the current source tree - mkdir -p ${GEN_API_TS} DOCKER_BUILDKIT=1 docker build . -f lifecycle/container/Dockerfile --progress plain --tag ${DOCKER_IMAGE} test-docker: diff --git a/cspell.config.jsonc b/cspell.config.jsonc index 44e87f5508..3f44852cd3 100644 --- a/cspell.config.jsonc +++ b/cspell.config.jsonc @@ -231,8 +231,9 @@ "./blueprints/schema.json", // Generated blueprint schema "custom-elements.json", // TypeScript custom element definitions "./gen-*-api", // Generated API Client - "./packages/client-rust/src", // Generated API Client "./packages/client-go", // Generated API Client + "./packages/client-rust/src", // Generated API Client + "./packages/client-ts/src", // Generated API Client "./schemas/**", // XML Schemas "./authentik/sources/**/schemas", // Source schemas "**vendored**", // Vendored files diff --git a/lifecycle/container/Dockerfile b/lifecycle/container/Dockerfile index fca6268084..3e1ae3f7ef 100644 --- a/lifecycle/container/Dockerfile +++ b/lifecycle/container/Dockerfile @@ -9,6 +9,10 @@ ENV NODE_ENV=production WORKDIR /work/web +# These files need to be copied and cannot be mounted as `npm ci` will build the client's typescript +COPY ./packages /work/packages +COPY ./web/packages /work/web/packages + RUN --mount=type=bind,target=/work/web/package.json,src=./web/package.json \ --mount=type=bind,target=/work/web/package-lock.json,src=./web/package-lock.json \ --mount=type=bind,target=/work/web/packages/sfe/package.json,src=./web/packages/sfe/package.json \ @@ -20,7 +24,6 @@ COPY ./package.json /work COPY ./web /work/web/ # TODO: Update this after moving website to docs COPY ./website /work/website/ -COPY ./gen-ts-api /work/web/node_modules/@goauthentik/api RUN npm run build && \ npm run build:sfe diff --git a/packages/client-ts/.gitignore b/packages/client-ts/.gitignore new file mode 100644 index 0000000000..3cf51d416e --- /dev/null +++ b/packages/client-ts/.gitignore @@ -0,0 +1,5 @@ +wwwroot/*.js +node_modules +typings +dist +*.tsbuildinfo diff --git a/packages/client-ts/.openapi-generator-ignore b/packages/client-ts/.openapi-generator-ignore new file mode 100644 index 0000000000..6c7b69a015 --- /dev/null +++ b/packages/client-ts/.openapi-generator-ignore @@ -0,0 +1 @@ +.gitignore diff --git a/packages/client-ts/Makefile b/packages/client-ts/Makefile new file mode 100644 index 0000000000..7e9612b1ed --- /dev/null +++ b/packages/client-ts/Makefile @@ -0,0 +1,21 @@ +.SHELLFLAGS += -x -e +PWD = $(shell pwd) +UID = $(shell id -u) +GID = $(shell id -g) + +build: + rm -rf src + docker compose run --rm --user "${UID}:${GID}" gen \ + generate \ + -i /schema.yml \ + -g typescript-fetch \ + -o local \ + -c /local/config.yaml \ + --additional-properties=npmVersion=0.0.0 \ + --git-repo-id authentik \ + --git-user-id goauthentik + rm -rf \ + .npmignore \ + .openapi-generator \ + docs \ + README.md diff --git a/packages/client-ts/compose.yml b/packages/client-ts/compose.yml new file mode 100644 index 0000000000..0545253be1 --- /dev/null +++ b/packages/client-ts/compose.yml @@ -0,0 +1,9 @@ +--- +services: + gen: + image: docker.io/openapitools/openapi-generator-cli:v7.20.0 + restart: never + network_mode: none + volumes: + - ./:/local + - ../../schema.yml:/schema.yml:ro diff --git a/scripts/api/ts-config.yaml b/packages/client-ts/config.yaml similarity index 57% rename from scripts/api/ts-config.yaml rename to packages/client-ts/config.yaml index 547acb980e..274cd14f69 100644 --- a/scripts/api/ts-config.yaml +++ b/packages/client-ts/config.yaml @@ -1,4 +1,5 @@ -templateDir: /local/scripts/api/ts-templates/ +--- +templateDir: /local/templates/ additionalProperties: typescriptThreePlus: true supportsES6: true @@ -6,7 +7,3 @@ additionalProperties: fileContentDataType: Blob enumUnknownDefaultCase: true useObjectParameters: true -files: - README.mustache: - templateType: SupportingFiles - destinationFilename: README.md diff --git a/packages/client-ts/package.json b/packages/client-ts/package.json new file mode 100644 index 0000000000..720957b5ef --- /dev/null +++ b/packages/client-ts/package.json @@ -0,0 +1,21 @@ +{ + "name": "@goauthentik/api", + "version": "0.0.0", + "description": "OpenAPI client for @goauthentik/api", + "author": "OpenAPI-Generator", + "repository": { + "type": "git", + "url": "https://github.com/goauthentik/authentik.git" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json", + "prepare": "npm run build" + }, + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } +} diff --git a/packages/client-ts/src/apis/AdminApi.ts b/packages/client-ts/src/apis/AdminApi.ts new file mode 100644 index 0000000000..09bc2f9f9b --- /dev/null +++ b/packages/client-ts/src/apis/AdminApi.ts @@ -0,0 +1,840 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + App, + FileList, + GenericError, + PatchedSettingsRequest, + Settings, + SettingsRequest, + SystemInfo, + UsedBy, + ValidationError, + Version, + VersionHistory, +} from '../models/index'; +import { + AppFromJSON, + AppToJSON, + FileListFromJSON, + FileListToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PatchedSettingsRequestFromJSON, + PatchedSettingsRequestToJSON, + SettingsFromJSON, + SettingsToJSON, + SettingsRequestFromJSON, + SettingsRequestToJSON, + SystemInfoFromJSON, + SystemInfoToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, + VersionFromJSON, + VersionToJSON, + VersionHistoryFromJSON, + VersionHistoryToJSON, +} from '../models/index'; + +export interface AdminFileCreateRequest { + file: Blob; + name?: string; + usage?: string; +} + +export interface AdminFileDestroyRequest { + name?: string; + usage?: AdminFileDestroyUsageEnum; +} + +export interface AdminFileListRequest { + manageableOnly?: boolean; + search?: string; + usage?: AdminFileListUsageEnum; +} + +export interface AdminFileUsedByListRequest { + name?: string; +} + +export interface AdminSettingsPartialUpdateRequest { + patchedSettingsRequest?: PatchedSettingsRequest; +} + +export interface AdminSettingsUpdateRequest { + settingsRequest: SettingsRequest; +} + +export interface AdminVersionHistoryListRequest { + build?: string; + ordering?: string; + search?: string; + version?: string; +} + +export interface AdminVersionHistoryRetrieveRequest { + id: number; +} + +/** + * + */ +export class AdminApi extends runtime.BaseAPI { + + /** + * Creates request options for adminAppsList without sending the request + */ + async adminAppsListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/apps/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read-only view list all installed apps + */ + async adminAppsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.adminAppsListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AppFromJSON)); + } + + /** + * Read-only view list all installed apps + */ + async adminAppsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.adminAppsListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminFileCreate without sending the request + */ + async adminFileCreateRequestOpts(requestParameters: AdminFileCreateRequest): Promise { + if (requestParameters['file'] == null) { + throw new runtime.RequiredError( + 'file', + 'Required parameter "file" was null or undefined when calling adminFileCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['file'] != null) { + formParams.append('file', requestParameters['file'] as any); + } + + if (requestParameters['name'] != null) { + formParams.append('name', requestParameters['name'] as any); + } + + if (requestParameters['usage'] != null) { + formParams.append('usage', requestParameters['usage'] as any); + } + + + let urlPath = `/admin/file/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Upload file to storage backend. + */ + async adminFileCreateRaw(requestParameters: AdminFileCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminFileCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Upload file to storage backend. + */ + async adminFileCreate(requestParameters: AdminFileCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.adminFileCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for adminFileDestroy without sending the request + */ + async adminFileDestroyRequestOpts(requestParameters: AdminFileDestroyRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['usage'] != null) { + queryParameters['usage'] = requestParameters['usage']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/file/`; + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Delete file from storage backend. + */ + async adminFileDestroyRaw(requestParameters: AdminFileDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminFileDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete file from storage backend. + */ + async adminFileDestroy(requestParameters: AdminFileDestroyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.adminFileDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for adminFileList without sending the request + */ + async adminFileListRequestOpts(requestParameters: AdminFileListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['manageableOnly'] != null) { + queryParameters['manageable_only'] = requestParameters['manageableOnly']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['usage'] != null) { + queryParameters['usage'] = requestParameters['usage']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/file/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List files from storage backend. + */ + async adminFileListRaw(requestParameters: AdminFileListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.adminFileListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileListFromJSON)); + } + + /** + * List files from storage backend. + */ + async adminFileList(requestParameters: AdminFileListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.adminFileListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminFileUsedByList without sending the request + */ + async adminFileUsedByListRequestOpts(requestParameters: AdminFileUsedByListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/file/used_by/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async adminFileUsedByListRaw(requestParameters: AdminFileUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.adminFileUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + */ + async adminFileUsedByList(requestParameters: AdminFileUsedByListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.adminFileUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminModelsList without sending the request + */ + async adminModelsListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/models/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read-only view list all installed models + */ + async adminModelsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.adminModelsListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AppFromJSON)); + } + + /** + * Read-only view list all installed models + */ + async adminModelsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.adminModelsListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminSettingsPartialUpdate without sending the request + */ + async adminSettingsPartialUpdateRequestOpts(requestParameters: AdminSettingsPartialUpdateRequest): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/settings/`; + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSettingsRequestToJSON(requestParameters['patchedSettingsRequest']), + }; + } + + /** + * Settings view + */ + async adminSettingsPartialUpdateRaw(requestParameters: AdminSettingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminSettingsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SettingsFromJSON(jsonValue)); + } + + /** + * Settings view + */ + async adminSettingsPartialUpdate(requestParameters: AdminSettingsPartialUpdateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminSettingsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminSettingsRetrieve without sending the request + */ + async adminSettingsRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/settings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Settings view + */ + async adminSettingsRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminSettingsRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SettingsFromJSON(jsonValue)); + } + + /** + * Settings view + */ + async adminSettingsRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminSettingsRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminSettingsUpdate without sending the request + */ + async adminSettingsUpdateRequestOpts(requestParameters: AdminSettingsUpdateRequest): Promise { + if (requestParameters['settingsRequest'] == null) { + throw new runtime.RequiredError( + 'settingsRequest', + 'Required parameter "settingsRequest" was null or undefined when calling adminSettingsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/settings/`; + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SettingsRequestToJSON(requestParameters['settingsRequest']), + }; + } + + /** + * Settings view + */ + async adminSettingsUpdateRaw(requestParameters: AdminSettingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminSettingsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SettingsFromJSON(jsonValue)); + } + + /** + * Settings view + */ + async adminSettingsUpdate(requestParameters: AdminSettingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminSettingsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminSystemCreate without sending the request + */ + async adminSystemCreateRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/system/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get system information. + */ + async adminSystemCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminSystemCreateRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue)); + } + + /** + * Get system information. + */ + async adminSystemCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminSystemCreateRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminSystemRetrieve without sending the request + */ + async adminSystemRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/system/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get system information. + */ + async adminSystemRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminSystemRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue)); + } + + /** + * Get system information. + */ + async adminSystemRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminSystemRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminVersionHistoryList without sending the request + */ + async adminVersionHistoryListRequestOpts(requestParameters: AdminVersionHistoryListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['build'] != null) { + queryParameters['build'] = requestParameters['build']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/version/history/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * VersionHistory Viewset + */ + async adminVersionHistoryListRaw(requestParameters: AdminVersionHistoryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.adminVersionHistoryListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(VersionHistoryFromJSON)); + } + + /** + * VersionHistory Viewset + */ + async adminVersionHistoryList(requestParameters: AdminVersionHistoryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.adminVersionHistoryListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminVersionHistoryRetrieve without sending the request + */ + async adminVersionHistoryRetrieveRequestOpts(requestParameters: AdminVersionHistoryRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminVersionHistoryRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/version/history/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * VersionHistory Viewset + */ + async adminVersionHistoryRetrieveRaw(requestParameters: AdminVersionHistoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminVersionHistoryRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VersionHistoryFromJSON(jsonValue)); + } + + /** + * VersionHistory Viewset + */ + async adminVersionHistoryRetrieve(requestParameters: AdminVersionHistoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminVersionHistoryRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for adminVersionRetrieve without sending the request + */ + async adminVersionRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/version/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get running and latest version. + */ + async adminVersionRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.adminVersionRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VersionFromJSON(jsonValue)); + } + + /** + * Get running and latest version. + */ + async adminVersionRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminVersionRetrieveRaw(initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const AdminFileDestroyUsageEnum = { + Media: 'media', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AdminFileDestroyUsageEnum = typeof AdminFileDestroyUsageEnum[keyof typeof AdminFileDestroyUsageEnum]; +/** + * @export + */ +export const AdminFileListUsageEnum = { + Media: 'media', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AdminFileListUsageEnum = typeof AdminFileListUsageEnum[keyof typeof AdminFileListUsageEnum]; diff --git a/packages/client-ts/src/apis/AuthenticatorsApi.ts b/packages/client-ts/src/apis/AuthenticatorsApi.ts new file mode 100644 index 0000000000..aa5abd6a64 --- /dev/null +++ b/packages/client-ts/src/apis/AuthenticatorsApi.ts @@ -0,0 +1,5258 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Device, + DuoDevice, + DuoDeviceRequest, + EmailDevice, + EmailDeviceRequest, + GenericError, + GoogleEndpointDevice, + GoogleEndpointDeviceRequest, + PaginatedDuoDeviceList, + PaginatedEmailDeviceList, + PaginatedGoogleEndpointDeviceList, + PaginatedSMSDeviceList, + PaginatedStaticDeviceList, + PaginatedTOTPDeviceList, + PaginatedWebAuthnDeviceList, + PatchedDuoDeviceRequest, + PatchedEmailDeviceRequest, + PatchedGoogleEndpointDeviceRequest, + PatchedSMSDeviceRequest, + PatchedStaticDeviceRequest, + PatchedTOTPDeviceRequest, + PatchedWebAuthnDeviceRequest, + SMSDevice, + SMSDeviceRequest, + StaticDevice, + StaticDeviceRequest, + TOTPDevice, + TOTPDeviceRequest, + UsedBy, + ValidationError, + WebAuthnDevice, + WebAuthnDeviceRequest, +} from '../models/index'; +import { + DeviceFromJSON, + DeviceToJSON, + DuoDeviceFromJSON, + DuoDeviceToJSON, + DuoDeviceRequestFromJSON, + DuoDeviceRequestToJSON, + EmailDeviceFromJSON, + EmailDeviceToJSON, + EmailDeviceRequestFromJSON, + EmailDeviceRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + GoogleEndpointDeviceFromJSON, + GoogleEndpointDeviceToJSON, + GoogleEndpointDeviceRequestFromJSON, + GoogleEndpointDeviceRequestToJSON, + PaginatedDuoDeviceListFromJSON, + PaginatedDuoDeviceListToJSON, + PaginatedEmailDeviceListFromJSON, + PaginatedEmailDeviceListToJSON, + PaginatedGoogleEndpointDeviceListFromJSON, + PaginatedGoogleEndpointDeviceListToJSON, + PaginatedSMSDeviceListFromJSON, + PaginatedSMSDeviceListToJSON, + PaginatedStaticDeviceListFromJSON, + PaginatedStaticDeviceListToJSON, + PaginatedTOTPDeviceListFromJSON, + PaginatedTOTPDeviceListToJSON, + PaginatedWebAuthnDeviceListFromJSON, + PaginatedWebAuthnDeviceListToJSON, + PatchedDuoDeviceRequestFromJSON, + PatchedDuoDeviceRequestToJSON, + PatchedEmailDeviceRequestFromJSON, + PatchedEmailDeviceRequestToJSON, + PatchedGoogleEndpointDeviceRequestFromJSON, + PatchedGoogleEndpointDeviceRequestToJSON, + PatchedSMSDeviceRequestFromJSON, + PatchedSMSDeviceRequestToJSON, + PatchedStaticDeviceRequestFromJSON, + PatchedStaticDeviceRequestToJSON, + PatchedTOTPDeviceRequestFromJSON, + PatchedTOTPDeviceRequestToJSON, + PatchedWebAuthnDeviceRequestFromJSON, + PatchedWebAuthnDeviceRequestToJSON, + SMSDeviceFromJSON, + SMSDeviceToJSON, + SMSDeviceRequestFromJSON, + SMSDeviceRequestToJSON, + StaticDeviceFromJSON, + StaticDeviceToJSON, + StaticDeviceRequestFromJSON, + StaticDeviceRequestToJSON, + TOTPDeviceFromJSON, + TOTPDeviceToJSON, + TOTPDeviceRequestFromJSON, + TOTPDeviceRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, + WebAuthnDeviceFromJSON, + WebAuthnDeviceToJSON, + WebAuthnDeviceRequestFromJSON, + WebAuthnDeviceRequestToJSON, +} from '../models/index'; + +export interface AuthenticatorsAdminAllListRequest { + user?: number; +} + +export interface AuthenticatorsAdminDuoCreateRequest { + duoDeviceRequest: DuoDeviceRequest; +} + +export interface AuthenticatorsAdminDuoDestroyRequest { + id: number; +} + +export interface AuthenticatorsAdminDuoListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminDuoPartialUpdateRequest { + id: number; + patchedDuoDeviceRequest?: PatchedDuoDeviceRequest; +} + +export interface AuthenticatorsAdminDuoRetrieveRequest { + id: number; +} + +export interface AuthenticatorsAdminDuoUpdateRequest { + id: number; + duoDeviceRequest: DuoDeviceRequest; +} + +export interface AuthenticatorsAdminEmailCreateRequest { + emailDeviceRequest: EmailDeviceRequest; +} + +export interface AuthenticatorsAdminEmailDestroyRequest { + id: number; +} + +export interface AuthenticatorsAdminEmailListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminEmailPartialUpdateRequest { + id: number; + patchedEmailDeviceRequest?: PatchedEmailDeviceRequest; +} + +export interface AuthenticatorsAdminEmailRetrieveRequest { + id: number; +} + +export interface AuthenticatorsAdminEmailUpdateRequest { + id: number; + emailDeviceRequest: EmailDeviceRequest; +} + +export interface AuthenticatorsAdminEndpointCreateRequest { + googleEndpointDeviceRequest: GoogleEndpointDeviceRequest; +} + +export interface AuthenticatorsAdminEndpointDestroyRequest { + uuid: string; +} + +export interface AuthenticatorsAdminEndpointListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminEndpointPartialUpdateRequest { + uuid: string; + patchedGoogleEndpointDeviceRequest?: PatchedGoogleEndpointDeviceRequest; +} + +export interface AuthenticatorsAdminEndpointRetrieveRequest { + uuid: string; +} + +export interface AuthenticatorsAdminEndpointUpdateRequest { + uuid: string; + googleEndpointDeviceRequest: GoogleEndpointDeviceRequest; +} + +export interface AuthenticatorsAdminSmsCreateRequest { + sMSDeviceRequest: SMSDeviceRequest; +} + +export interface AuthenticatorsAdminSmsDestroyRequest { + id: number; +} + +export interface AuthenticatorsAdminSmsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminSmsPartialUpdateRequest { + id: number; + patchedSMSDeviceRequest?: PatchedSMSDeviceRequest; +} + +export interface AuthenticatorsAdminSmsRetrieveRequest { + id: number; +} + +export interface AuthenticatorsAdminSmsUpdateRequest { + id: number; + sMSDeviceRequest: SMSDeviceRequest; +} + +export interface AuthenticatorsAdminStaticCreateRequest { + staticDeviceRequest: StaticDeviceRequest; +} + +export interface AuthenticatorsAdminStaticDestroyRequest { + id: number; +} + +export interface AuthenticatorsAdminStaticListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminStaticPartialUpdateRequest { + id: number; + patchedStaticDeviceRequest?: PatchedStaticDeviceRequest; +} + +export interface AuthenticatorsAdminStaticRetrieveRequest { + id: number; +} + +export interface AuthenticatorsAdminStaticUpdateRequest { + id: number; + staticDeviceRequest: StaticDeviceRequest; +} + +export interface AuthenticatorsAdminTotpCreateRequest { + tOTPDeviceRequest: TOTPDeviceRequest; +} + +export interface AuthenticatorsAdminTotpDestroyRequest { + id: number; +} + +export interface AuthenticatorsAdminTotpListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminTotpPartialUpdateRequest { + id: number; + patchedTOTPDeviceRequest?: PatchedTOTPDeviceRequest; +} + +export interface AuthenticatorsAdminTotpRetrieveRequest { + id: number; +} + +export interface AuthenticatorsAdminTotpUpdateRequest { + id: number; + tOTPDeviceRequest: TOTPDeviceRequest; +} + +export interface AuthenticatorsAdminWebauthnCreateRequest { + webAuthnDeviceRequest: WebAuthnDeviceRequest; +} + +export interface AuthenticatorsAdminWebauthnDestroyRequest { + id: number; +} + +export interface AuthenticatorsAdminWebauthnListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsAdminWebauthnPartialUpdateRequest { + id: number; + patchedWebAuthnDeviceRequest?: PatchedWebAuthnDeviceRequest; +} + +export interface AuthenticatorsAdminWebauthnRetrieveRequest { + id: number; +} + +export interface AuthenticatorsAdminWebauthnUpdateRequest { + id: number; + webAuthnDeviceRequest: WebAuthnDeviceRequest; +} + +export interface AuthenticatorsDuoDestroyRequest { + id: number; +} + +export interface AuthenticatorsDuoListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsDuoPartialUpdateRequest { + id: number; + patchedDuoDeviceRequest?: PatchedDuoDeviceRequest; +} + +export interface AuthenticatorsDuoRetrieveRequest { + id: number; +} + +export interface AuthenticatorsDuoUpdateRequest { + id: number; + duoDeviceRequest: DuoDeviceRequest; +} + +export interface AuthenticatorsDuoUsedByListRequest { + id: number; +} + +export interface AuthenticatorsEmailDestroyRequest { + id: number; +} + +export interface AuthenticatorsEmailListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsEmailPartialUpdateRequest { + id: number; + patchedEmailDeviceRequest?: PatchedEmailDeviceRequest; +} + +export interface AuthenticatorsEmailRetrieveRequest { + id: number; +} + +export interface AuthenticatorsEmailUpdateRequest { + id: number; + emailDeviceRequest: EmailDeviceRequest; +} + +export interface AuthenticatorsEmailUsedByListRequest { + id: number; +} + +export interface AuthenticatorsEndpointListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsEndpointRetrieveRequest { + uuid: string; +} + +export interface AuthenticatorsEndpointUsedByListRequest { + uuid: string; +} + +export interface AuthenticatorsSmsDestroyRequest { + id: number; +} + +export interface AuthenticatorsSmsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsSmsPartialUpdateRequest { + id: number; + patchedSMSDeviceRequest?: PatchedSMSDeviceRequest; +} + +export interface AuthenticatorsSmsRetrieveRequest { + id: number; +} + +export interface AuthenticatorsSmsUpdateRequest { + id: number; + sMSDeviceRequest: SMSDeviceRequest; +} + +export interface AuthenticatorsSmsUsedByListRequest { + id: number; +} + +export interface AuthenticatorsStaticDestroyRequest { + id: number; +} + +export interface AuthenticatorsStaticListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsStaticPartialUpdateRequest { + id: number; + patchedStaticDeviceRequest?: PatchedStaticDeviceRequest; +} + +export interface AuthenticatorsStaticRetrieveRequest { + id: number; +} + +export interface AuthenticatorsStaticUpdateRequest { + id: number; + staticDeviceRequest: StaticDeviceRequest; +} + +export interface AuthenticatorsStaticUsedByListRequest { + id: number; +} + +export interface AuthenticatorsTotpDestroyRequest { + id: number; +} + +export interface AuthenticatorsTotpListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsTotpPartialUpdateRequest { + id: number; + patchedTOTPDeviceRequest?: PatchedTOTPDeviceRequest; +} + +export interface AuthenticatorsTotpRetrieveRequest { + id: number; +} + +export interface AuthenticatorsTotpUpdateRequest { + id: number; + tOTPDeviceRequest: TOTPDeviceRequest; +} + +export interface AuthenticatorsTotpUsedByListRequest { + id: number; +} + +export interface AuthenticatorsWebauthnDestroyRequest { + id: number; +} + +export interface AuthenticatorsWebauthnListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface AuthenticatorsWebauthnPartialUpdateRequest { + id: number; + patchedWebAuthnDeviceRequest?: PatchedWebAuthnDeviceRequest; +} + +export interface AuthenticatorsWebauthnRetrieveRequest { + id: number; +} + +export interface AuthenticatorsWebauthnUpdateRequest { + id: number; + webAuthnDeviceRequest: WebAuthnDeviceRequest; +} + +export interface AuthenticatorsWebauthnUsedByListRequest { + id: number; +} + +/** + * + */ +export class AuthenticatorsApi extends runtime.BaseAPI { + + /** + * Creates request options for authenticatorsAdminAllList without sending the request + */ + async authenticatorsAdminAllListRequestOpts(requestParameters: AuthenticatorsAdminAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all devices for current user + */ + async authenticatorsAdminAllListRaw(requestParameters: AuthenticatorsAdminAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsAdminAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DeviceFromJSON)); + } + + /** + * Get all devices for current user + */ + async authenticatorsAdminAllList(requestParameters: AuthenticatorsAdminAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsAdminAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminDuoCreate without sending the request + */ + async authenticatorsAdminDuoCreateRequestOpts(requestParameters: AuthenticatorsAdminDuoCreateRequest): Promise { + if (requestParameters['duoDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'duoDeviceRequest', + 'Required parameter "duoDeviceRequest" was null or undefined when calling authenticatorsAdminDuoCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/duo/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DuoDeviceRequestToJSON(requestParameters['duoDeviceRequest']), + }; + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoCreateRaw(requestParameters: AuthenticatorsAdminDuoCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminDuoCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoCreate(requestParameters: AuthenticatorsAdminDuoCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminDuoCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminDuoDestroy without sending the request + */ + async authenticatorsAdminDuoDestroyRequestOpts(requestParameters: AuthenticatorsAdminDuoDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoDestroyRaw(requestParameters: AuthenticatorsAdminDuoDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminDuoDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoDestroy(requestParameters: AuthenticatorsAdminDuoDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminDuoDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminDuoList without sending the request + */ + async authenticatorsAdminDuoListRequestOpts(requestParameters: AuthenticatorsAdminDuoListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/duo/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoListRaw(requestParameters: AuthenticatorsAdminDuoListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminDuoListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDuoDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoList(requestParameters: AuthenticatorsAdminDuoListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminDuoListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminDuoPartialUpdate without sending the request + */ + async authenticatorsAdminDuoPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminDuoPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDuoDeviceRequestToJSON(requestParameters['patchedDuoDeviceRequest']), + }; + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoPartialUpdateRaw(requestParameters: AuthenticatorsAdminDuoPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminDuoPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoPartialUpdate(requestParameters: AuthenticatorsAdminDuoPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminDuoPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminDuoRetrieve without sending the request + */ + async authenticatorsAdminDuoRetrieveRequestOpts(requestParameters: AuthenticatorsAdminDuoRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoRetrieveRaw(requestParameters: AuthenticatorsAdminDuoRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminDuoRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoRetrieve(requestParameters: AuthenticatorsAdminDuoRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminDuoRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminDuoUpdate without sending the request + */ + async authenticatorsAdminDuoUpdateRequestOpts(requestParameters: AuthenticatorsAdminDuoUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminDuoUpdate().' + ); + } + + if (requestParameters['duoDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'duoDeviceRequest', + 'Required parameter "duoDeviceRequest" was null or undefined when calling authenticatorsAdminDuoUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DuoDeviceRequestToJSON(requestParameters['duoDeviceRequest']), + }; + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoUpdateRaw(requestParameters: AuthenticatorsAdminDuoUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminDuoUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices (for admins) + */ + async authenticatorsAdminDuoUpdate(requestParameters: AuthenticatorsAdminDuoUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminDuoUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEmailCreate without sending the request + */ + async authenticatorsAdminEmailCreateRequestOpts(requestParameters: AuthenticatorsAdminEmailCreateRequest): Promise { + if (requestParameters['emailDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'emailDeviceRequest', + 'Required parameter "emailDeviceRequest" was null or undefined when calling authenticatorsAdminEmailCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/email/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EmailDeviceRequestToJSON(requestParameters['emailDeviceRequest']), + }; + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailCreateRaw(requestParameters: AuthenticatorsAdminEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEmailCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailCreate(requestParameters: AuthenticatorsAdminEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEmailCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEmailDestroy without sending the request + */ + async authenticatorsAdminEmailDestroyRequestOpts(requestParameters: AuthenticatorsAdminEmailDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailDestroyRaw(requestParameters: AuthenticatorsAdminEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEmailDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailDestroy(requestParameters: AuthenticatorsAdminEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminEmailDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminEmailList without sending the request + */ + async authenticatorsAdminEmailListRequestOpts(requestParameters: AuthenticatorsAdminEmailListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/email/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailListRaw(requestParameters: AuthenticatorsAdminEmailListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEmailListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEmailDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailList(requestParameters: AuthenticatorsAdminEmailListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEmailListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEmailPartialUpdate without sending the request + */ + async authenticatorsAdminEmailPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminEmailPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEmailDeviceRequestToJSON(requestParameters['patchedEmailDeviceRequest']), + }; + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailPartialUpdateRaw(requestParameters: AuthenticatorsAdminEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEmailPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailPartialUpdate(requestParameters: AuthenticatorsAdminEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEmailPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEmailRetrieve without sending the request + */ + async authenticatorsAdminEmailRetrieveRequestOpts(requestParameters: AuthenticatorsAdminEmailRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailRetrieveRaw(requestParameters: AuthenticatorsAdminEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEmailRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailRetrieve(requestParameters: AuthenticatorsAdminEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEmailRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEmailUpdate without sending the request + */ + async authenticatorsAdminEmailUpdateRequestOpts(requestParameters: AuthenticatorsAdminEmailUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminEmailUpdate().' + ); + } + + if (requestParameters['emailDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'emailDeviceRequest', + 'Required parameter "emailDeviceRequest" was null or undefined when calling authenticatorsAdminEmailUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EmailDeviceRequestToJSON(requestParameters['emailDeviceRequest']), + }; + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailUpdateRaw(requestParameters: AuthenticatorsAdminEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEmailUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices (for admins) + */ + async authenticatorsAdminEmailUpdate(requestParameters: AuthenticatorsAdminEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEmailUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEndpointCreate without sending the request + */ + async authenticatorsAdminEndpointCreateRequestOpts(requestParameters: AuthenticatorsAdminEndpointCreateRequest): Promise { + if (requestParameters['googleEndpointDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'googleEndpointDeviceRequest', + 'Required parameter "googleEndpointDeviceRequest" was null or undefined when calling authenticatorsAdminEndpointCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/endpoint/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GoogleEndpointDeviceRequestToJSON(requestParameters['googleEndpointDeviceRequest']), + }; + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointCreateRaw(requestParameters: AuthenticatorsAdminEndpointCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEndpointCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleEndpointDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointCreate(requestParameters: AuthenticatorsAdminEndpointCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEndpointCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEndpointDestroy without sending the request + */ + async authenticatorsAdminEndpointDestroyRequestOpts(requestParameters: AuthenticatorsAdminEndpointDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/endpoint/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointDestroyRaw(requestParameters: AuthenticatorsAdminEndpointDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEndpointDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointDestroy(requestParameters: AuthenticatorsAdminEndpointDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminEndpointDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminEndpointList without sending the request + */ + async authenticatorsAdminEndpointListRequestOpts(requestParameters: AuthenticatorsAdminEndpointListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/endpoint/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointListRaw(requestParameters: AuthenticatorsAdminEndpointListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEndpointListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleEndpointDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointList(requestParameters: AuthenticatorsAdminEndpointListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEndpointListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEndpointPartialUpdate without sending the request + */ + async authenticatorsAdminEndpointPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminEndpointPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/endpoint/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGoogleEndpointDeviceRequestToJSON(requestParameters['patchedGoogleEndpointDeviceRequest']), + }; + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointPartialUpdateRaw(requestParameters: AuthenticatorsAdminEndpointPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEndpointPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleEndpointDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointPartialUpdate(requestParameters: AuthenticatorsAdminEndpointPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEndpointPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEndpointRetrieve without sending the request + */ + async authenticatorsAdminEndpointRetrieveRequestOpts(requestParameters: AuthenticatorsAdminEndpointRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/endpoint/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointRetrieveRaw(requestParameters: AuthenticatorsAdminEndpointRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEndpointRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleEndpointDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointRetrieve(requestParameters: AuthenticatorsAdminEndpointRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEndpointRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminEndpointUpdate without sending the request + */ + async authenticatorsAdminEndpointUpdateRequestOpts(requestParameters: AuthenticatorsAdminEndpointUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling authenticatorsAdminEndpointUpdate().' + ); + } + + if (requestParameters['googleEndpointDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'googleEndpointDeviceRequest', + 'Required parameter "googleEndpointDeviceRequest" was null or undefined when calling authenticatorsAdminEndpointUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/endpoint/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GoogleEndpointDeviceRequestToJSON(requestParameters['googleEndpointDeviceRequest']), + }; + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointUpdateRaw(requestParameters: AuthenticatorsAdminEndpointUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminEndpointUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleEndpointDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices (for admins) + */ + async authenticatorsAdminEndpointUpdate(requestParameters: AuthenticatorsAdminEndpointUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminEndpointUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminSmsCreate without sending the request + */ + async authenticatorsAdminSmsCreateRequestOpts(requestParameters: AuthenticatorsAdminSmsCreateRequest): Promise { + if (requestParameters['sMSDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'sMSDeviceRequest', + 'Required parameter "sMSDeviceRequest" was null or undefined when calling authenticatorsAdminSmsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/sms/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SMSDeviceRequestToJSON(requestParameters['sMSDeviceRequest']), + }; + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsCreateRaw(requestParameters: AuthenticatorsAdminSmsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminSmsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsCreate(requestParameters: AuthenticatorsAdminSmsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminSmsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminSmsDestroy without sending the request + */ + async authenticatorsAdminSmsDestroyRequestOpts(requestParameters: AuthenticatorsAdminSmsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsDestroyRaw(requestParameters: AuthenticatorsAdminSmsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminSmsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsDestroy(requestParameters: AuthenticatorsAdminSmsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminSmsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminSmsList without sending the request + */ + async authenticatorsAdminSmsListRequestOpts(requestParameters: AuthenticatorsAdminSmsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/sms/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsListRaw(requestParameters: AuthenticatorsAdminSmsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminSmsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSMSDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsList(requestParameters: AuthenticatorsAdminSmsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminSmsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminSmsPartialUpdate without sending the request + */ + async authenticatorsAdminSmsPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminSmsPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSMSDeviceRequestToJSON(requestParameters['patchedSMSDeviceRequest']), + }; + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsPartialUpdateRaw(requestParameters: AuthenticatorsAdminSmsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminSmsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsPartialUpdate(requestParameters: AuthenticatorsAdminSmsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminSmsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminSmsRetrieve without sending the request + */ + async authenticatorsAdminSmsRetrieveRequestOpts(requestParameters: AuthenticatorsAdminSmsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsRetrieveRaw(requestParameters: AuthenticatorsAdminSmsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminSmsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsRetrieve(requestParameters: AuthenticatorsAdminSmsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminSmsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminSmsUpdate without sending the request + */ + async authenticatorsAdminSmsUpdateRequestOpts(requestParameters: AuthenticatorsAdminSmsUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminSmsUpdate().' + ); + } + + if (requestParameters['sMSDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'sMSDeviceRequest', + 'Required parameter "sMSDeviceRequest" was null or undefined when calling authenticatorsAdminSmsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SMSDeviceRequestToJSON(requestParameters['sMSDeviceRequest']), + }; + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsUpdateRaw(requestParameters: AuthenticatorsAdminSmsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminSmsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices (for admins) + */ + async authenticatorsAdminSmsUpdate(requestParameters: AuthenticatorsAdminSmsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminSmsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminStaticCreate without sending the request + */ + async authenticatorsAdminStaticCreateRequestOpts(requestParameters: AuthenticatorsAdminStaticCreateRequest): Promise { + if (requestParameters['staticDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'staticDeviceRequest', + 'Required parameter "staticDeviceRequest" was null or undefined when calling authenticatorsAdminStaticCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/static/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: StaticDeviceRequestToJSON(requestParameters['staticDeviceRequest']), + }; + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticCreateRaw(requestParameters: AuthenticatorsAdminStaticCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminStaticCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticCreate(requestParameters: AuthenticatorsAdminStaticCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminStaticCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminStaticDestroy without sending the request + */ + async authenticatorsAdminStaticDestroyRequestOpts(requestParameters: AuthenticatorsAdminStaticDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticDestroyRaw(requestParameters: AuthenticatorsAdminStaticDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminStaticDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticDestroy(requestParameters: AuthenticatorsAdminStaticDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminStaticDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminStaticList without sending the request + */ + async authenticatorsAdminStaticListRequestOpts(requestParameters: AuthenticatorsAdminStaticListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/static/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticListRaw(requestParameters: AuthenticatorsAdminStaticListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminStaticListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStaticDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticList(requestParameters: AuthenticatorsAdminStaticListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminStaticListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminStaticPartialUpdate without sending the request + */ + async authenticatorsAdminStaticPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminStaticPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedStaticDeviceRequestToJSON(requestParameters['patchedStaticDeviceRequest']), + }; + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticPartialUpdateRaw(requestParameters: AuthenticatorsAdminStaticPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminStaticPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticPartialUpdate(requestParameters: AuthenticatorsAdminStaticPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminStaticPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminStaticRetrieve without sending the request + */ + async authenticatorsAdminStaticRetrieveRequestOpts(requestParameters: AuthenticatorsAdminStaticRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticRetrieveRaw(requestParameters: AuthenticatorsAdminStaticRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminStaticRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticRetrieve(requestParameters: AuthenticatorsAdminStaticRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminStaticRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminStaticUpdate without sending the request + */ + async authenticatorsAdminStaticUpdateRequestOpts(requestParameters: AuthenticatorsAdminStaticUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminStaticUpdate().' + ); + } + + if (requestParameters['staticDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'staticDeviceRequest', + 'Required parameter "staticDeviceRequest" was null or undefined when calling authenticatorsAdminStaticUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: StaticDeviceRequestToJSON(requestParameters['staticDeviceRequest']), + }; + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticUpdateRaw(requestParameters: AuthenticatorsAdminStaticUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminStaticUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices (for admins) + */ + async authenticatorsAdminStaticUpdate(requestParameters: AuthenticatorsAdminStaticUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminStaticUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminTotpCreate without sending the request + */ + async authenticatorsAdminTotpCreateRequestOpts(requestParameters: AuthenticatorsAdminTotpCreateRequest): Promise { + if (requestParameters['tOTPDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'tOTPDeviceRequest', + 'Required parameter "tOTPDeviceRequest" was null or undefined when calling authenticatorsAdminTotpCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/totp/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TOTPDeviceRequestToJSON(requestParameters['tOTPDeviceRequest']), + }; + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpCreateRaw(requestParameters: AuthenticatorsAdminTotpCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminTotpCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpCreate(requestParameters: AuthenticatorsAdminTotpCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminTotpCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminTotpDestroy without sending the request + */ + async authenticatorsAdminTotpDestroyRequestOpts(requestParameters: AuthenticatorsAdminTotpDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpDestroyRaw(requestParameters: AuthenticatorsAdminTotpDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminTotpDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpDestroy(requestParameters: AuthenticatorsAdminTotpDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminTotpDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminTotpList without sending the request + */ + async authenticatorsAdminTotpListRequestOpts(requestParameters: AuthenticatorsAdminTotpListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/totp/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpListRaw(requestParameters: AuthenticatorsAdminTotpListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminTotpListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTOTPDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpList(requestParameters: AuthenticatorsAdminTotpListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminTotpListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminTotpPartialUpdate without sending the request + */ + async authenticatorsAdminTotpPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminTotpPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTOTPDeviceRequestToJSON(requestParameters['patchedTOTPDeviceRequest']), + }; + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpPartialUpdateRaw(requestParameters: AuthenticatorsAdminTotpPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminTotpPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpPartialUpdate(requestParameters: AuthenticatorsAdminTotpPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminTotpPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminTotpRetrieve without sending the request + */ + async authenticatorsAdminTotpRetrieveRequestOpts(requestParameters: AuthenticatorsAdminTotpRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpRetrieveRaw(requestParameters: AuthenticatorsAdminTotpRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminTotpRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpRetrieve(requestParameters: AuthenticatorsAdminTotpRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminTotpRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminTotpUpdate without sending the request + */ + async authenticatorsAdminTotpUpdateRequestOpts(requestParameters: AuthenticatorsAdminTotpUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminTotpUpdate().' + ); + } + + if (requestParameters['tOTPDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'tOTPDeviceRequest', + 'Required parameter "tOTPDeviceRequest" was null or undefined when calling authenticatorsAdminTotpUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TOTPDeviceRequestToJSON(requestParameters['tOTPDeviceRequest']), + }; + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpUpdateRaw(requestParameters: AuthenticatorsAdminTotpUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminTotpUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices (for admins) + */ + async authenticatorsAdminTotpUpdate(requestParameters: AuthenticatorsAdminTotpUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminTotpUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminWebauthnCreate without sending the request + */ + async authenticatorsAdminWebauthnCreateRequestOpts(requestParameters: AuthenticatorsAdminWebauthnCreateRequest): Promise { + if (requestParameters['webAuthnDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'webAuthnDeviceRequest', + 'Required parameter "webAuthnDeviceRequest" was null or undefined when calling authenticatorsAdminWebauthnCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/webauthn/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: WebAuthnDeviceRequestToJSON(requestParameters['webAuthnDeviceRequest']), + }; + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnCreateRaw(requestParameters: AuthenticatorsAdminWebauthnCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminWebauthnCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnCreate(requestParameters: AuthenticatorsAdminWebauthnCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminWebauthnCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminWebauthnDestroy without sending the request + */ + async authenticatorsAdminWebauthnDestroyRequestOpts(requestParameters: AuthenticatorsAdminWebauthnDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnDestroyRaw(requestParameters: AuthenticatorsAdminWebauthnDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminWebauthnDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnDestroy(requestParameters: AuthenticatorsAdminWebauthnDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsAdminWebauthnDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsAdminWebauthnList without sending the request + */ + async authenticatorsAdminWebauthnListRequestOpts(requestParameters: AuthenticatorsAdminWebauthnListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/webauthn/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnListRaw(requestParameters: AuthenticatorsAdminWebauthnListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminWebauthnListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedWebAuthnDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnList(requestParameters: AuthenticatorsAdminWebauthnListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminWebauthnListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminWebauthnPartialUpdate without sending the request + */ + async authenticatorsAdminWebauthnPartialUpdateRequestOpts(requestParameters: AuthenticatorsAdminWebauthnPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedWebAuthnDeviceRequestToJSON(requestParameters['patchedWebAuthnDeviceRequest']), + }; + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnPartialUpdateRaw(requestParameters: AuthenticatorsAdminWebauthnPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminWebauthnPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnPartialUpdate(requestParameters: AuthenticatorsAdminWebauthnPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminWebauthnPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminWebauthnRetrieve without sending the request + */ + async authenticatorsAdminWebauthnRetrieveRequestOpts(requestParameters: AuthenticatorsAdminWebauthnRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnRetrieveRaw(requestParameters: AuthenticatorsAdminWebauthnRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminWebauthnRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnRetrieve(requestParameters: AuthenticatorsAdminWebauthnRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminWebauthnRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAdminWebauthnUpdate without sending the request + */ + async authenticatorsAdminWebauthnUpdateRequestOpts(requestParameters: AuthenticatorsAdminWebauthnUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsAdminWebauthnUpdate().' + ); + } + + if (requestParameters['webAuthnDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'webAuthnDeviceRequest', + 'Required parameter "webAuthnDeviceRequest" was null or undefined when calling authenticatorsAdminWebauthnUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/admin/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: WebAuthnDeviceRequestToJSON(requestParameters['webAuthnDeviceRequest']), + }; + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnUpdateRaw(requestParameters: AuthenticatorsAdminWebauthnUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsAdminWebauthnUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices (for admins) + */ + async authenticatorsAdminWebauthnUpdate(requestParameters: AuthenticatorsAdminWebauthnUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsAdminWebauthnUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsAllList without sending the request + */ + async authenticatorsAllListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all devices for current user + */ + async authenticatorsAllListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsAllListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DeviceFromJSON)); + } + + /** + * Get all devices for current user + */ + async authenticatorsAllList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsAllListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsDuoDestroy without sending the request + */ + async authenticatorsDuoDestroyRequestOpts(requestParameters: AuthenticatorsDuoDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsDuoDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoDestroyRaw(requestParameters: AuthenticatorsDuoDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsDuoDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoDestroy(requestParameters: AuthenticatorsDuoDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsDuoDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsDuoList without sending the request + */ + async authenticatorsDuoListRequestOpts(requestParameters: AuthenticatorsDuoListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/duo/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoListRaw(requestParameters: AuthenticatorsDuoListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsDuoListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDuoDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoList(requestParameters: AuthenticatorsDuoListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsDuoListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsDuoPartialUpdate without sending the request + */ + async authenticatorsDuoPartialUpdateRequestOpts(requestParameters: AuthenticatorsDuoPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsDuoPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDuoDeviceRequestToJSON(requestParameters['patchedDuoDeviceRequest']), + }; + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoPartialUpdateRaw(requestParameters: AuthenticatorsDuoPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsDuoPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoPartialUpdate(requestParameters: AuthenticatorsDuoPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsDuoPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsDuoRetrieve without sending the request + */ + async authenticatorsDuoRetrieveRequestOpts(requestParameters: AuthenticatorsDuoRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsDuoRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoRetrieveRaw(requestParameters: AuthenticatorsDuoRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsDuoRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoRetrieve(requestParameters: AuthenticatorsDuoRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsDuoRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsDuoUpdate without sending the request + */ + async authenticatorsDuoUpdateRequestOpts(requestParameters: AuthenticatorsDuoUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsDuoUpdate().' + ); + } + + if (requestParameters['duoDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'duoDeviceRequest', + 'Required parameter "duoDeviceRequest" was null or undefined when calling authenticatorsDuoUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/duo/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DuoDeviceRequestToJSON(requestParameters['duoDeviceRequest']), + }; + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoUpdateRaw(requestParameters: AuthenticatorsDuoUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsDuoUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Duo authenticator devices + */ + async authenticatorsDuoUpdate(requestParameters: AuthenticatorsDuoUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsDuoUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsDuoUsedByList without sending the request + */ + async authenticatorsDuoUsedByListRequestOpts(requestParameters: AuthenticatorsDuoUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsDuoUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/duo/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsDuoUsedByListRaw(requestParameters: AuthenticatorsDuoUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsDuoUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsDuoUsedByList(requestParameters: AuthenticatorsDuoUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsDuoUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEmailDestroy without sending the request + */ + async authenticatorsEmailDestroyRequestOpts(requestParameters: AuthenticatorsEmailDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsEmailDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailDestroyRaw(requestParameters: AuthenticatorsEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEmailDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailDestroy(requestParameters: AuthenticatorsEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsEmailDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsEmailList without sending the request + */ + async authenticatorsEmailListRequestOpts(requestParameters: AuthenticatorsEmailListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/email/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailListRaw(requestParameters: AuthenticatorsEmailListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEmailListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEmailDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailList(requestParameters: AuthenticatorsEmailListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsEmailListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEmailPartialUpdate without sending the request + */ + async authenticatorsEmailPartialUpdateRequestOpts(requestParameters: AuthenticatorsEmailPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsEmailPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEmailDeviceRequestToJSON(requestParameters['patchedEmailDeviceRequest']), + }; + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailPartialUpdateRaw(requestParameters: AuthenticatorsEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEmailPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailPartialUpdate(requestParameters: AuthenticatorsEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsEmailPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEmailRetrieve without sending the request + */ + async authenticatorsEmailRetrieveRequestOpts(requestParameters: AuthenticatorsEmailRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsEmailRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailRetrieveRaw(requestParameters: AuthenticatorsEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEmailRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailRetrieve(requestParameters: AuthenticatorsEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsEmailRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEmailUpdate without sending the request + */ + async authenticatorsEmailUpdateRequestOpts(requestParameters: AuthenticatorsEmailUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsEmailUpdate().' + ); + } + + if (requestParameters['emailDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'emailDeviceRequest', + 'Required parameter "emailDeviceRequest" was null or undefined when calling authenticatorsEmailUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/email/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EmailDeviceRequestToJSON(requestParameters['emailDeviceRequest']), + }; + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailUpdateRaw(requestParameters: AuthenticatorsEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEmailUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for email authenticator devices + */ + async authenticatorsEmailUpdate(requestParameters: AuthenticatorsEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsEmailUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEmailUsedByList without sending the request + */ + async authenticatorsEmailUsedByListRequestOpts(requestParameters: AuthenticatorsEmailUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsEmailUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/email/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsEmailUsedByListRaw(requestParameters: AuthenticatorsEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsEmailUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsEmailUsedByList(requestParameters: AuthenticatorsEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsEmailUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEndpointList without sending the request + */ + async authenticatorsEndpointListRequestOpts(requestParameters: AuthenticatorsEndpointListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/endpoint/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Endpoint authenticator devices + */ + async authenticatorsEndpointListRaw(requestParameters: AuthenticatorsEndpointListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEndpointListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleEndpointDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices + */ + async authenticatorsEndpointList(requestParameters: AuthenticatorsEndpointListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsEndpointListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEndpointRetrieve without sending the request + */ + async authenticatorsEndpointRetrieveRequestOpts(requestParameters: AuthenticatorsEndpointRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling authenticatorsEndpointRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/endpoint/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for Endpoint authenticator devices + */ + async authenticatorsEndpointRetrieveRaw(requestParameters: AuthenticatorsEndpointRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsEndpointRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleEndpointDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for Endpoint authenticator devices + */ + async authenticatorsEndpointRetrieve(requestParameters: AuthenticatorsEndpointRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsEndpointRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsEndpointUsedByList without sending the request + */ + async authenticatorsEndpointUsedByListRequestOpts(requestParameters: AuthenticatorsEndpointUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling authenticatorsEndpointUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/endpoint/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsEndpointUsedByListRaw(requestParameters: AuthenticatorsEndpointUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsEndpointUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsEndpointUsedByList(requestParameters: AuthenticatorsEndpointUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsEndpointUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsSmsDestroy without sending the request + */ + async authenticatorsSmsDestroyRequestOpts(requestParameters: AuthenticatorsSmsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsSmsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsDestroyRaw(requestParameters: AuthenticatorsSmsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsSmsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsDestroy(requestParameters: AuthenticatorsSmsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsSmsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsSmsList without sending the request + */ + async authenticatorsSmsListRequestOpts(requestParameters: AuthenticatorsSmsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/sms/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsListRaw(requestParameters: AuthenticatorsSmsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsSmsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSMSDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsList(requestParameters: AuthenticatorsSmsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsSmsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsSmsPartialUpdate without sending the request + */ + async authenticatorsSmsPartialUpdateRequestOpts(requestParameters: AuthenticatorsSmsPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsSmsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSMSDeviceRequestToJSON(requestParameters['patchedSMSDeviceRequest']), + }; + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsPartialUpdateRaw(requestParameters: AuthenticatorsSmsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsSmsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsPartialUpdate(requestParameters: AuthenticatorsSmsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsSmsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsSmsRetrieve without sending the request + */ + async authenticatorsSmsRetrieveRequestOpts(requestParameters: AuthenticatorsSmsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsSmsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsRetrieveRaw(requestParameters: AuthenticatorsSmsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsSmsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsRetrieve(requestParameters: AuthenticatorsSmsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsSmsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsSmsUpdate without sending the request + */ + async authenticatorsSmsUpdateRequestOpts(requestParameters: AuthenticatorsSmsUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsSmsUpdate().' + ); + } + + if (requestParameters['sMSDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'sMSDeviceRequest', + 'Required parameter "sMSDeviceRequest" was null or undefined when calling authenticatorsSmsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/sms/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SMSDeviceRequestToJSON(requestParameters['sMSDeviceRequest']), + }; + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsUpdateRaw(requestParameters: AuthenticatorsSmsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsSmsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SMSDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for sms authenticator devices + */ + async authenticatorsSmsUpdate(requestParameters: AuthenticatorsSmsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsSmsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsSmsUsedByList without sending the request + */ + async authenticatorsSmsUsedByListRequestOpts(requestParameters: AuthenticatorsSmsUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsSmsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/sms/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsSmsUsedByListRaw(requestParameters: AuthenticatorsSmsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsSmsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsSmsUsedByList(requestParameters: AuthenticatorsSmsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsSmsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsStaticDestroy without sending the request + */ + async authenticatorsStaticDestroyRequestOpts(requestParameters: AuthenticatorsStaticDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsStaticDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticDestroyRaw(requestParameters: AuthenticatorsStaticDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsStaticDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticDestroy(requestParameters: AuthenticatorsStaticDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsStaticDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsStaticList without sending the request + */ + async authenticatorsStaticListRequestOpts(requestParameters: AuthenticatorsStaticListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/static/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticListRaw(requestParameters: AuthenticatorsStaticListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsStaticListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStaticDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticList(requestParameters: AuthenticatorsStaticListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsStaticListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsStaticPartialUpdate without sending the request + */ + async authenticatorsStaticPartialUpdateRequestOpts(requestParameters: AuthenticatorsStaticPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsStaticPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedStaticDeviceRequestToJSON(requestParameters['patchedStaticDeviceRequest']), + }; + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticPartialUpdateRaw(requestParameters: AuthenticatorsStaticPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsStaticPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticPartialUpdate(requestParameters: AuthenticatorsStaticPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsStaticPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsStaticRetrieve without sending the request + */ + async authenticatorsStaticRetrieveRequestOpts(requestParameters: AuthenticatorsStaticRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsStaticRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticRetrieveRaw(requestParameters: AuthenticatorsStaticRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsStaticRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticRetrieve(requestParameters: AuthenticatorsStaticRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsStaticRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsStaticUpdate without sending the request + */ + async authenticatorsStaticUpdateRequestOpts(requestParameters: AuthenticatorsStaticUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsStaticUpdate().' + ); + } + + if (requestParameters['staticDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'staticDeviceRequest', + 'Required parameter "staticDeviceRequest" was null or undefined when calling authenticatorsStaticUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/static/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: StaticDeviceRequestToJSON(requestParameters['staticDeviceRequest']), + }; + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticUpdateRaw(requestParameters: AuthenticatorsStaticUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsStaticUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StaticDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for static authenticator devices + */ + async authenticatorsStaticUpdate(requestParameters: AuthenticatorsStaticUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsStaticUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsStaticUsedByList without sending the request + */ + async authenticatorsStaticUsedByListRequestOpts(requestParameters: AuthenticatorsStaticUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsStaticUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/static/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsStaticUsedByListRaw(requestParameters: AuthenticatorsStaticUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsStaticUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsStaticUsedByList(requestParameters: AuthenticatorsStaticUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsStaticUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsTotpDestroy without sending the request + */ + async authenticatorsTotpDestroyRequestOpts(requestParameters: AuthenticatorsTotpDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsTotpDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpDestroyRaw(requestParameters: AuthenticatorsTotpDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsTotpDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpDestroy(requestParameters: AuthenticatorsTotpDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsTotpDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsTotpList without sending the request + */ + async authenticatorsTotpListRequestOpts(requestParameters: AuthenticatorsTotpListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/totp/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpListRaw(requestParameters: AuthenticatorsTotpListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsTotpListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTOTPDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpList(requestParameters: AuthenticatorsTotpListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsTotpListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsTotpPartialUpdate without sending the request + */ + async authenticatorsTotpPartialUpdateRequestOpts(requestParameters: AuthenticatorsTotpPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsTotpPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTOTPDeviceRequestToJSON(requestParameters['patchedTOTPDeviceRequest']), + }; + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpPartialUpdateRaw(requestParameters: AuthenticatorsTotpPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsTotpPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpPartialUpdate(requestParameters: AuthenticatorsTotpPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsTotpPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsTotpRetrieve without sending the request + */ + async authenticatorsTotpRetrieveRequestOpts(requestParameters: AuthenticatorsTotpRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsTotpRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpRetrieveRaw(requestParameters: AuthenticatorsTotpRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsTotpRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpRetrieve(requestParameters: AuthenticatorsTotpRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsTotpRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsTotpUpdate without sending the request + */ + async authenticatorsTotpUpdateRequestOpts(requestParameters: AuthenticatorsTotpUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsTotpUpdate().' + ); + } + + if (requestParameters['tOTPDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'tOTPDeviceRequest', + 'Required parameter "tOTPDeviceRequest" was null or undefined when calling authenticatorsTotpUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/totp/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TOTPDeviceRequestToJSON(requestParameters['tOTPDeviceRequest']), + }; + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpUpdateRaw(requestParameters: AuthenticatorsTotpUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsTotpUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TOTPDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for totp authenticator devices + */ + async authenticatorsTotpUpdate(requestParameters: AuthenticatorsTotpUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsTotpUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsTotpUsedByList without sending the request + */ + async authenticatorsTotpUsedByListRequestOpts(requestParameters: AuthenticatorsTotpUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsTotpUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/totp/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsTotpUsedByListRaw(requestParameters: AuthenticatorsTotpUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsTotpUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsTotpUsedByList(requestParameters: AuthenticatorsTotpUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsTotpUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsWebauthnDestroy without sending the request + */ + async authenticatorsWebauthnDestroyRequestOpts(requestParameters: AuthenticatorsWebauthnDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsWebauthnDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnDestroyRaw(requestParameters: AuthenticatorsWebauthnDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsWebauthnDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnDestroy(requestParameters: AuthenticatorsWebauthnDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authenticatorsWebauthnDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for authenticatorsWebauthnList without sending the request + */ + async authenticatorsWebauthnListRequestOpts(requestParameters: AuthenticatorsWebauthnListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/webauthn/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnListRaw(requestParameters: AuthenticatorsWebauthnListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsWebauthnListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedWebAuthnDeviceListFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnList(requestParameters: AuthenticatorsWebauthnListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsWebauthnListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsWebauthnPartialUpdate without sending the request + */ + async authenticatorsWebauthnPartialUpdateRequestOpts(requestParameters: AuthenticatorsWebauthnPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsWebauthnPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedWebAuthnDeviceRequestToJSON(requestParameters['patchedWebAuthnDeviceRequest']), + }; + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnPartialUpdateRaw(requestParameters: AuthenticatorsWebauthnPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsWebauthnPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnPartialUpdate(requestParameters: AuthenticatorsWebauthnPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsWebauthnPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsWebauthnRetrieve without sending the request + */ + async authenticatorsWebauthnRetrieveRequestOpts(requestParameters: AuthenticatorsWebauthnRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsWebauthnRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnRetrieveRaw(requestParameters: AuthenticatorsWebauthnRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsWebauthnRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnRetrieve(requestParameters: AuthenticatorsWebauthnRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsWebauthnRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsWebauthnUpdate without sending the request + */ + async authenticatorsWebauthnUpdateRequestOpts(requestParameters: AuthenticatorsWebauthnUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsWebauthnUpdate().' + ); + } + + if (requestParameters['webAuthnDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'webAuthnDeviceRequest', + 'Required parameter "webAuthnDeviceRequest" was null or undefined when calling authenticatorsWebauthnUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/webauthn/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: WebAuthnDeviceRequestToJSON(requestParameters['webAuthnDeviceRequest']), + }; + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnUpdateRaw(requestParameters: AuthenticatorsWebauthnUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.authenticatorsWebauthnUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceFromJSON(jsonValue)); + } + + /** + * Viewset for WebAuthn authenticator devices + */ + async authenticatorsWebauthnUpdate(requestParameters: AuthenticatorsWebauthnUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authenticatorsWebauthnUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for authenticatorsWebauthnUsedByList without sending the request + */ + async authenticatorsWebauthnUsedByListRequestOpts(requestParameters: AuthenticatorsWebauthnUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authenticatorsWebauthnUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/authenticators/webauthn/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsWebauthnUsedByListRaw(requestParameters: AuthenticatorsWebauthnUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.authenticatorsWebauthnUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async authenticatorsWebauthnUsedByList(requestParameters: AuthenticatorsWebauthnUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.authenticatorsWebauthnUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/CoreApi.ts b/packages/client-ts/src/apis/CoreApi.ts new file mode 100644 index 0000000000..3b92a5131a --- /dev/null +++ b/packages/client-ts/src/apis/CoreApi.ts @@ -0,0 +1,4755 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Application, + ApplicationEntitlement, + ApplicationEntitlementRequest, + ApplicationRequest, + AuthenticatedSession, + Brand, + BrandRequest, + BulkDeleteSessionResponse, + CurrentBrand, + DataExport, + GenericError, + Group, + GroupRequest, + ImpersonationRequest, + Link, + PaginatedApplicationEntitlementList, + PaginatedApplicationList, + PaginatedAuthenticatedSessionList, + PaginatedBrandList, + PaginatedGroupList, + PaginatedTokenList, + PaginatedUserConsentList, + PaginatedUserList, + PatchedApplicationEntitlementRequest, + PatchedApplicationRequest, + PatchedBrandRequest, + PatchedGroupRequest, + PatchedTokenRequest, + PatchedUserRequest, + PolicyTestResult, + SessionUser, + Token, + TokenRequest, + TokenSetKeyRequest, + TokenView, + TransactionApplicationRequest, + TransactionApplicationResponse, + UsedBy, + User, + UserAccountRequest, + UserConsent, + UserPasswordSetRequest, + UserPath, + UserRecoveryEmailRequest, + UserRecoveryLinkRequest, + UserRequest, + UserServiceAccountRequest, + UserServiceAccountResponse, + ValidationError, +} from '../models/index'; +import { + ApplicationFromJSON, + ApplicationToJSON, + ApplicationEntitlementFromJSON, + ApplicationEntitlementToJSON, + ApplicationEntitlementRequestFromJSON, + ApplicationEntitlementRequestToJSON, + ApplicationRequestFromJSON, + ApplicationRequestToJSON, + AuthenticatedSessionFromJSON, + AuthenticatedSessionToJSON, + BrandFromJSON, + BrandToJSON, + BrandRequestFromJSON, + BrandRequestToJSON, + BulkDeleteSessionResponseFromJSON, + BulkDeleteSessionResponseToJSON, + CurrentBrandFromJSON, + CurrentBrandToJSON, + DataExportFromJSON, + DataExportToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + GroupFromJSON, + GroupToJSON, + GroupRequestFromJSON, + GroupRequestToJSON, + ImpersonationRequestFromJSON, + ImpersonationRequestToJSON, + LinkFromJSON, + LinkToJSON, + PaginatedApplicationEntitlementListFromJSON, + PaginatedApplicationEntitlementListToJSON, + PaginatedApplicationListFromJSON, + PaginatedApplicationListToJSON, + PaginatedAuthenticatedSessionListFromJSON, + PaginatedAuthenticatedSessionListToJSON, + PaginatedBrandListFromJSON, + PaginatedBrandListToJSON, + PaginatedGroupListFromJSON, + PaginatedGroupListToJSON, + PaginatedTokenListFromJSON, + PaginatedTokenListToJSON, + PaginatedUserConsentListFromJSON, + PaginatedUserConsentListToJSON, + PaginatedUserListFromJSON, + PaginatedUserListToJSON, + PatchedApplicationEntitlementRequestFromJSON, + PatchedApplicationEntitlementRequestToJSON, + PatchedApplicationRequestFromJSON, + PatchedApplicationRequestToJSON, + PatchedBrandRequestFromJSON, + PatchedBrandRequestToJSON, + PatchedGroupRequestFromJSON, + PatchedGroupRequestToJSON, + PatchedTokenRequestFromJSON, + PatchedTokenRequestToJSON, + PatchedUserRequestFromJSON, + PatchedUserRequestToJSON, + PolicyTestResultFromJSON, + PolicyTestResultToJSON, + SessionUserFromJSON, + SessionUserToJSON, + TokenFromJSON, + TokenToJSON, + TokenRequestFromJSON, + TokenRequestToJSON, + TokenSetKeyRequestFromJSON, + TokenSetKeyRequestToJSON, + TokenViewFromJSON, + TokenViewToJSON, + TransactionApplicationRequestFromJSON, + TransactionApplicationRequestToJSON, + TransactionApplicationResponseFromJSON, + TransactionApplicationResponseToJSON, + UsedByFromJSON, + UsedByToJSON, + UserFromJSON, + UserToJSON, + UserAccountRequestFromJSON, + UserAccountRequestToJSON, + UserConsentFromJSON, + UserConsentToJSON, + UserPasswordSetRequestFromJSON, + UserPasswordSetRequestToJSON, + UserPathFromJSON, + UserPathToJSON, + UserRecoveryEmailRequestFromJSON, + UserRecoveryEmailRequestToJSON, + UserRecoveryLinkRequestFromJSON, + UserRecoveryLinkRequestToJSON, + UserRequestFromJSON, + UserRequestToJSON, + UserServiceAccountRequestFromJSON, + UserServiceAccountRequestToJSON, + UserServiceAccountResponseFromJSON, + UserServiceAccountResponseToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface CoreApplicationEntitlementsCreateRequest { + applicationEntitlementRequest: ApplicationEntitlementRequest; +} + +export interface CoreApplicationEntitlementsDestroyRequest { + pbmUuid: string; +} + +export interface CoreApplicationEntitlementsListRequest { + app?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + search?: string; +} + +export interface CoreApplicationEntitlementsPartialUpdateRequest { + pbmUuid: string; + patchedApplicationEntitlementRequest?: PatchedApplicationEntitlementRequest; +} + +export interface CoreApplicationEntitlementsRetrieveRequest { + pbmUuid: string; +} + +export interface CoreApplicationEntitlementsUpdateRequest { + pbmUuid: string; + applicationEntitlementRequest: ApplicationEntitlementRequest; +} + +export interface CoreApplicationEntitlementsUsedByListRequest { + pbmUuid: string; +} + +export interface CoreApplicationsCheckAccessRetrieveRequest { + slug: string; + forUser?: number; +} + +export interface CoreApplicationsCreateRequest { + applicationRequest: ApplicationRequest; +} + +export interface CoreApplicationsDestroyRequest { + slug: string; +} + +export interface CoreApplicationsListRequest { + forUser?: number; + group?: string; + metaDescription?: string; + metaLaunchUrl?: string; + metaPublisher?: string; + name?: string; + onlyWithLaunchUrl?: boolean; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + slug?: string; + superuserFullList?: boolean; +} + +export interface CoreApplicationsPartialUpdateRequest { + slug: string; + patchedApplicationRequest?: PatchedApplicationRequest; +} + +export interface CoreApplicationsRetrieveRequest { + slug: string; +} + +export interface CoreApplicationsUpdateRequest { + slug: string; + applicationRequest: ApplicationRequest; +} + +export interface CoreApplicationsUsedByListRequest { + slug: string; +} + +export interface CoreAuthenticatedSessionsBulkDeleteDestroyRequest { + userPks: Array; +} + +export interface CoreAuthenticatedSessionsDestroyRequest { + uuid: string; +} + +export interface CoreAuthenticatedSessionsListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sessionLastIp?: string; + sessionLastUserAgent?: string; + userUsername?: string; +} + +export interface CoreAuthenticatedSessionsRetrieveRequest { + uuid: string; +} + +export interface CoreAuthenticatedSessionsUsedByListRequest { + uuid: string; +} + +export interface CoreBrandsCreateRequest { + brandRequest: BrandRequest; +} + +export interface CoreBrandsDestroyRequest { + brandUuid: string; +} + +export interface CoreBrandsListRequest { + brandUuid?: string; + brandingDefaultFlowBackground?: string; + brandingFavicon?: string; + brandingLogo?: string; + brandingTitle?: string; + clientCertificates?: Array; + _default?: boolean; + domain?: string; + flowAuthentication?: string; + flowDeviceCode?: string; + flowInvalidation?: string; + flowRecovery?: string; + flowUnenrollment?: string; + flowUserSettings?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + webCertificate?: string; +} + +export interface CoreBrandsPartialUpdateRequest { + brandUuid: string; + patchedBrandRequest?: PatchedBrandRequest; +} + +export interface CoreBrandsRetrieveRequest { + brandUuid: string; +} + +export interface CoreBrandsUpdateRequest { + brandUuid: string; + brandRequest: BrandRequest; +} + +export interface CoreBrandsUsedByListRequest { + brandUuid: string; +} + +export interface CoreGroupsAddUserCreateRequest { + groupUuid: string; + userAccountRequest: UserAccountRequest; +} + +export interface CoreGroupsCreateRequest { + groupRequest: GroupRequest; +} + +export interface CoreGroupsDestroyRequest { + groupUuid: string; +} + +export interface CoreGroupsListRequest { + attributes?: string; + includeChildren?: boolean; + includeInheritedRoles?: boolean; + includeParents?: boolean; + includeUsers?: boolean; + isSuperuser?: boolean; + membersByPk?: Array; + membersByUsername?: Array; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface CoreGroupsPartialUpdateRequest { + groupUuid: string; + patchedGroupRequest?: PatchedGroupRequest; +} + +export interface CoreGroupsRemoveUserCreateRequest { + groupUuid: string; + userAccountRequest: UserAccountRequest; +} + +export interface CoreGroupsRetrieveRequest { + groupUuid: string; + includeChildren?: boolean; + includeInheritedRoles?: boolean; + includeParents?: boolean; + includeUsers?: boolean; +} + +export interface CoreGroupsUpdateRequest { + groupUuid: string; + groupRequest: GroupRequest; +} + +export interface CoreGroupsUsedByListRequest { + groupUuid: string; +} + +export interface CoreTokensCreateRequest { + tokenRequest: TokenRequest; +} + +export interface CoreTokensDestroyRequest { + identifier: string; +} + +export interface CoreTokensListRequest { + description?: string; + expires?: Date; + expiring?: boolean; + identifier?: string; + intent?: CoreTokensListIntentEnum; + managed?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + userUsername?: string; +} + +export interface CoreTokensPartialUpdateRequest { + identifier: string; + patchedTokenRequest?: PatchedTokenRequest; +} + +export interface CoreTokensRetrieveRequest { + identifier: string; +} + +export interface CoreTokensSetKeyCreateRequest { + identifier: string; + tokenSetKeyRequest: TokenSetKeyRequest; +} + +export interface CoreTokensUpdateRequest { + identifier: string; + tokenRequest: TokenRequest; +} + +export interface CoreTokensUsedByListRequest { + identifier: string; +} + +export interface CoreTokensViewKeyRetrieveRequest { + identifier: string; +} + +export interface CoreTransactionalApplicationsUpdateRequest { + transactionApplicationRequest: TransactionApplicationRequest; +} + +export interface CoreUserConsentDestroyRequest { + id: number; +} + +export interface CoreUserConsentListRequest { + application?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + user?: number; +} + +export interface CoreUserConsentRetrieveRequest { + id: number; +} + +export interface CoreUserConsentUsedByListRequest { + id: number; +} + +export interface CoreUsersCreateRequest { + userRequest: UserRequest; +} + +export interface CoreUsersDestroyRequest { + id: number; +} + +export interface CoreUsersExportCreateRequest { + attributes?: string; + dateJoined?: Date; + dateJoinedGt?: Date; + dateJoinedLt?: Date; + email?: string; + groupsByName?: Array; + groupsByPk?: Array; + isActive?: boolean; + isSuperuser?: boolean; + lastLogin?: Date; + lastLoginGt?: Date; + lastLoginIsnull?: boolean; + lastLoginLt?: Date; + lastUpdated?: Date; + lastUpdatedGt?: Date; + lastUpdatedLt?: Date; + name?: string; + ordering?: string; + path?: string; + pathStartswith?: string; + rolesByName?: Array; + rolesByPk?: Array; + search?: string; + type?: Array; + username?: string; + uuid?: string; +} + +export interface CoreUsersImpersonateCreateRequest { + id: number; + impersonationRequest: ImpersonationRequest; +} + +export interface CoreUsersListRequest { + attributes?: string; + dateJoined?: Date; + dateJoinedGt?: Date; + dateJoinedLt?: Date; + email?: string; + groupsByName?: Array; + groupsByPk?: Array; + includeGroups?: boolean; + includeRoles?: boolean; + isActive?: boolean; + isSuperuser?: boolean; + lastLogin?: Date; + lastLoginGt?: Date; + lastLoginIsnull?: boolean; + lastLoginLt?: Date; + lastUpdated?: Date; + lastUpdatedGt?: Date; + lastUpdatedLt?: Date; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + path?: string; + pathStartswith?: string; + rolesByName?: Array; + rolesByPk?: Array; + search?: string; + type?: Array; + username?: string; + uuid?: string; +} + +export interface CoreUsersPartialUpdateRequest { + id: number; + patchedUserRequest?: PatchedUserRequest; +} + +export interface CoreUsersPathsRetrieveRequest { + search?: string; +} + +export interface CoreUsersRecoveryCreateRequest { + id: number; + userRecoveryLinkRequest?: UserRecoveryLinkRequest; +} + +export interface CoreUsersRecoveryEmailCreateRequest { + id: number; + userRecoveryEmailRequest: UserRecoveryEmailRequest; +} + +export interface CoreUsersRetrieveRequest { + id: number; +} + +export interface CoreUsersServiceAccountCreateRequest { + userServiceAccountRequest: UserServiceAccountRequest; +} + +export interface CoreUsersSetPasswordCreateRequest { + id: number; + userPasswordSetRequest: UserPasswordSetRequest; +} + +export interface CoreUsersUpdateRequest { + id: number; + userRequest: UserRequest; +} + +export interface CoreUsersUsedByListRequest { + id: number; +} + +/** + * + */ +export class CoreApi extends runtime.BaseAPI { + + /** + * Creates request options for coreApplicationEntitlementsCreate without sending the request + */ + async coreApplicationEntitlementsCreateRequestOpts(requestParameters: CoreApplicationEntitlementsCreateRequest): Promise { + if (requestParameters['applicationEntitlementRequest'] == null) { + throw new runtime.RequiredError( + 'applicationEntitlementRequest', + 'Required parameter "applicationEntitlementRequest" was null or undefined when calling coreApplicationEntitlementsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApplicationEntitlementRequestToJSON(requestParameters['applicationEntitlementRequest']), + }; + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsCreateRaw(requestParameters: CoreApplicationEntitlementsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationEntitlementsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue)); + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsCreate(requestParameters: CoreApplicationEntitlementsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationEntitlementsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationEntitlementsDestroy without sending the request + */ + async coreApplicationEntitlementsDestroyRequestOpts(requestParameters: CoreApplicationEntitlementsDestroyRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling coreApplicationEntitlementsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsDestroyRaw(requestParameters: CoreApplicationEntitlementsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationEntitlementsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsDestroy(requestParameters: CoreApplicationEntitlementsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreApplicationEntitlementsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreApplicationEntitlementsList without sending the request + */ + async coreApplicationEntitlementsListRequestOpts(requestParameters: CoreApplicationEntitlementsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['app'] != null) { + queryParameters['app'] = requestParameters['app']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsListRaw(requestParameters: CoreApplicationEntitlementsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationEntitlementsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedApplicationEntitlementListFromJSON(jsonValue)); + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsList(requestParameters: CoreApplicationEntitlementsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationEntitlementsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationEntitlementsPartialUpdate without sending the request + */ + async coreApplicationEntitlementsPartialUpdateRequestOpts(requestParameters: CoreApplicationEntitlementsPartialUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling coreApplicationEntitlementsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedApplicationEntitlementRequestToJSON(requestParameters['patchedApplicationEntitlementRequest']), + }; + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsPartialUpdateRaw(requestParameters: CoreApplicationEntitlementsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationEntitlementsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue)); + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsPartialUpdate(requestParameters: CoreApplicationEntitlementsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationEntitlementsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationEntitlementsRetrieve without sending the request + */ + async coreApplicationEntitlementsRetrieveRequestOpts(requestParameters: CoreApplicationEntitlementsRetrieveRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling coreApplicationEntitlementsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsRetrieveRaw(requestParameters: CoreApplicationEntitlementsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationEntitlementsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue)); + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsRetrieve(requestParameters: CoreApplicationEntitlementsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationEntitlementsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationEntitlementsUpdate without sending the request + */ + async coreApplicationEntitlementsUpdateRequestOpts(requestParameters: CoreApplicationEntitlementsUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling coreApplicationEntitlementsUpdate().' + ); + } + + if (requestParameters['applicationEntitlementRequest'] == null) { + throw new runtime.RequiredError( + 'applicationEntitlementRequest', + 'Required parameter "applicationEntitlementRequest" was null or undefined when calling coreApplicationEntitlementsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ApplicationEntitlementRequestToJSON(requestParameters['applicationEntitlementRequest']), + }; + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsUpdateRaw(requestParameters: CoreApplicationEntitlementsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationEntitlementsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue)); + } + + /** + * ApplicationEntitlement Viewset + */ + async coreApplicationEntitlementsUpdate(requestParameters: CoreApplicationEntitlementsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationEntitlementsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationEntitlementsUsedByList without sending the request + */ + async coreApplicationEntitlementsUsedByListRequestOpts(requestParameters: CoreApplicationEntitlementsUsedByListRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling coreApplicationEntitlementsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/application_entitlements/{pbm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreApplicationEntitlementsUsedByListRaw(requestParameters: CoreApplicationEntitlementsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreApplicationEntitlementsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreApplicationEntitlementsUsedByList(requestParameters: CoreApplicationEntitlementsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreApplicationEntitlementsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsCheckAccessRetrieve without sending the request + */ + async coreApplicationsCheckAccessRetrieveRequestOpts(requestParameters: CoreApplicationsCheckAccessRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling coreApplicationsCheckAccessRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['forUser'] != null) { + queryParameters['for_user'] = requestParameters['forUser']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/{slug}/check_access/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Check access to a single application by slug + */ + async coreApplicationsCheckAccessRetrieveRaw(requestParameters: CoreApplicationsCheckAccessRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsCheckAccessRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyTestResultFromJSON(jsonValue)); + } + + /** + * Check access to a single application by slug + */ + async coreApplicationsCheckAccessRetrieve(requestParameters: CoreApplicationsCheckAccessRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationsCheckAccessRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsCreate without sending the request + */ + async coreApplicationsCreateRequestOpts(requestParameters: CoreApplicationsCreateRequest): Promise { + if (requestParameters['applicationRequest'] == null) { + throw new runtime.RequiredError( + 'applicationRequest', + 'Required parameter "applicationRequest" was null or undefined when calling coreApplicationsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApplicationRequestToJSON(requestParameters['applicationRequest']), + }; + } + + /** + * Application Viewset + */ + async coreApplicationsCreateRaw(requestParameters: CoreApplicationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationFromJSON(jsonValue)); + } + + /** + * Application Viewset + */ + async coreApplicationsCreate(requestParameters: CoreApplicationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsDestroy without sending the request + */ + async coreApplicationsDestroyRequestOpts(requestParameters: CoreApplicationsDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling coreApplicationsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Application Viewset + */ + async coreApplicationsDestroyRaw(requestParameters: CoreApplicationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Application Viewset + */ + async coreApplicationsDestroy(requestParameters: CoreApplicationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreApplicationsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreApplicationsList without sending the request + */ + async coreApplicationsListRequestOpts(requestParameters: CoreApplicationsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['forUser'] != null) { + queryParameters['for_user'] = requestParameters['forUser']; + } + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['metaDescription'] != null) { + queryParameters['meta_description'] = requestParameters['metaDescription']; + } + + if (requestParameters['metaLaunchUrl'] != null) { + queryParameters['meta_launch_url'] = requestParameters['metaLaunchUrl']; + } + + if (requestParameters['metaPublisher'] != null) { + queryParameters['meta_publisher'] = requestParameters['metaPublisher']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['onlyWithLaunchUrl'] != null) { + queryParameters['only_with_launch_url'] = requestParameters['onlyWithLaunchUrl']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['superuserFullList'] != null) { + queryParameters['superuser_full_list'] = requestParameters['superuserFullList']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Custom list method that checks Policy based access instead of guardian + */ + async coreApplicationsListRaw(requestParameters: CoreApplicationsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedApplicationListFromJSON(jsonValue)); + } + + /** + * Custom list method that checks Policy based access instead of guardian + */ + async coreApplicationsList(requestParameters: CoreApplicationsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsPartialUpdate without sending the request + */ + async coreApplicationsPartialUpdateRequestOpts(requestParameters: CoreApplicationsPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling coreApplicationsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedApplicationRequestToJSON(requestParameters['patchedApplicationRequest']), + }; + } + + /** + * Application Viewset + */ + async coreApplicationsPartialUpdateRaw(requestParameters: CoreApplicationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationFromJSON(jsonValue)); + } + + /** + * Application Viewset + */ + async coreApplicationsPartialUpdate(requestParameters: CoreApplicationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsRetrieve without sending the request + */ + async coreApplicationsRetrieveRequestOpts(requestParameters: CoreApplicationsRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling coreApplicationsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Application Viewset + */ + async coreApplicationsRetrieveRaw(requestParameters: CoreApplicationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationFromJSON(jsonValue)); + } + + /** + * Application Viewset + */ + async coreApplicationsRetrieve(requestParameters: CoreApplicationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsUpdate without sending the request + */ + async coreApplicationsUpdateRequestOpts(requestParameters: CoreApplicationsUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling coreApplicationsUpdate().' + ); + } + + if (requestParameters['applicationRequest'] == null) { + throw new runtime.RequiredError( + 'applicationRequest', + 'Required parameter "applicationRequest" was null or undefined when calling coreApplicationsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ApplicationRequestToJSON(requestParameters['applicationRequest']), + }; + } + + /** + * Application Viewset + */ + async coreApplicationsUpdateRaw(requestParameters: CoreApplicationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreApplicationsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationFromJSON(jsonValue)); + } + + /** + * Application Viewset + */ + async coreApplicationsUpdate(requestParameters: CoreApplicationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreApplicationsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreApplicationsUsedByList without sending the request + */ + async coreApplicationsUsedByListRequestOpts(requestParameters: CoreApplicationsUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling coreApplicationsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/applications/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreApplicationsUsedByListRaw(requestParameters: CoreApplicationsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreApplicationsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreApplicationsUsedByList(requestParameters: CoreApplicationsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreApplicationsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreAuthenticatedSessionsBulkDeleteDestroy without sending the request + */ + async coreAuthenticatedSessionsBulkDeleteDestroyRequestOpts(requestParameters: CoreAuthenticatedSessionsBulkDeleteDestroyRequest): Promise { + if (requestParameters['userPks'] == null) { + throw new runtime.RequiredError( + 'userPks', + 'Required parameter "userPks" was null or undefined when calling coreAuthenticatedSessionsBulkDeleteDestroy().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['userPks'] != null) { + queryParameters['user_pks'] = requestParameters['userPks']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/authenticated_sessions/bulk_delete/`; + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Bulk revoke all sessions for multiple users + */ + async coreAuthenticatedSessionsBulkDeleteDestroyRaw(requestParameters: CoreAuthenticatedSessionsBulkDeleteDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreAuthenticatedSessionsBulkDeleteDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BulkDeleteSessionResponseFromJSON(jsonValue)); + } + + /** + * Bulk revoke all sessions for multiple users + */ + async coreAuthenticatedSessionsBulkDeleteDestroy(requestParameters: CoreAuthenticatedSessionsBulkDeleteDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreAuthenticatedSessionsBulkDeleteDestroyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreAuthenticatedSessionsDestroy without sending the request + */ + async coreAuthenticatedSessionsDestroyRequestOpts(requestParameters: CoreAuthenticatedSessionsDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling coreAuthenticatedSessionsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/authenticated_sessions/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatedSession Viewset + */ + async coreAuthenticatedSessionsDestroyRaw(requestParameters: CoreAuthenticatedSessionsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreAuthenticatedSessionsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatedSession Viewset + */ + async coreAuthenticatedSessionsDestroy(requestParameters: CoreAuthenticatedSessionsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreAuthenticatedSessionsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreAuthenticatedSessionsList without sending the request + */ + async coreAuthenticatedSessionsListRequestOpts(requestParameters: CoreAuthenticatedSessionsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sessionLastIp'] != null) { + queryParameters['session__last_ip'] = requestParameters['sessionLastIp']; + } + + if (requestParameters['sessionLastUserAgent'] != null) { + queryParameters['session__last_user_agent'] = requestParameters['sessionLastUserAgent']; + } + + if (requestParameters['userUsername'] != null) { + queryParameters['user__username'] = requestParameters['userUsername']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/authenticated_sessions/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatedSession Viewset + */ + async coreAuthenticatedSessionsListRaw(requestParameters: CoreAuthenticatedSessionsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreAuthenticatedSessionsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatedSessionListFromJSON(jsonValue)); + } + + /** + * AuthenticatedSession Viewset + */ + async coreAuthenticatedSessionsList(requestParameters: CoreAuthenticatedSessionsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreAuthenticatedSessionsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreAuthenticatedSessionsRetrieve without sending the request + */ + async coreAuthenticatedSessionsRetrieveRequestOpts(requestParameters: CoreAuthenticatedSessionsRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling coreAuthenticatedSessionsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/authenticated_sessions/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatedSession Viewset + */ + async coreAuthenticatedSessionsRetrieveRaw(requestParameters: CoreAuthenticatedSessionsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreAuthenticatedSessionsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatedSessionFromJSON(jsonValue)); + } + + /** + * AuthenticatedSession Viewset + */ + async coreAuthenticatedSessionsRetrieve(requestParameters: CoreAuthenticatedSessionsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreAuthenticatedSessionsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreAuthenticatedSessionsUsedByList without sending the request + */ + async coreAuthenticatedSessionsUsedByListRequestOpts(requestParameters: CoreAuthenticatedSessionsUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling coreAuthenticatedSessionsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/authenticated_sessions/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreAuthenticatedSessionsUsedByListRaw(requestParameters: CoreAuthenticatedSessionsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreAuthenticatedSessionsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreAuthenticatedSessionsUsedByList(requestParameters: CoreAuthenticatedSessionsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreAuthenticatedSessionsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsCreate without sending the request + */ + async coreBrandsCreateRequestOpts(requestParameters: CoreBrandsCreateRequest): Promise { + if (requestParameters['brandRequest'] == null) { + throw new runtime.RequiredError( + 'brandRequest', + 'Required parameter "brandRequest" was null or undefined when calling coreBrandsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: BrandRequestToJSON(requestParameters['brandRequest']), + }; + } + + /** + * Brand Viewset + */ + async coreBrandsCreateRaw(requestParameters: CoreBrandsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BrandFromJSON(jsonValue)); + } + + /** + * Brand Viewset + */ + async coreBrandsCreate(requestParameters: CoreBrandsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreBrandsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsCurrentRetrieve without sending the request + */ + async coreBrandsCurrentRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/current/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get current brand + */ + async coreBrandsCurrentRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsCurrentRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CurrentBrandFromJSON(jsonValue)); + } + + /** + * Get current brand + */ + async coreBrandsCurrentRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreBrandsCurrentRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsDestroy without sending the request + */ + async coreBrandsDestroyRequestOpts(requestParameters: CoreBrandsDestroyRequest): Promise { + if (requestParameters['brandUuid'] == null) { + throw new runtime.RequiredError( + 'brandUuid', + 'Required parameter "brandUuid" was null or undefined when calling coreBrandsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/{brand_uuid}/`; + urlPath = urlPath.replace(`{${"brand_uuid"}}`, encodeURIComponent(String(requestParameters['brandUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Brand Viewset + */ + async coreBrandsDestroyRaw(requestParameters: CoreBrandsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Brand Viewset + */ + async coreBrandsDestroy(requestParameters: CoreBrandsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreBrandsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreBrandsList without sending the request + */ + async coreBrandsListRequestOpts(requestParameters: CoreBrandsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['brandUuid'] != null) { + queryParameters['brand_uuid'] = requestParameters['brandUuid']; + } + + if (requestParameters['brandingDefaultFlowBackground'] != null) { + queryParameters['branding_default_flow_background'] = requestParameters['brandingDefaultFlowBackground']; + } + + if (requestParameters['brandingFavicon'] != null) { + queryParameters['branding_favicon'] = requestParameters['brandingFavicon']; + } + + if (requestParameters['brandingLogo'] != null) { + queryParameters['branding_logo'] = requestParameters['brandingLogo']; + } + + if (requestParameters['brandingTitle'] != null) { + queryParameters['branding_title'] = requestParameters['brandingTitle']; + } + + if (requestParameters['clientCertificates'] != null) { + queryParameters['client_certificates'] = requestParameters['clientCertificates']; + } + + if (requestParameters['_default'] != null) { + queryParameters['default'] = requestParameters['_default']; + } + + if (requestParameters['domain'] != null) { + queryParameters['domain'] = requestParameters['domain']; + } + + if (requestParameters['flowAuthentication'] != null) { + queryParameters['flow_authentication'] = requestParameters['flowAuthentication']; + } + + if (requestParameters['flowDeviceCode'] != null) { + queryParameters['flow_device_code'] = requestParameters['flowDeviceCode']; + } + + if (requestParameters['flowInvalidation'] != null) { + queryParameters['flow_invalidation'] = requestParameters['flowInvalidation']; + } + + if (requestParameters['flowRecovery'] != null) { + queryParameters['flow_recovery'] = requestParameters['flowRecovery']; + } + + if (requestParameters['flowUnenrollment'] != null) { + queryParameters['flow_unenrollment'] = requestParameters['flowUnenrollment']; + } + + if (requestParameters['flowUserSettings'] != null) { + queryParameters['flow_user_settings'] = requestParameters['flowUserSettings']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['webCertificate'] != null) { + queryParameters['web_certificate'] = requestParameters['webCertificate']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Brand Viewset + */ + async coreBrandsListRaw(requestParameters: CoreBrandsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedBrandListFromJSON(jsonValue)); + } + + /** + * Brand Viewset + */ + async coreBrandsList(requestParameters: CoreBrandsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreBrandsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsPartialUpdate without sending the request + */ + async coreBrandsPartialUpdateRequestOpts(requestParameters: CoreBrandsPartialUpdateRequest): Promise { + if (requestParameters['brandUuid'] == null) { + throw new runtime.RequiredError( + 'brandUuid', + 'Required parameter "brandUuid" was null or undefined when calling coreBrandsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/{brand_uuid}/`; + urlPath = urlPath.replace(`{${"brand_uuid"}}`, encodeURIComponent(String(requestParameters['brandUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedBrandRequestToJSON(requestParameters['patchedBrandRequest']), + }; + } + + /** + * Brand Viewset + */ + async coreBrandsPartialUpdateRaw(requestParameters: CoreBrandsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BrandFromJSON(jsonValue)); + } + + /** + * Brand Viewset + */ + async coreBrandsPartialUpdate(requestParameters: CoreBrandsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreBrandsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsRetrieve without sending the request + */ + async coreBrandsRetrieveRequestOpts(requestParameters: CoreBrandsRetrieveRequest): Promise { + if (requestParameters['brandUuid'] == null) { + throw new runtime.RequiredError( + 'brandUuid', + 'Required parameter "brandUuid" was null or undefined when calling coreBrandsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/{brand_uuid}/`; + urlPath = urlPath.replace(`{${"brand_uuid"}}`, encodeURIComponent(String(requestParameters['brandUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Brand Viewset + */ + async coreBrandsRetrieveRaw(requestParameters: CoreBrandsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BrandFromJSON(jsonValue)); + } + + /** + * Brand Viewset + */ + async coreBrandsRetrieve(requestParameters: CoreBrandsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreBrandsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsUpdate without sending the request + */ + async coreBrandsUpdateRequestOpts(requestParameters: CoreBrandsUpdateRequest): Promise { + if (requestParameters['brandUuid'] == null) { + throw new runtime.RequiredError( + 'brandUuid', + 'Required parameter "brandUuid" was null or undefined when calling coreBrandsUpdate().' + ); + } + + if (requestParameters['brandRequest'] == null) { + throw new runtime.RequiredError( + 'brandRequest', + 'Required parameter "brandRequest" was null or undefined when calling coreBrandsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/{brand_uuid}/`; + urlPath = urlPath.replace(`{${"brand_uuid"}}`, encodeURIComponent(String(requestParameters['brandUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: BrandRequestToJSON(requestParameters['brandRequest']), + }; + } + + /** + * Brand Viewset + */ + async coreBrandsUpdateRaw(requestParameters: CoreBrandsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreBrandsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BrandFromJSON(jsonValue)); + } + + /** + * Brand Viewset + */ + async coreBrandsUpdate(requestParameters: CoreBrandsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreBrandsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreBrandsUsedByList without sending the request + */ + async coreBrandsUsedByListRequestOpts(requestParameters: CoreBrandsUsedByListRequest): Promise { + if (requestParameters['brandUuid'] == null) { + throw new runtime.RequiredError( + 'brandUuid', + 'Required parameter "brandUuid" was null or undefined when calling coreBrandsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/brands/{brand_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"brand_uuid"}}`, encodeURIComponent(String(requestParameters['brandUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreBrandsUsedByListRaw(requestParameters: CoreBrandsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreBrandsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreBrandsUsedByList(requestParameters: CoreBrandsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreBrandsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreGroupsAddUserCreate without sending the request + */ + async coreGroupsAddUserCreateRequestOpts(requestParameters: CoreGroupsAddUserCreateRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsAddUserCreate().' + ); + } + + if (requestParameters['userAccountRequest'] == null) { + throw new runtime.RequiredError( + 'userAccountRequest', + 'Required parameter "userAccountRequest" was null or undefined when calling coreGroupsAddUserCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/add_user/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserAccountRequestToJSON(requestParameters['userAccountRequest']), + }; + } + + /** + * Add user to group + */ + async coreGroupsAddUserCreateRaw(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsAddUserCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Add user to group + */ + async coreGroupsAddUserCreate(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreGroupsAddUserCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreGroupsCreate without sending the request + */ + async coreGroupsCreateRequestOpts(requestParameters: CoreGroupsCreateRequest): Promise { + if (requestParameters['groupRequest'] == null) { + throw new runtime.RequiredError( + 'groupRequest', + 'Required parameter "groupRequest" was null or undefined when calling coreGroupsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupRequestToJSON(requestParameters['groupRequest']), + }; + } + + /** + * Group Viewset + */ + async coreGroupsCreateRaw(requestParameters: CoreGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Group Viewset + */ + async coreGroupsCreate(requestParameters: CoreGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreGroupsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreGroupsDestroy without sending the request + */ + async coreGroupsDestroyRequestOpts(requestParameters: CoreGroupsDestroyRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group Viewset + */ + async coreGroupsDestroyRaw(requestParameters: CoreGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group Viewset + */ + async coreGroupsDestroy(requestParameters: CoreGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreGroupsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreGroupsList without sending the request + */ + async coreGroupsListRequestOpts(requestParameters: CoreGroupsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['attributes'] != null) { + queryParameters['attributes'] = requestParameters['attributes']; + } + + if (requestParameters['includeChildren'] != null) { + queryParameters['include_children'] = requestParameters['includeChildren']; + } + + if (requestParameters['includeInheritedRoles'] != null) { + queryParameters['include_inherited_roles'] = requestParameters['includeInheritedRoles']; + } + + if (requestParameters['includeParents'] != null) { + queryParameters['include_parents'] = requestParameters['includeParents']; + } + + if (requestParameters['includeUsers'] != null) { + queryParameters['include_users'] = requestParameters['includeUsers']; + } + + if (requestParameters['isSuperuser'] != null) { + queryParameters['is_superuser'] = requestParameters['isSuperuser']; + } + + if (requestParameters['membersByPk'] != null) { + queryParameters['members_by_pk'] = requestParameters['membersByPk']; + } + + if (requestParameters['membersByUsername'] != null) { + queryParameters['members_by_username'] = requestParameters['membersByUsername']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group Viewset + */ + async coreGroupsListRaw(requestParameters: CoreGroupsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupListFromJSON(jsonValue)); + } + + /** + * Group Viewset + */ + async coreGroupsList(requestParameters: CoreGroupsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreGroupsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreGroupsPartialUpdate without sending the request + */ + async coreGroupsPartialUpdateRequestOpts(requestParameters: CoreGroupsPartialUpdateRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupRequestToJSON(requestParameters['patchedGroupRequest']), + }; + } + + /** + * Group Viewset + */ + async coreGroupsPartialUpdateRaw(requestParameters: CoreGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Group Viewset + */ + async coreGroupsPartialUpdate(requestParameters: CoreGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreGroupsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreGroupsRemoveUserCreate without sending the request + */ + async coreGroupsRemoveUserCreateRequestOpts(requestParameters: CoreGroupsRemoveUserCreateRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsRemoveUserCreate().' + ); + } + + if (requestParameters['userAccountRequest'] == null) { + throw new runtime.RequiredError( + 'userAccountRequest', + 'Required parameter "userAccountRequest" was null or undefined when calling coreGroupsRemoveUserCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/remove_user/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserAccountRequestToJSON(requestParameters['userAccountRequest']), + }; + } + + /** + * Remove user from group + */ + async coreGroupsRemoveUserCreateRaw(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsRemoveUserCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Remove user from group + */ + async coreGroupsRemoveUserCreate(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreGroupsRemoveUserCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreGroupsRetrieve without sending the request + */ + async coreGroupsRetrieveRequestOpts(requestParameters: CoreGroupsRetrieveRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['includeChildren'] != null) { + queryParameters['include_children'] = requestParameters['includeChildren']; + } + + if (requestParameters['includeInheritedRoles'] != null) { + queryParameters['include_inherited_roles'] = requestParameters['includeInheritedRoles']; + } + + if (requestParameters['includeParents'] != null) { + queryParameters['include_parents'] = requestParameters['includeParents']; + } + + if (requestParameters['includeUsers'] != null) { + queryParameters['include_users'] = requestParameters['includeUsers']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group Viewset + */ + async coreGroupsRetrieveRaw(requestParameters: CoreGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Group Viewset + */ + async coreGroupsRetrieve(requestParameters: CoreGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreGroupsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreGroupsUpdate without sending the request + */ + async coreGroupsUpdateRequestOpts(requestParameters: CoreGroupsUpdateRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsUpdate().' + ); + } + + if (requestParameters['groupRequest'] == null) { + throw new runtime.RequiredError( + 'groupRequest', + 'Required parameter "groupRequest" was null or undefined when calling coreGroupsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupRequestToJSON(requestParameters['groupRequest']), + }; + } + + /** + * Group Viewset + */ + async coreGroupsUpdateRaw(requestParameters: CoreGroupsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreGroupsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Group Viewset + */ + async coreGroupsUpdate(requestParameters: CoreGroupsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreGroupsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreGroupsUsedByList without sending the request + */ + async coreGroupsUsedByListRequestOpts(requestParameters: CoreGroupsUsedByListRequest): Promise { + if (requestParameters['groupUuid'] == null) { + throw new runtime.RequiredError( + 'groupUuid', + 'Required parameter "groupUuid" was null or undefined when calling coreGroupsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/groups/{group_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters['groupUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreGroupsUsedByListRaw(requestParameters: CoreGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreGroupsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreGroupsUsedByList(requestParameters: CoreGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreGroupsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensCreate without sending the request + */ + async coreTokensCreateRequestOpts(requestParameters: CoreTokensCreateRequest): Promise { + if (requestParameters['tokenRequest'] == null) { + throw new runtime.RequiredError( + 'tokenRequest', + 'Required parameter "tokenRequest" was null or undefined when calling coreTokensCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TokenRequestToJSON(requestParameters['tokenRequest']), + }; + } + + /** + * Token Viewset + */ + async coreTokensCreateRaw(requestParameters: CoreTokensCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Token Viewset + */ + async coreTokensCreate(requestParameters: CoreTokensCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTokensCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensDestroy without sending the request + */ + async coreTokensDestroyRequestOpts(requestParameters: CoreTokensDestroyRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Token Viewset + */ + async coreTokensDestroyRaw(requestParameters: CoreTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Token Viewset + */ + async coreTokensDestroy(requestParameters: CoreTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreTokensDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreTokensList without sending the request + */ + async coreTokensListRequestOpts(requestParameters: CoreTokensListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['description'] != null) { + queryParameters['description'] = requestParameters['description']; + } + + if (requestParameters['expires'] != null) { + queryParameters['expires'] = (requestParameters['expires'] as any).toISOString(); + } + + if (requestParameters['expiring'] != null) { + queryParameters['expiring'] = requestParameters['expiring']; + } + + if (requestParameters['identifier'] != null) { + queryParameters['identifier'] = requestParameters['identifier']; + } + + if (requestParameters['intent'] != null) { + queryParameters['intent'] = requestParameters['intent']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['userUsername'] != null) { + queryParameters['user__username'] = requestParameters['userUsername']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Token Viewset + */ + async coreTokensListRaw(requestParameters: CoreTokensListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTokenListFromJSON(jsonValue)); + } + + /** + * Token Viewset + */ + async coreTokensList(requestParameters: CoreTokensListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTokensListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensPartialUpdate without sending the request + */ + async coreTokensPartialUpdateRequestOpts(requestParameters: CoreTokensPartialUpdateRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTokenRequestToJSON(requestParameters['patchedTokenRequest']), + }; + } + + /** + * Token Viewset + */ + async coreTokensPartialUpdateRaw(requestParameters: CoreTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Token Viewset + */ + async coreTokensPartialUpdate(requestParameters: CoreTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTokensPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensRetrieve without sending the request + */ + async coreTokensRetrieveRequestOpts(requestParameters: CoreTokensRetrieveRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Token Viewset + */ + async coreTokensRetrieveRaw(requestParameters: CoreTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Token Viewset + */ + async coreTokensRetrieve(requestParameters: CoreTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTokensRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensSetKeyCreate without sending the request + */ + async coreTokensSetKeyCreateRequestOpts(requestParameters: CoreTokensSetKeyCreateRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensSetKeyCreate().' + ); + } + + if (requestParameters['tokenSetKeyRequest'] == null) { + throw new runtime.RequiredError( + 'tokenSetKeyRequest', + 'Required parameter "tokenSetKeyRequest" was null or undefined when calling coreTokensSetKeyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/set_key/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TokenSetKeyRequestToJSON(requestParameters['tokenSetKeyRequest']), + }; + } + + /** + * Set token key. Action is logged as event. `authentik_core.set_token_key` permission is required. + */ + async coreTokensSetKeyCreateRaw(requestParameters: CoreTokensSetKeyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensSetKeyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Set token key. Action is logged as event. `authentik_core.set_token_key` permission is required. + */ + async coreTokensSetKeyCreate(requestParameters: CoreTokensSetKeyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreTokensSetKeyCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreTokensUpdate without sending the request + */ + async coreTokensUpdateRequestOpts(requestParameters: CoreTokensUpdateRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensUpdate().' + ); + } + + if (requestParameters['tokenRequest'] == null) { + throw new runtime.RequiredError( + 'tokenRequest', + 'Required parameter "tokenRequest" was null or undefined when calling coreTokensUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TokenRequestToJSON(requestParameters['tokenRequest']), + }; + } + + /** + * Token Viewset + */ + async coreTokensUpdateRaw(requestParameters: CoreTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Token Viewset + */ + async coreTokensUpdate(requestParameters: CoreTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTokensUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensUsedByList without sending the request + */ + async coreTokensUsedByListRequestOpts(requestParameters: CoreTokensUsedByListRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/used_by/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreTokensUsedByListRaw(requestParameters: CoreTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreTokensUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreTokensUsedByList(requestParameters: CoreTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreTokensUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTokensViewKeyRetrieve without sending the request + */ + async coreTokensViewKeyRetrieveRequestOpts(requestParameters: CoreTokensViewKeyRetrieveRequest): Promise { + if (requestParameters['identifier'] == null) { + throw new runtime.RequiredError( + 'identifier', + 'Required parameter "identifier" was null or undefined when calling coreTokensViewKeyRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/tokens/{identifier}/view_key/`; + urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters['identifier']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return token key and log access + */ + async coreTokensViewKeyRetrieveRaw(requestParameters: CoreTokensViewKeyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTokensViewKeyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenViewFromJSON(jsonValue)); + } + + /** + * Return token key and log access + */ + async coreTokensViewKeyRetrieve(requestParameters: CoreTokensViewKeyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTokensViewKeyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreTransactionalApplicationsUpdate without sending the request + */ + async coreTransactionalApplicationsUpdateRequestOpts(requestParameters: CoreTransactionalApplicationsUpdateRequest): Promise { + if (requestParameters['transactionApplicationRequest'] == null) { + throw new runtime.RequiredError( + 'transactionApplicationRequest', + 'Required parameter "transactionApplicationRequest" was null or undefined when calling coreTransactionalApplicationsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/transactional/applications/`; + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TransactionApplicationRequestToJSON(requestParameters['transactionApplicationRequest']), + }; + } + + /** + * Convert data into a blueprint, validate it and apply it + */ + async coreTransactionalApplicationsUpdateRaw(requestParameters: CoreTransactionalApplicationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreTransactionalApplicationsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TransactionApplicationResponseFromJSON(jsonValue)); + } + + /** + * Convert data into a blueprint, validate it and apply it + */ + async coreTransactionalApplicationsUpdate(requestParameters: CoreTransactionalApplicationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreTransactionalApplicationsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUserConsentDestroy without sending the request + */ + async coreUserConsentDestroyRequestOpts(requestParameters: CoreUserConsentDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUserConsentDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/user_consent/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserConsent Viewset + */ + async coreUserConsentDestroyRaw(requestParameters: CoreUserConsentDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUserConsentDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * UserConsent Viewset + */ + async coreUserConsentDestroy(requestParameters: CoreUserConsentDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreUserConsentDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreUserConsentList without sending the request + */ + async coreUserConsentListRequestOpts(requestParameters: CoreUserConsentListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['application'] != null) { + queryParameters['application'] = requestParameters['application']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/user_consent/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserConsent Viewset + */ + async coreUserConsentListRaw(requestParameters: CoreUserConsentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUserConsentListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserConsentListFromJSON(jsonValue)); + } + + /** + * UserConsent Viewset + */ + async coreUserConsentList(requestParameters: CoreUserConsentListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUserConsentListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUserConsentRetrieve without sending the request + */ + async coreUserConsentRetrieveRequestOpts(requestParameters: CoreUserConsentRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUserConsentRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/user_consent/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserConsent Viewset + */ + async coreUserConsentRetrieveRaw(requestParameters: CoreUserConsentRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUserConsentRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserConsentFromJSON(jsonValue)); + } + + /** + * UserConsent Viewset + */ + async coreUserConsentRetrieve(requestParameters: CoreUserConsentRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUserConsentRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUserConsentUsedByList without sending the request + */ + async coreUserConsentUsedByListRequestOpts(requestParameters: CoreUserConsentUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUserConsentUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/user_consent/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreUserConsentUsedByListRaw(requestParameters: CoreUserConsentUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreUserConsentUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreUserConsentUsedByList(requestParameters: CoreUserConsentUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreUserConsentUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersCreate without sending the request + */ + async coreUsersCreateRequestOpts(requestParameters: CoreUsersCreateRequest): Promise { + if (requestParameters['userRequest'] == null) { + throw new runtime.RequiredError( + 'userRequest', + 'Required parameter "userRequest" was null or undefined when calling coreUsersCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserRequestToJSON(requestParameters['userRequest']), + }; + } + + /** + * User Viewset + */ + async coreUsersCreateRaw(requestParameters: CoreUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * User Viewset + */ + async coreUsersCreate(requestParameters: CoreUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersDestroy without sending the request + */ + async coreUsersDestroyRequestOpts(requestParameters: CoreUsersDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User Viewset + */ + async coreUsersDestroyRaw(requestParameters: CoreUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User Viewset + */ + async coreUsersDestroy(requestParameters: CoreUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreUsersDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreUsersExportCreate without sending the request + */ + async coreUsersExportCreateRequestOpts(requestParameters: CoreUsersExportCreateRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['attributes'] != null) { + queryParameters['attributes'] = requestParameters['attributes']; + } + + if (requestParameters['dateJoined'] != null) { + queryParameters['date_joined'] = (requestParameters['dateJoined'] as any).toISOString(); + } + + if (requestParameters['dateJoinedGt'] != null) { + queryParameters['date_joined__gt'] = (requestParameters['dateJoinedGt'] as any).toISOString(); + } + + if (requestParameters['dateJoinedLt'] != null) { + queryParameters['date_joined__lt'] = (requestParameters['dateJoinedLt'] as any).toISOString(); + } + + if (requestParameters['email'] != null) { + queryParameters['email'] = requestParameters['email']; + } + + if (requestParameters['groupsByName'] != null) { + queryParameters['groups_by_name'] = requestParameters['groupsByName']; + } + + if (requestParameters['groupsByPk'] != null) { + queryParameters['groups_by_pk'] = requestParameters['groupsByPk']; + } + + if (requestParameters['isActive'] != null) { + queryParameters['is_active'] = requestParameters['isActive']; + } + + if (requestParameters['isSuperuser'] != null) { + queryParameters['is_superuser'] = requestParameters['isSuperuser']; + } + + if (requestParameters['lastLogin'] != null) { + queryParameters['last_login'] = (requestParameters['lastLogin'] as any).toISOString(); + } + + if (requestParameters['lastLoginGt'] != null) { + queryParameters['last_login__gt'] = (requestParameters['lastLoginGt'] as any).toISOString(); + } + + if (requestParameters['lastLoginIsnull'] != null) { + queryParameters['last_login__isnull'] = requestParameters['lastLoginIsnull']; + } + + if (requestParameters['lastLoginLt'] != null) { + queryParameters['last_login__lt'] = (requestParameters['lastLoginLt'] as any).toISOString(); + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['lastUpdatedGt'] != null) { + queryParameters['last_updated__gt'] = (requestParameters['lastUpdatedGt'] as any).toISOString(); + } + + if (requestParameters['lastUpdatedLt'] != null) { + queryParameters['last_updated__lt'] = (requestParameters['lastUpdatedLt'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + if (requestParameters['pathStartswith'] != null) { + queryParameters['path_startswith'] = requestParameters['pathStartswith']; + } + + if (requestParameters['rolesByName'] != null) { + queryParameters['roles_by_name'] = requestParameters['rolesByName']; + } + + if (requestParameters['rolesByPk'] != null) { + queryParameters['roles_by_pk'] = requestParameters['rolesByPk']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + if (requestParameters['uuid'] != null) { + queryParameters['uuid'] = requestParameters['uuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/export/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Create a data export for this data type. Note that the export is generated asynchronously: this method returns a `DataExport` object that will initially have `completed=false` as well as the permanent URL to that object in the `Location` header. You can poll that URL until `completed=true`, at which point the `file_url` property will contain a URL to download + */ + async coreUsersExportCreateRaw(requestParameters: CoreUsersExportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersExportCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataExportFromJSON(jsonValue)); + } + + /** + * Create a data export for this data type. Note that the export is generated asynchronously: this method returns a `DataExport` object that will initially have `completed=false` as well as the permanent URL to that object in the `Location` header. You can poll that URL until `completed=true`, at which point the `file_url` property will contain a URL to download + */ + async coreUsersExportCreate(requestParameters: CoreUsersExportCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersExportCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersImpersonateCreate without sending the request + */ + async coreUsersImpersonateCreateRequestOpts(requestParameters: CoreUsersImpersonateCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersImpersonateCreate().' + ); + } + + if (requestParameters['impersonationRequest'] == null) { + throw new runtime.RequiredError( + 'impersonationRequest', + 'Required parameter "impersonationRequest" was null or undefined when calling coreUsersImpersonateCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/impersonate/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ImpersonationRequestToJSON(requestParameters['impersonationRequest']), + }; + } + + /** + * Impersonate a user + */ + async coreUsersImpersonateCreateRaw(requestParameters: CoreUsersImpersonateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersImpersonateCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Impersonate a user + */ + async coreUsersImpersonateCreate(requestParameters: CoreUsersImpersonateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreUsersImpersonateCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreUsersImpersonateEndRetrieve without sending the request + */ + async coreUsersImpersonateEndRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/impersonate_end/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * End Impersonation a user + */ + async coreUsersImpersonateEndRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersImpersonateEndRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * End Impersonation a user + */ + async coreUsersImpersonateEndRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreUsersImpersonateEndRetrieveRaw(initOverrides); + } + + /** + * Creates request options for coreUsersList without sending the request + */ + async coreUsersListRequestOpts(requestParameters: CoreUsersListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['attributes'] != null) { + queryParameters['attributes'] = requestParameters['attributes']; + } + + if (requestParameters['dateJoined'] != null) { + queryParameters['date_joined'] = (requestParameters['dateJoined'] as any).toISOString(); + } + + if (requestParameters['dateJoinedGt'] != null) { + queryParameters['date_joined__gt'] = (requestParameters['dateJoinedGt'] as any).toISOString(); + } + + if (requestParameters['dateJoinedLt'] != null) { + queryParameters['date_joined__lt'] = (requestParameters['dateJoinedLt'] as any).toISOString(); + } + + if (requestParameters['email'] != null) { + queryParameters['email'] = requestParameters['email']; + } + + if (requestParameters['groupsByName'] != null) { + queryParameters['groups_by_name'] = requestParameters['groupsByName']; + } + + if (requestParameters['groupsByPk'] != null) { + queryParameters['groups_by_pk'] = requestParameters['groupsByPk']; + } + + if (requestParameters['includeGroups'] != null) { + queryParameters['include_groups'] = requestParameters['includeGroups']; + } + + if (requestParameters['includeRoles'] != null) { + queryParameters['include_roles'] = requestParameters['includeRoles']; + } + + if (requestParameters['isActive'] != null) { + queryParameters['is_active'] = requestParameters['isActive']; + } + + if (requestParameters['isSuperuser'] != null) { + queryParameters['is_superuser'] = requestParameters['isSuperuser']; + } + + if (requestParameters['lastLogin'] != null) { + queryParameters['last_login'] = (requestParameters['lastLogin'] as any).toISOString(); + } + + if (requestParameters['lastLoginGt'] != null) { + queryParameters['last_login__gt'] = (requestParameters['lastLoginGt'] as any).toISOString(); + } + + if (requestParameters['lastLoginIsnull'] != null) { + queryParameters['last_login__isnull'] = requestParameters['lastLoginIsnull']; + } + + if (requestParameters['lastLoginLt'] != null) { + queryParameters['last_login__lt'] = (requestParameters['lastLoginLt'] as any).toISOString(); + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['lastUpdatedGt'] != null) { + queryParameters['last_updated__gt'] = (requestParameters['lastUpdatedGt'] as any).toISOString(); + } + + if (requestParameters['lastUpdatedLt'] != null) { + queryParameters['last_updated__lt'] = (requestParameters['lastUpdatedLt'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + if (requestParameters['pathStartswith'] != null) { + queryParameters['path_startswith'] = requestParameters['pathStartswith']; + } + + if (requestParameters['rolesByName'] != null) { + queryParameters['roles_by_name'] = requestParameters['rolesByName']; + } + + if (requestParameters['rolesByPk'] != null) { + queryParameters['roles_by_pk'] = requestParameters['rolesByPk']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + if (requestParameters['uuid'] != null) { + queryParameters['uuid'] = requestParameters['uuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User Viewset + */ + async coreUsersListRaw(requestParameters: CoreUsersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserListFromJSON(jsonValue)); + } + + /** + * User Viewset + */ + async coreUsersList(requestParameters: CoreUsersListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersMeRetrieve without sending the request + */ + async coreUsersMeRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/me/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get information about current user + */ + async coreUsersMeRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersMeRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SessionUserFromJSON(jsonValue)); + } + + /** + * Get information about current user + */ + async coreUsersMeRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersMeRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersPartialUpdate without sending the request + */ + async coreUsersPartialUpdateRequestOpts(requestParameters: CoreUsersPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserRequestToJSON(requestParameters['patchedUserRequest']), + }; + } + + /** + * User Viewset + */ + async coreUsersPartialUpdateRaw(requestParameters: CoreUsersPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * User Viewset + */ + async coreUsersPartialUpdate(requestParameters: CoreUsersPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersPathsRetrieve without sending the request + */ + async coreUsersPathsRetrieveRequestOpts(requestParameters: CoreUsersPathsRetrieveRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/paths/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all user paths + */ + async coreUsersPathsRetrieveRaw(requestParameters: CoreUsersPathsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersPathsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPathFromJSON(jsonValue)); + } + + /** + * Get all user paths + */ + async coreUsersPathsRetrieve(requestParameters: CoreUsersPathsRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersPathsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersRecoveryCreate without sending the request + */ + async coreUsersRecoveryCreateRequestOpts(requestParameters: CoreUsersRecoveryCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersRecoveryCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/recovery/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserRecoveryLinkRequestToJSON(requestParameters['userRecoveryLinkRequest']), + }; + } + + /** + * Create a temporary link that a user can use to recover their account + */ + async coreUsersRecoveryCreateRaw(requestParameters: CoreUsersRecoveryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersRecoveryCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LinkFromJSON(jsonValue)); + } + + /** + * Create a temporary link that a user can use to recover their account + */ + async coreUsersRecoveryCreate(requestParameters: CoreUsersRecoveryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersRecoveryCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersRecoveryEmailCreate without sending the request + */ + async coreUsersRecoveryEmailCreateRequestOpts(requestParameters: CoreUsersRecoveryEmailCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersRecoveryEmailCreate().' + ); + } + + if (requestParameters['userRecoveryEmailRequest'] == null) { + throw new runtime.RequiredError( + 'userRecoveryEmailRequest', + 'Required parameter "userRecoveryEmailRequest" was null or undefined when calling coreUsersRecoveryEmailCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/recovery_email/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserRecoveryEmailRequestToJSON(requestParameters['userRecoveryEmailRequest']), + }; + } + + /** + * Send an email with a temporary link that a user can use to recover their account + */ + async coreUsersRecoveryEmailCreateRaw(requestParameters: CoreUsersRecoveryEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersRecoveryEmailCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Send an email with a temporary link that a user can use to recover their account + */ + async coreUsersRecoveryEmailCreate(requestParameters: CoreUsersRecoveryEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreUsersRecoveryEmailCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreUsersRetrieve without sending the request + */ + async coreUsersRetrieveRequestOpts(requestParameters: CoreUsersRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User Viewset + */ + async coreUsersRetrieveRaw(requestParameters: CoreUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * User Viewset + */ + async coreUsersRetrieve(requestParameters: CoreUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersServiceAccountCreate without sending the request + */ + async coreUsersServiceAccountCreateRequestOpts(requestParameters: CoreUsersServiceAccountCreateRequest): Promise { + if (requestParameters['userServiceAccountRequest'] == null) { + throw new runtime.RequiredError( + 'userServiceAccountRequest', + 'Required parameter "userServiceAccountRequest" was null or undefined when calling coreUsersServiceAccountCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/service_account/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserServiceAccountRequestToJSON(requestParameters['userServiceAccountRequest']), + }; + } + + /** + * Create a new user account that is marked as a service account + */ + async coreUsersServiceAccountCreateRaw(requestParameters: CoreUsersServiceAccountCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersServiceAccountCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserServiceAccountResponseFromJSON(jsonValue)); + } + + /** + * Create a new user account that is marked as a service account + */ + async coreUsersServiceAccountCreate(requestParameters: CoreUsersServiceAccountCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersServiceAccountCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersSetPasswordCreate without sending the request + */ + async coreUsersSetPasswordCreateRequestOpts(requestParameters: CoreUsersSetPasswordCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersSetPasswordCreate().' + ); + } + + if (requestParameters['userPasswordSetRequest'] == null) { + throw new runtime.RequiredError( + 'userPasswordSetRequest', + 'Required parameter "userPasswordSetRequest" was null or undefined when calling coreUsersSetPasswordCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/set_password/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserPasswordSetRequestToJSON(requestParameters['userPasswordSetRequest']), + }; + } + + /** + * Set password for user + */ + async coreUsersSetPasswordCreateRaw(requestParameters: CoreUsersSetPasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersSetPasswordCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Set password for user + */ + async coreUsersSetPasswordCreate(requestParameters: CoreUsersSetPasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.coreUsersSetPasswordCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for coreUsersUpdate without sending the request + */ + async coreUsersUpdateRequestOpts(requestParameters: CoreUsersUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersUpdate().' + ); + } + + if (requestParameters['userRequest'] == null) { + throw new runtime.RequiredError( + 'userRequest', + 'Required parameter "userRequest" was null or undefined when calling coreUsersUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserRequestToJSON(requestParameters['userRequest']), + }; + } + + /** + * User Viewset + */ + async coreUsersUpdateRaw(requestParameters: CoreUsersUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.coreUsersUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * User Viewset + */ + async coreUsersUpdate(requestParameters: CoreUsersUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.coreUsersUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for coreUsersUsedByList without sending the request + */ + async coreUsersUsedByListRequestOpts(requestParameters: CoreUsersUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling coreUsersUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/core/users/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async coreUsersUsedByListRaw(requestParameters: CoreUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.coreUsersUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async coreUsersUsedByList(requestParameters: CoreUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.coreUsersUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const CoreTokensListIntentEnum = { + Api: 'api', + AppPassword: 'app_password', + Recovery: 'recovery', + Verification: 'verification', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CoreTokensListIntentEnum = typeof CoreTokensListIntentEnum[keyof typeof CoreTokensListIntentEnum]; +/** + * @export + */ +export const CoreUsersExportCreateTypeEnum = { + External: 'external', + Internal: 'internal', + InternalServiceAccount: 'internal_service_account', + ServiceAccount: 'service_account', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CoreUsersExportCreateTypeEnum = typeof CoreUsersExportCreateTypeEnum[keyof typeof CoreUsersExportCreateTypeEnum]; +/** + * @export + */ +export const CoreUsersListTypeEnum = { + External: 'external', + Internal: 'internal', + InternalServiceAccount: 'internal_service_account', + ServiceAccount: 'service_account', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CoreUsersListTypeEnum = typeof CoreUsersListTypeEnum[keyof typeof CoreUsersListTypeEnum]; diff --git a/packages/client-ts/src/apis/CryptoApi.ts b/packages/client-ts/src/apis/CryptoApi.ts new file mode 100644 index 0000000000..3024ab5458 --- /dev/null +++ b/packages/client-ts/src/apis/CryptoApi.ts @@ -0,0 +1,696 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CertificateData, + CertificateGenerationRequest, + CertificateKeyPair, + CertificateKeyPairRequest, + GenericError, + PaginatedCertificateKeyPairList, + PatchedCertificateKeyPairRequest, + UsedBy, + ValidationError, +} from '../models/index'; +import { + CertificateDataFromJSON, + CertificateDataToJSON, + CertificateGenerationRequestFromJSON, + CertificateGenerationRequestToJSON, + CertificateKeyPairFromJSON, + CertificateKeyPairToJSON, + CertificateKeyPairRequestFromJSON, + CertificateKeyPairRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedCertificateKeyPairListFromJSON, + PaginatedCertificateKeyPairListToJSON, + PatchedCertificateKeyPairRequestFromJSON, + PatchedCertificateKeyPairRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface CryptoCertificatekeypairsCreateRequest { + certificateKeyPairRequest: CertificateKeyPairRequest; +} + +export interface CryptoCertificatekeypairsDestroyRequest { + kpUuid: string; +} + +export interface CryptoCertificatekeypairsGenerateCreateRequest { + certificateGenerationRequest: CertificateGenerationRequest; +} + +export interface CryptoCertificatekeypairsListRequest { + hasKey?: boolean; + keyType?: Array; + managed?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface CryptoCertificatekeypairsPartialUpdateRequest { + kpUuid: string; + patchedCertificateKeyPairRequest?: PatchedCertificateKeyPairRequest; +} + +export interface CryptoCertificatekeypairsRetrieveRequest { + kpUuid: string; +} + +export interface CryptoCertificatekeypairsUpdateRequest { + kpUuid: string; + certificateKeyPairRequest: CertificateKeyPairRequest; +} + +export interface CryptoCertificatekeypairsUsedByListRequest { + kpUuid: string; +} + +export interface CryptoCertificatekeypairsViewCertificateRetrieveRequest { + kpUuid: string; + download?: boolean; +} + +export interface CryptoCertificatekeypairsViewPrivateKeyRetrieveRequest { + kpUuid: string; + download?: boolean; +} + +/** + * + */ +export class CryptoApi extends runtime.BaseAPI { + + /** + * Creates request options for cryptoCertificatekeypairsCreate without sending the request + */ + async cryptoCertificatekeypairsCreateRequestOpts(requestParameters: CryptoCertificatekeypairsCreateRequest): Promise { + if (requestParameters['certificateKeyPairRequest'] == null) { + throw new runtime.RequiredError( + 'certificateKeyPairRequest', + 'Required parameter "certificateKeyPairRequest" was null or undefined when calling cryptoCertificatekeypairsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CertificateKeyPairRequestToJSON(requestParameters['certificateKeyPairRequest']), + }; + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsCreateRaw(requestParameters: CryptoCertificatekeypairsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateKeyPairFromJSON(jsonValue)); + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsCreate(requestParameters: CryptoCertificatekeypairsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsDestroy without sending the request + */ + async cryptoCertificatekeypairsDestroyRequestOpts(requestParameters: CryptoCertificatekeypairsDestroyRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsDestroyRaw(requestParameters: CryptoCertificatekeypairsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsDestroy(requestParameters: CryptoCertificatekeypairsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.cryptoCertificatekeypairsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for cryptoCertificatekeypairsGenerateCreate without sending the request + */ + async cryptoCertificatekeypairsGenerateCreateRequestOpts(requestParameters: CryptoCertificatekeypairsGenerateCreateRequest): Promise { + if (requestParameters['certificateGenerationRequest'] == null) { + throw new runtime.RequiredError( + 'certificateGenerationRequest', + 'Required parameter "certificateGenerationRequest" was null or undefined when calling cryptoCertificatekeypairsGenerateCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/generate/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CertificateGenerationRequestToJSON(requestParameters['certificateGenerationRequest']), + }; + } + + /** + * Generate a new, self-signed certificate-key pair + */ + async cryptoCertificatekeypairsGenerateCreateRaw(requestParameters: CryptoCertificatekeypairsGenerateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsGenerateCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateKeyPairFromJSON(jsonValue)); + } + + /** + * Generate a new, self-signed certificate-key pair + */ + async cryptoCertificatekeypairsGenerateCreate(requestParameters: CryptoCertificatekeypairsGenerateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsGenerateCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsList without sending the request + */ + async cryptoCertificatekeypairsListRequestOpts(requestParameters: CryptoCertificatekeypairsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['hasKey'] != null) { + queryParameters['has_key'] = requestParameters['hasKey']; + } + + if (requestParameters['keyType'] != null) { + queryParameters['key_type'] = requestParameters['keyType']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsListRaw(requestParameters: CryptoCertificatekeypairsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedCertificateKeyPairListFromJSON(jsonValue)); + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsList(requestParameters: CryptoCertificatekeypairsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsPartialUpdate without sending the request + */ + async cryptoCertificatekeypairsPartialUpdateRequestOpts(requestParameters: CryptoCertificatekeypairsPartialUpdateRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedCertificateKeyPairRequestToJSON(requestParameters['patchedCertificateKeyPairRequest']), + }; + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsPartialUpdateRaw(requestParameters: CryptoCertificatekeypairsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateKeyPairFromJSON(jsonValue)); + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsPartialUpdate(requestParameters: CryptoCertificatekeypairsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsRetrieve without sending the request + */ + async cryptoCertificatekeypairsRetrieveRequestOpts(requestParameters: CryptoCertificatekeypairsRetrieveRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsRetrieveRaw(requestParameters: CryptoCertificatekeypairsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateKeyPairFromJSON(jsonValue)); + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsRetrieve(requestParameters: CryptoCertificatekeypairsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsUpdate without sending the request + */ + async cryptoCertificatekeypairsUpdateRequestOpts(requestParameters: CryptoCertificatekeypairsUpdateRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsUpdate().' + ); + } + + if (requestParameters['certificateKeyPairRequest'] == null) { + throw new runtime.RequiredError( + 'certificateKeyPairRequest', + 'Required parameter "certificateKeyPairRequest" was null or undefined when calling cryptoCertificatekeypairsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: CertificateKeyPairRequestToJSON(requestParameters['certificateKeyPairRequest']), + }; + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsUpdateRaw(requestParameters: CryptoCertificatekeypairsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateKeyPairFromJSON(jsonValue)); + } + + /** + * CertificateKeyPair Viewset + */ + async cryptoCertificatekeypairsUpdate(requestParameters: CryptoCertificatekeypairsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsUsedByList without sending the request + */ + async cryptoCertificatekeypairsUsedByListRequestOpts(requestParameters: CryptoCertificatekeypairsUsedByListRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async cryptoCertificatekeypairsUsedByListRaw(requestParameters: CryptoCertificatekeypairsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.cryptoCertificatekeypairsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async cryptoCertificatekeypairsUsedByList(requestParameters: CryptoCertificatekeypairsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.cryptoCertificatekeypairsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsViewCertificateRetrieve without sending the request + */ + async cryptoCertificatekeypairsViewCertificateRetrieveRequestOpts(requestParameters: CryptoCertificatekeypairsViewCertificateRetrieveRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsViewCertificateRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['download'] != null) { + queryParameters['download'] = requestParameters['download']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/view_certificate/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return certificate-key pairs certificate and log access + */ + async cryptoCertificatekeypairsViewCertificateRetrieveRaw(requestParameters: CryptoCertificatekeypairsViewCertificateRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsViewCertificateRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateDataFromJSON(jsonValue)); + } + + /** + * Return certificate-key pairs certificate and log access + */ + async cryptoCertificatekeypairsViewCertificateRetrieve(requestParameters: CryptoCertificatekeypairsViewCertificateRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsViewCertificateRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for cryptoCertificatekeypairsViewPrivateKeyRetrieve without sending the request + */ + async cryptoCertificatekeypairsViewPrivateKeyRetrieveRequestOpts(requestParameters: CryptoCertificatekeypairsViewPrivateKeyRetrieveRequest): Promise { + if (requestParameters['kpUuid'] == null) { + throw new runtime.RequiredError( + 'kpUuid', + 'Required parameter "kpUuid" was null or undefined when calling cryptoCertificatekeypairsViewPrivateKeyRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['download'] != null) { + queryParameters['download'] = requestParameters['download']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/crypto/certificatekeypairs/{kp_uuid}/view_private_key/`; + urlPath = urlPath.replace(`{${"kp_uuid"}}`, encodeURIComponent(String(requestParameters['kpUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return certificate-key pairs private key and log access + */ + async cryptoCertificatekeypairsViewPrivateKeyRetrieveRaw(requestParameters: CryptoCertificatekeypairsViewPrivateKeyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.cryptoCertificatekeypairsViewPrivateKeyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CertificateDataFromJSON(jsonValue)); + } + + /** + * Return certificate-key pairs private key and log access + */ + async cryptoCertificatekeypairsViewPrivateKeyRetrieve(requestParameters: CryptoCertificatekeypairsViewPrivateKeyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.cryptoCertificatekeypairsViewPrivateKeyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const CryptoCertificatekeypairsListKeyTypeEnum = { + Dsa: 'dsa', + Ec: 'ec', + Ed25519: 'ed25519', + Ed448: 'ed448', + Rsa: 'rsa', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CryptoCertificatekeypairsListKeyTypeEnum = typeof CryptoCertificatekeypairsListKeyTypeEnum[keyof typeof CryptoCertificatekeypairsListKeyTypeEnum]; diff --git a/packages/client-ts/src/apis/EndpointsApi.ts b/packages/client-ts/src/apis/EndpointsApi.ts new file mode 100644 index 0000000000..a346f848aa --- /dev/null +++ b/packages/client-ts/src/apis/EndpointsApi.ts @@ -0,0 +1,3950 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AgentAuthenticationResponse, + AgentConfig, + AgentConnector, + AgentConnectorRequest, + AgentPSSODeviceRegistrationRequest, + AgentPSSODeviceRegistrationResponse, + AgentPSSOUserRegistrationRequest, + AgentTokenResponse, + Connector, + DeviceAccessGroup, + DeviceAccessGroupRequest, + DeviceFactsRequest, + DeviceSummary, + DeviceUserBinding, + DeviceUserBindingRequest, + EndpointDevice, + EndpointDeviceDetails, + EndpointDeviceRequest, + EnrollRequest, + EnrollmentToken, + EnrollmentTokenRequest, + FleetConnector, + FleetConnectorRequest, + GenericError, + GoogleChromeConnector, + GoogleChromeConnectorRequest, + MDMConfigRequest, + MDMConfigResponse, + PaginatedAgentConnectorList, + PaginatedConnectorList, + PaginatedDeviceAccessGroupList, + PaginatedDeviceUserBindingList, + PaginatedEndpointDeviceList, + PaginatedEnrollmentTokenList, + PaginatedFleetConnectorList, + PaginatedGoogleChromeConnectorList, + PatchedAgentConnectorRequest, + PatchedDeviceAccessGroupRequest, + PatchedDeviceUserBindingRequest, + PatchedEndpointDeviceRequest, + PatchedEnrollmentTokenRequest, + PatchedFleetConnectorRequest, + PatchedGoogleChromeConnectorRequest, + TokenView, + TypeCreate, + UsedBy, + UserSelf, + ValidationError, +} from '../models/index'; +import { + AgentAuthenticationResponseFromJSON, + AgentAuthenticationResponseToJSON, + AgentConfigFromJSON, + AgentConfigToJSON, + AgentConnectorFromJSON, + AgentConnectorToJSON, + AgentConnectorRequestFromJSON, + AgentConnectorRequestToJSON, + AgentPSSODeviceRegistrationRequestFromJSON, + AgentPSSODeviceRegistrationRequestToJSON, + AgentPSSODeviceRegistrationResponseFromJSON, + AgentPSSODeviceRegistrationResponseToJSON, + AgentPSSOUserRegistrationRequestFromJSON, + AgentPSSOUserRegistrationRequestToJSON, + AgentTokenResponseFromJSON, + AgentTokenResponseToJSON, + ConnectorFromJSON, + ConnectorToJSON, + DeviceAccessGroupFromJSON, + DeviceAccessGroupToJSON, + DeviceAccessGroupRequestFromJSON, + DeviceAccessGroupRequestToJSON, + DeviceFactsRequestFromJSON, + DeviceFactsRequestToJSON, + DeviceSummaryFromJSON, + DeviceSummaryToJSON, + DeviceUserBindingFromJSON, + DeviceUserBindingToJSON, + DeviceUserBindingRequestFromJSON, + DeviceUserBindingRequestToJSON, + EndpointDeviceFromJSON, + EndpointDeviceToJSON, + EndpointDeviceDetailsFromJSON, + EndpointDeviceDetailsToJSON, + EndpointDeviceRequestFromJSON, + EndpointDeviceRequestToJSON, + EnrollRequestFromJSON, + EnrollRequestToJSON, + EnrollmentTokenFromJSON, + EnrollmentTokenToJSON, + EnrollmentTokenRequestFromJSON, + EnrollmentTokenRequestToJSON, + FleetConnectorFromJSON, + FleetConnectorToJSON, + FleetConnectorRequestFromJSON, + FleetConnectorRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + GoogleChromeConnectorFromJSON, + GoogleChromeConnectorToJSON, + GoogleChromeConnectorRequestFromJSON, + GoogleChromeConnectorRequestToJSON, + MDMConfigRequestFromJSON, + MDMConfigRequestToJSON, + MDMConfigResponseFromJSON, + MDMConfigResponseToJSON, + PaginatedAgentConnectorListFromJSON, + PaginatedAgentConnectorListToJSON, + PaginatedConnectorListFromJSON, + PaginatedConnectorListToJSON, + PaginatedDeviceAccessGroupListFromJSON, + PaginatedDeviceAccessGroupListToJSON, + PaginatedDeviceUserBindingListFromJSON, + PaginatedDeviceUserBindingListToJSON, + PaginatedEndpointDeviceListFromJSON, + PaginatedEndpointDeviceListToJSON, + PaginatedEnrollmentTokenListFromJSON, + PaginatedEnrollmentTokenListToJSON, + PaginatedFleetConnectorListFromJSON, + PaginatedFleetConnectorListToJSON, + PaginatedGoogleChromeConnectorListFromJSON, + PaginatedGoogleChromeConnectorListToJSON, + PatchedAgentConnectorRequestFromJSON, + PatchedAgentConnectorRequestToJSON, + PatchedDeviceAccessGroupRequestFromJSON, + PatchedDeviceAccessGroupRequestToJSON, + PatchedDeviceUserBindingRequestFromJSON, + PatchedDeviceUserBindingRequestToJSON, + PatchedEndpointDeviceRequestFromJSON, + PatchedEndpointDeviceRequestToJSON, + PatchedEnrollmentTokenRequestFromJSON, + PatchedEnrollmentTokenRequestToJSON, + PatchedFleetConnectorRequestFromJSON, + PatchedFleetConnectorRequestToJSON, + PatchedGoogleChromeConnectorRequestFromJSON, + PatchedGoogleChromeConnectorRequestToJSON, + TokenViewFromJSON, + TokenViewToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + UserSelfFromJSON, + UserSelfToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface EndpointsAgentsConnectorsAuthFedCreateRequest { + device: string; +} + +export interface EndpointsAgentsConnectorsCheckInCreateRequest { + deviceFactsRequest?: DeviceFactsRequest; +} + +export interface EndpointsAgentsConnectorsCreateRequest { + agentConnectorRequest: AgentConnectorRequest; +} + +export interface EndpointsAgentsConnectorsDestroyRequest { + connectorUuid: string; +} + +export interface EndpointsAgentsConnectorsEnrollCreateRequest { + enrollRequest: EnrollRequest; +} + +export interface EndpointsAgentsConnectorsListRequest { + enabled?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface EndpointsAgentsConnectorsMdmConfigCreateRequest { + connectorUuid: string; + mDMConfigRequest: MDMConfigRequest; +} + +export interface EndpointsAgentsConnectorsPartialUpdateRequest { + connectorUuid: string; + patchedAgentConnectorRequest?: PatchedAgentConnectorRequest; +} + +export interface EndpointsAgentsConnectorsRetrieveRequest { + connectorUuid: string; +} + +export interface EndpointsAgentsConnectorsUpdateRequest { + connectorUuid: string; + agentConnectorRequest: AgentConnectorRequest; +} + +export interface EndpointsAgentsConnectorsUsedByListRequest { + connectorUuid: string; +} + +export interface EndpointsAgentsEnrollmentTokensCreateRequest { + enrollmentTokenRequest: EnrollmentTokenRequest; +} + +export interface EndpointsAgentsEnrollmentTokensDestroyRequest { + tokenUuid: string; +} + +export interface EndpointsAgentsEnrollmentTokensListRequest { + connector?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + tokenUuid?: string; +} + +export interface EndpointsAgentsEnrollmentTokensPartialUpdateRequest { + tokenUuid: string; + patchedEnrollmentTokenRequest?: PatchedEnrollmentTokenRequest; +} + +export interface EndpointsAgentsEnrollmentTokensRetrieveRequest { + tokenUuid: string; +} + +export interface EndpointsAgentsEnrollmentTokensUpdateRequest { + tokenUuid: string; + enrollmentTokenRequest: EnrollmentTokenRequest; +} + +export interface EndpointsAgentsEnrollmentTokensUsedByListRequest { + tokenUuid: string; +} + +export interface EndpointsAgentsEnrollmentTokensViewKeyRetrieveRequest { + tokenUuid: string; +} + +export interface EndpointsAgentsPssoRegisterDeviceCreateRequest { + agentPSSODeviceRegistrationRequest: AgentPSSODeviceRegistrationRequest; +} + +export interface EndpointsAgentsPssoRegisterUserCreateRequest { + agentPSSOUserRegistrationRequest: AgentPSSOUserRegistrationRequest; +} + +export interface EndpointsConnectorsDestroyRequest { + connectorUuid: string; +} + +export interface EndpointsConnectorsListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface EndpointsConnectorsRetrieveRequest { + connectorUuid: string; +} + +export interface EndpointsConnectorsUsedByListRequest { + connectorUuid: string; +} + +export interface EndpointsDeviceAccessGroupsCreateRequest { + deviceAccessGroupRequest: DeviceAccessGroupRequest; +} + +export interface EndpointsDeviceAccessGroupsDestroyRequest { + pbmUuid: string; +} + +export interface EndpointsDeviceAccessGroupsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + search?: string; +} + +export interface EndpointsDeviceAccessGroupsPartialUpdateRequest { + pbmUuid: string; + patchedDeviceAccessGroupRequest?: PatchedDeviceAccessGroupRequest; +} + +export interface EndpointsDeviceAccessGroupsRetrieveRequest { + pbmUuid: string; +} + +export interface EndpointsDeviceAccessGroupsUpdateRequest { + pbmUuid: string; + deviceAccessGroupRequest: DeviceAccessGroupRequest; +} + +export interface EndpointsDeviceAccessGroupsUsedByListRequest { + pbmUuid: string; +} + +export interface EndpointsDeviceBindingsCreateRequest { + deviceUserBindingRequest: DeviceUserBindingRequest; +} + +export interface EndpointsDeviceBindingsDestroyRequest { + policyBindingUuid: string; +} + +export interface EndpointsDeviceBindingsListRequest { + enabled?: boolean; + order?: number; + ordering?: string; + page?: number; + pageSize?: number; + policy?: string; + policyIsnull?: boolean; + search?: string; + target?: string; + targetIn?: Array; + timeout?: number; +} + +export interface EndpointsDeviceBindingsPartialUpdateRequest { + policyBindingUuid: string; + patchedDeviceUserBindingRequest?: PatchedDeviceUserBindingRequest; +} + +export interface EndpointsDeviceBindingsRetrieveRequest { + policyBindingUuid: string; +} + +export interface EndpointsDeviceBindingsUpdateRequest { + policyBindingUuid: string; + deviceUserBindingRequest: DeviceUserBindingRequest; +} + +export interface EndpointsDeviceBindingsUsedByListRequest { + policyBindingUuid: string; +} + +export interface EndpointsDevicesDestroyRequest { + deviceUuid: string; +} + +export interface EndpointsDevicesListRequest { + identifier?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface EndpointsDevicesPartialUpdateRequest { + deviceUuid: string; + patchedEndpointDeviceRequest?: PatchedEndpointDeviceRequest; +} + +export interface EndpointsDevicesRetrieveRequest { + deviceUuid: string; +} + +export interface EndpointsDevicesUpdateRequest { + deviceUuid: string; + endpointDeviceRequest: EndpointDeviceRequest; +} + +export interface EndpointsDevicesUsedByListRequest { + deviceUuid: string; +} + +export interface EndpointsFleetConnectorsCreateRequest { + fleetConnectorRequest: FleetConnectorRequest; +} + +export interface EndpointsFleetConnectorsDestroyRequest { + connectorUuid: string; +} + +export interface EndpointsFleetConnectorsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface EndpointsFleetConnectorsPartialUpdateRequest { + connectorUuid: string; + patchedFleetConnectorRequest?: PatchedFleetConnectorRequest; +} + +export interface EndpointsFleetConnectorsRetrieveRequest { + connectorUuid: string; +} + +export interface EndpointsFleetConnectorsUpdateRequest { + connectorUuid: string; + fleetConnectorRequest: FleetConnectorRequest; +} + +export interface EndpointsFleetConnectorsUsedByListRequest { + connectorUuid: string; +} + +export interface EndpointsGoogleChromeConnectorsCreateRequest { + googleChromeConnectorRequest: GoogleChromeConnectorRequest; +} + +export interface EndpointsGoogleChromeConnectorsDestroyRequest { + connectorUuid: string; +} + +export interface EndpointsGoogleChromeConnectorsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface EndpointsGoogleChromeConnectorsPartialUpdateRequest { + connectorUuid: string; + patchedGoogleChromeConnectorRequest?: PatchedGoogleChromeConnectorRequest; +} + +export interface EndpointsGoogleChromeConnectorsRetrieveRequest { + connectorUuid: string; +} + +export interface EndpointsGoogleChromeConnectorsUpdateRequest { + connectorUuid: string; + googleChromeConnectorRequest: GoogleChromeConnectorRequest; +} + +export interface EndpointsGoogleChromeConnectorsUsedByListRequest { + connectorUuid: string; +} + +/** + * + */ +export class EndpointsApi extends runtime.BaseAPI { + + /** + * Creates request options for endpointsAgentsConnectorsAgentConfigRetrieve without sending the request + */ + async endpointsAgentsConnectorsAgentConfigRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/endpoints/agents/connectors/agent_config/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsAgentConfigRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsAgentConfigRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentConfigFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsAgentConfigRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsAgentConfigRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsAuthFedCreate without sending the request + */ + async endpointsAgentsConnectorsAuthFedCreateRequestOpts(requestParameters: EndpointsAgentsConnectorsAuthFedCreateRequest): Promise { + if (requestParameters['device'] == null) { + throw new runtime.RequiredError( + 'device', + 'Required parameter "device" was null or undefined when calling endpointsAgentsConnectorsAuthFedCreate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['device'] != null) { + queryParameters['device'] = requestParameters['device']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/endpoints/agents/connectors/auth_fed/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsAuthFedCreateRaw(requestParameters: EndpointsAgentsConnectorsAuthFedCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsAuthFedCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentTokenResponseFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsAuthFedCreate(requestParameters: EndpointsAgentsConnectorsAuthFedCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsAuthFedCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsAuthIaCreate without sending the request + */ + async endpointsAgentsConnectorsAuthIaCreateRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/endpoints/agents/connectors/auth_ia/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsAuthIaCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsAuthIaCreateRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentAuthenticationResponseFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsAuthIaCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsAuthIaCreateRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsCheckInCreate without sending the request + */ + async endpointsAgentsConnectorsCheckInCreateRequestOpts(requestParameters: EndpointsAgentsConnectorsCheckInCreateRequest): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/endpoints/agents/connectors/check_in/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DeviceFactsRequestToJSON(requestParameters['deviceFactsRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsCheckInCreateRaw(requestParameters: EndpointsAgentsConnectorsCheckInCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsCheckInCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsCheckInCreate(requestParameters: EndpointsAgentsConnectorsCheckInCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsAgentsConnectorsCheckInCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsAgentsConnectorsCreate without sending the request + */ + async endpointsAgentsConnectorsCreateRequestOpts(requestParameters: EndpointsAgentsConnectorsCreateRequest): Promise { + if (requestParameters['agentConnectorRequest'] == null) { + throw new runtime.RequiredError( + 'agentConnectorRequest', + 'Required parameter "agentConnectorRequest" was null or undefined when calling endpointsAgentsConnectorsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AgentConnectorRequestToJSON(requestParameters['agentConnectorRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsCreateRaw(requestParameters: EndpointsAgentsConnectorsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentConnectorFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsCreate(requestParameters: EndpointsAgentsConnectorsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsDestroy without sending the request + */ + async endpointsAgentsConnectorsDestroyRequestOpts(requestParameters: EndpointsAgentsConnectorsDestroyRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsDestroyRaw(requestParameters: EndpointsAgentsConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsDestroy(requestParameters: EndpointsAgentsConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsAgentsConnectorsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsAgentsConnectorsEnrollCreate without sending the request + */ + async endpointsAgentsConnectorsEnrollCreateRequestOpts(requestParameters: EndpointsAgentsConnectorsEnrollCreateRequest): Promise { + if (requestParameters['enrollRequest'] == null) { + throw new runtime.RequiredError( + 'enrollRequest', + 'Required parameter "enrollRequest" was null or undefined when calling endpointsAgentsConnectorsEnrollCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/endpoints/agents/connectors/enroll/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EnrollRequestToJSON(requestParameters['enrollRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsEnrollCreateRaw(requestParameters: EndpointsAgentsConnectorsEnrollCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsEnrollCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentTokenResponseFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsEnrollCreate(requestParameters: EndpointsAgentsConnectorsEnrollCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsEnrollCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsList without sending the request + */ + async endpointsAgentsConnectorsListRequestOpts(requestParameters: EndpointsAgentsConnectorsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsListRaw(requestParameters: EndpointsAgentsConnectorsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAgentConnectorListFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsList(requestParameters: EndpointsAgentsConnectorsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsMdmConfigCreate without sending the request + */ + async endpointsAgentsConnectorsMdmConfigCreateRequestOpts(requestParameters: EndpointsAgentsConnectorsMdmConfigCreateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsMdmConfigCreate().' + ); + } + + if (requestParameters['mDMConfigRequest'] == null) { + throw new runtime.RequiredError( + 'mDMConfigRequest', + 'Required parameter "mDMConfigRequest" was null or undefined when calling endpointsAgentsConnectorsMdmConfigCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/{connector_uuid}/mdm_config/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MDMConfigRequestToJSON(requestParameters['mDMConfigRequest']), + }; + } + + /** + * Generate configuration for MDM systems to deploy authentik Agent + */ + async endpointsAgentsConnectorsMdmConfigCreateRaw(requestParameters: EndpointsAgentsConnectorsMdmConfigCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsMdmConfigCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MDMConfigResponseFromJSON(jsonValue)); + } + + /** + * Generate configuration for MDM systems to deploy authentik Agent + */ + async endpointsAgentsConnectorsMdmConfigCreate(requestParameters: EndpointsAgentsConnectorsMdmConfigCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsMdmConfigCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsPartialUpdate without sending the request + */ + async endpointsAgentsConnectorsPartialUpdateRequestOpts(requestParameters: EndpointsAgentsConnectorsPartialUpdateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAgentConnectorRequestToJSON(requestParameters['patchedAgentConnectorRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsPartialUpdateRaw(requestParameters: EndpointsAgentsConnectorsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentConnectorFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsPartialUpdate(requestParameters: EndpointsAgentsConnectorsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsRetrieve without sending the request + */ + async endpointsAgentsConnectorsRetrieveRequestOpts(requestParameters: EndpointsAgentsConnectorsRetrieveRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsRetrieveRaw(requestParameters: EndpointsAgentsConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentConnectorFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsRetrieve(requestParameters: EndpointsAgentsConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsUpdate without sending the request + */ + async endpointsAgentsConnectorsUpdateRequestOpts(requestParameters: EndpointsAgentsConnectorsUpdateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsUpdate().' + ); + } + + if (requestParameters['agentConnectorRequest'] == null) { + throw new runtime.RequiredError( + 'agentConnectorRequest', + 'Required parameter "agentConnectorRequest" was null or undefined when calling endpointsAgentsConnectorsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AgentConnectorRequestToJSON(requestParameters['agentConnectorRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsUpdateRaw(requestParameters: EndpointsAgentsConnectorsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsConnectorsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentConnectorFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsConnectorsUpdate(requestParameters: EndpointsAgentsConnectorsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsConnectorsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsConnectorsUsedByList without sending the request + */ + async endpointsAgentsConnectorsUsedByListRequestOpts(requestParameters: EndpointsAgentsConnectorsUsedByListRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsAgentsConnectorsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/connectors/{connector_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsAgentsConnectorsUsedByListRaw(requestParameters: EndpointsAgentsConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsAgentsConnectorsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsAgentsConnectorsUsedByList(requestParameters: EndpointsAgentsConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsAgentsConnectorsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensCreate without sending the request + */ + async endpointsAgentsEnrollmentTokensCreateRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensCreateRequest): Promise { + if (requestParameters['enrollmentTokenRequest'] == null) { + throw new runtime.RequiredError( + 'enrollmentTokenRequest', + 'Required parameter "enrollmentTokenRequest" was null or undefined when calling endpointsAgentsEnrollmentTokensCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EnrollmentTokenRequestToJSON(requestParameters['enrollmentTokenRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensCreateRaw(requestParameters: EndpointsAgentsEnrollmentTokensCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnrollmentTokenFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensCreate(requestParameters: EndpointsAgentsEnrollmentTokensCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsEnrollmentTokensCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensDestroy without sending the request + */ + async endpointsAgentsEnrollmentTokensDestroyRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensDestroyRequest): Promise { + if (requestParameters['tokenUuid'] == null) { + throw new runtime.RequiredError( + 'tokenUuid', + 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`; + urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensDestroyRaw(requestParameters: EndpointsAgentsEnrollmentTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensDestroy(requestParameters: EndpointsAgentsEnrollmentTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsAgentsEnrollmentTokensDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensList without sending the request + */ + async endpointsAgentsEnrollmentTokensListRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['connector'] != null) { + queryParameters['connector'] = requestParameters['connector']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['tokenUuid'] != null) { + queryParameters['token_uuid'] = requestParameters['tokenUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensListRaw(requestParameters: EndpointsAgentsEnrollmentTokensListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEnrollmentTokenListFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensList(requestParameters: EndpointsAgentsEnrollmentTokensListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsEnrollmentTokensListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensPartialUpdate without sending the request + */ + async endpointsAgentsEnrollmentTokensPartialUpdateRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensPartialUpdateRequest): Promise { + if (requestParameters['tokenUuid'] == null) { + throw new runtime.RequiredError( + 'tokenUuid', + 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`; + urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEnrollmentTokenRequestToJSON(requestParameters['patchedEnrollmentTokenRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensPartialUpdateRaw(requestParameters: EndpointsAgentsEnrollmentTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnrollmentTokenFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensPartialUpdate(requestParameters: EndpointsAgentsEnrollmentTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsEnrollmentTokensPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensRetrieve without sending the request + */ + async endpointsAgentsEnrollmentTokensRetrieveRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensRetrieveRequest): Promise { + if (requestParameters['tokenUuid'] == null) { + throw new runtime.RequiredError( + 'tokenUuid', + 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`; + urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensRetrieveRaw(requestParameters: EndpointsAgentsEnrollmentTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnrollmentTokenFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensRetrieve(requestParameters: EndpointsAgentsEnrollmentTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsEnrollmentTokensRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensUpdate without sending the request + */ + async endpointsAgentsEnrollmentTokensUpdateRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensUpdateRequest): Promise { + if (requestParameters['tokenUuid'] == null) { + throw new runtime.RequiredError( + 'tokenUuid', + 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensUpdate().' + ); + } + + if (requestParameters['enrollmentTokenRequest'] == null) { + throw new runtime.RequiredError( + 'enrollmentTokenRequest', + 'Required parameter "enrollmentTokenRequest" was null or undefined when calling endpointsAgentsEnrollmentTokensUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/`; + urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EnrollmentTokenRequestToJSON(requestParameters['enrollmentTokenRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensUpdateRaw(requestParameters: EndpointsAgentsEnrollmentTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EnrollmentTokenFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsAgentsEnrollmentTokensUpdate(requestParameters: EndpointsAgentsEnrollmentTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsEnrollmentTokensUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensUsedByList without sending the request + */ + async endpointsAgentsEnrollmentTokensUsedByListRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensUsedByListRequest): Promise { + if (requestParameters['tokenUuid'] == null) { + throw new runtime.RequiredError( + 'tokenUuid', + 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsAgentsEnrollmentTokensUsedByListRaw(requestParameters: EndpointsAgentsEnrollmentTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsAgentsEnrollmentTokensUsedByList(requestParameters: EndpointsAgentsEnrollmentTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsAgentsEnrollmentTokensUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsEnrollmentTokensViewKeyRetrieve without sending the request + */ + async endpointsAgentsEnrollmentTokensViewKeyRetrieveRequestOpts(requestParameters: EndpointsAgentsEnrollmentTokensViewKeyRetrieveRequest): Promise { + if (requestParameters['tokenUuid'] == null) { + throw new runtime.RequiredError( + 'tokenUuid', + 'Required parameter "tokenUuid" was null or undefined when calling endpointsAgentsEnrollmentTokensViewKeyRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/agents/enrollment_tokens/{token_uuid}/view_key/`; + urlPath = urlPath.replace(`{${"token_uuid"}}`, encodeURIComponent(String(requestParameters['tokenUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return token key and log access + */ + async endpointsAgentsEnrollmentTokensViewKeyRetrieveRaw(requestParameters: EndpointsAgentsEnrollmentTokensViewKeyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsEnrollmentTokensViewKeyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenViewFromJSON(jsonValue)); + } + + /** + * Return token key and log access + */ + async endpointsAgentsEnrollmentTokensViewKeyRetrieve(requestParameters: EndpointsAgentsEnrollmentTokensViewKeyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsEnrollmentTokensViewKeyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsPssoRegisterDeviceCreate without sending the request + */ + async endpointsAgentsPssoRegisterDeviceCreateRequestOpts(requestParameters: EndpointsAgentsPssoRegisterDeviceCreateRequest): Promise { + if (requestParameters['agentPSSODeviceRegistrationRequest'] == null) { + throw new runtime.RequiredError( + 'agentPSSODeviceRegistrationRequest', + 'Required parameter "agentPSSODeviceRegistrationRequest" was null or undefined when calling endpointsAgentsPssoRegisterDeviceCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/endpoints/agents/psso/register/device/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AgentPSSODeviceRegistrationRequestToJSON(requestParameters['agentPSSODeviceRegistrationRequest']), + }; + } + + /** + */ + async endpointsAgentsPssoRegisterDeviceCreateRaw(requestParameters: EndpointsAgentsPssoRegisterDeviceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsPssoRegisterDeviceCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AgentPSSODeviceRegistrationResponseFromJSON(jsonValue)); + } + + /** + */ + async endpointsAgentsPssoRegisterDeviceCreate(requestParameters: EndpointsAgentsPssoRegisterDeviceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsPssoRegisterDeviceCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsAgentsPssoRegisterUserCreate without sending the request + */ + async endpointsAgentsPssoRegisterUserCreateRequestOpts(requestParameters: EndpointsAgentsPssoRegisterUserCreateRequest): Promise { + if (requestParameters['agentPSSOUserRegistrationRequest'] == null) { + throw new runtime.RequiredError( + 'agentPSSOUserRegistrationRequest', + 'Required parameter "agentPSSOUserRegistrationRequest" was null or undefined when calling endpointsAgentsPssoRegisterUserCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/endpoints/agents/psso/register/user/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AgentPSSOUserRegistrationRequestToJSON(requestParameters['agentPSSOUserRegistrationRequest']), + }; + } + + /** + */ + async endpointsAgentsPssoRegisterUserCreateRaw(requestParameters: EndpointsAgentsPssoRegisterUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsAgentsPssoRegisterUserCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSelfFromJSON(jsonValue)); + } + + /** + */ + async endpointsAgentsPssoRegisterUserCreate(requestParameters: EndpointsAgentsPssoRegisterUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsAgentsPssoRegisterUserCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsConnectorsDestroy without sending the request + */ + async endpointsConnectorsDestroyRequestOpts(requestParameters: EndpointsConnectorsDestroyRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsConnectorsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Connector Viewset + */ + async endpointsConnectorsDestroyRaw(requestParameters: EndpointsConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsConnectorsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Connector Viewset + */ + async endpointsConnectorsDestroy(requestParameters: EndpointsConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsConnectorsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsConnectorsList without sending the request + */ + async endpointsConnectorsListRequestOpts(requestParameters: EndpointsConnectorsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/connectors/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Connector Viewset + */ + async endpointsConnectorsListRaw(requestParameters: EndpointsConnectorsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsConnectorsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedConnectorListFromJSON(jsonValue)); + } + + /** + * Connector Viewset + */ + async endpointsConnectorsList(requestParameters: EndpointsConnectorsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsConnectorsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsConnectorsRetrieve without sending the request + */ + async endpointsConnectorsRetrieveRequestOpts(requestParameters: EndpointsConnectorsRetrieveRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsConnectorsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Connector Viewset + */ + async endpointsConnectorsRetrieveRaw(requestParameters: EndpointsConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsConnectorsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorFromJSON(jsonValue)); + } + + /** + * Connector Viewset + */ + async endpointsConnectorsRetrieve(requestParameters: EndpointsConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsConnectorsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsConnectorsTypesList without sending the request + */ + async endpointsConnectorsTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/connectors/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async endpointsConnectorsTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsConnectorsTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async endpointsConnectorsTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsConnectorsTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsConnectorsUsedByList without sending the request + */ + async endpointsConnectorsUsedByListRequestOpts(requestParameters: EndpointsConnectorsUsedByListRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsConnectorsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/connectors/{connector_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsConnectorsUsedByListRaw(requestParameters: EndpointsConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsConnectorsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsConnectorsUsedByList(requestParameters: EndpointsConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsConnectorsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsCreate without sending the request + */ + async endpointsDeviceAccessGroupsCreateRequestOpts(requestParameters: EndpointsDeviceAccessGroupsCreateRequest): Promise { + if (requestParameters['deviceAccessGroupRequest'] == null) { + throw new runtime.RequiredError( + 'deviceAccessGroupRequest', + 'Required parameter "deviceAccessGroupRequest" was null or undefined when calling endpointsDeviceAccessGroupsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DeviceAccessGroupRequestToJSON(requestParameters['deviceAccessGroupRequest']), + }; + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsCreateRaw(requestParameters: EndpointsDeviceAccessGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceAccessGroupsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceAccessGroupFromJSON(jsonValue)); + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsCreate(requestParameters: EndpointsDeviceAccessGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceAccessGroupsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsDestroy without sending the request + */ + async endpointsDeviceAccessGroupsDestroyRequestOpts(requestParameters: EndpointsDeviceAccessGroupsDestroyRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsDestroyRaw(requestParameters: EndpointsDeviceAccessGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceAccessGroupsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsDestroy(requestParameters: EndpointsDeviceAccessGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsDeviceAccessGroupsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsList without sending the request + */ + async endpointsDeviceAccessGroupsListRequestOpts(requestParameters: EndpointsDeviceAccessGroupsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsListRaw(requestParameters: EndpointsDeviceAccessGroupsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceAccessGroupsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDeviceAccessGroupListFromJSON(jsonValue)); + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsList(requestParameters: EndpointsDeviceAccessGroupsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceAccessGroupsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsPartialUpdate without sending the request + */ + async endpointsDeviceAccessGroupsPartialUpdateRequestOpts(requestParameters: EndpointsDeviceAccessGroupsPartialUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDeviceAccessGroupRequestToJSON(requestParameters['patchedDeviceAccessGroupRequest']), + }; + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsPartialUpdateRaw(requestParameters: EndpointsDeviceAccessGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceAccessGroupsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceAccessGroupFromJSON(jsonValue)); + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsPartialUpdate(requestParameters: EndpointsDeviceAccessGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceAccessGroupsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsRetrieve without sending the request + */ + async endpointsDeviceAccessGroupsRetrieveRequestOpts(requestParameters: EndpointsDeviceAccessGroupsRetrieveRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsRetrieveRaw(requestParameters: EndpointsDeviceAccessGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceAccessGroupsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceAccessGroupFromJSON(jsonValue)); + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsRetrieve(requestParameters: EndpointsDeviceAccessGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceAccessGroupsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsUpdate without sending the request + */ + async endpointsDeviceAccessGroupsUpdateRequestOpts(requestParameters: EndpointsDeviceAccessGroupsUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsUpdate().' + ); + } + + if (requestParameters['deviceAccessGroupRequest'] == null) { + throw new runtime.RequiredError( + 'deviceAccessGroupRequest', + 'Required parameter "deviceAccessGroupRequest" was null or undefined when calling endpointsDeviceAccessGroupsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DeviceAccessGroupRequestToJSON(requestParameters['deviceAccessGroupRequest']), + }; + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsUpdateRaw(requestParameters: EndpointsDeviceAccessGroupsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceAccessGroupsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceAccessGroupFromJSON(jsonValue)); + } + + /** + * DeviceAccessGroup Viewset + */ + async endpointsDeviceAccessGroupsUpdate(requestParameters: EndpointsDeviceAccessGroupsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceAccessGroupsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceAccessGroupsUsedByList without sending the request + */ + async endpointsDeviceAccessGroupsUsedByListRequestOpts(requestParameters: EndpointsDeviceAccessGroupsUsedByListRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling endpointsDeviceAccessGroupsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_access_groups/{pbm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsDeviceAccessGroupsUsedByListRaw(requestParameters: EndpointsDeviceAccessGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsDeviceAccessGroupsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsDeviceAccessGroupsUsedByList(requestParameters: EndpointsDeviceAccessGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsDeviceAccessGroupsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceBindingsCreate without sending the request + */ + async endpointsDeviceBindingsCreateRequestOpts(requestParameters: EndpointsDeviceBindingsCreateRequest): Promise { + if (requestParameters['deviceUserBindingRequest'] == null) { + throw new runtime.RequiredError( + 'deviceUserBindingRequest', + 'Required parameter "deviceUserBindingRequest" was null or undefined when calling endpointsDeviceBindingsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DeviceUserBindingRequestToJSON(requestParameters['deviceUserBindingRequest']), + }; + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsCreateRaw(requestParameters: EndpointsDeviceBindingsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceBindingsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceUserBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsCreate(requestParameters: EndpointsDeviceBindingsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceBindingsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceBindingsDestroy without sending the request + */ + async endpointsDeviceBindingsDestroyRequestOpts(requestParameters: EndpointsDeviceBindingsDestroyRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsDestroyRaw(requestParameters: EndpointsDeviceBindingsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceBindingsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsDestroy(requestParameters: EndpointsDeviceBindingsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsDeviceBindingsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsDeviceBindingsList without sending the request + */ + async endpointsDeviceBindingsListRequestOpts(requestParameters: EndpointsDeviceBindingsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policy'] != null) { + queryParameters['policy'] = requestParameters['policy']; + } + + if (requestParameters['policyIsnull'] != null) { + queryParameters['policy__isnull'] = requestParameters['policyIsnull']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['target'] != null) { + queryParameters['target'] = requestParameters['target']; + } + + if (requestParameters['targetIn'] != null) { + queryParameters['target_in'] = requestParameters['targetIn']; + } + + if (requestParameters['timeout'] != null) { + queryParameters['timeout'] = requestParameters['timeout']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsListRaw(requestParameters: EndpointsDeviceBindingsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceBindingsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDeviceUserBindingListFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsList(requestParameters: EndpointsDeviceBindingsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceBindingsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceBindingsPartialUpdate without sending the request + */ + async endpointsDeviceBindingsPartialUpdateRequestOpts(requestParameters: EndpointsDeviceBindingsPartialUpdateRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDeviceUserBindingRequestToJSON(requestParameters['patchedDeviceUserBindingRequest']), + }; + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsPartialUpdateRaw(requestParameters: EndpointsDeviceBindingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceBindingsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceUserBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsPartialUpdate(requestParameters: EndpointsDeviceBindingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceBindingsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceBindingsRetrieve without sending the request + */ + async endpointsDeviceBindingsRetrieveRequestOpts(requestParameters: EndpointsDeviceBindingsRetrieveRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsRetrieveRaw(requestParameters: EndpointsDeviceBindingsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceBindingsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceUserBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsRetrieve(requestParameters: EndpointsDeviceBindingsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceBindingsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceBindingsUpdate without sending the request + */ + async endpointsDeviceBindingsUpdateRequestOpts(requestParameters: EndpointsDeviceBindingsUpdateRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsUpdate().' + ); + } + + if (requestParameters['deviceUserBindingRequest'] == null) { + throw new runtime.RequiredError( + 'deviceUserBindingRequest', + 'Required parameter "deviceUserBindingRequest" was null or undefined when calling endpointsDeviceBindingsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DeviceUserBindingRequestToJSON(requestParameters['deviceUserBindingRequest']), + }; + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsUpdateRaw(requestParameters: EndpointsDeviceBindingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDeviceBindingsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceUserBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async endpointsDeviceBindingsUpdate(requestParameters: EndpointsDeviceBindingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDeviceBindingsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDeviceBindingsUsedByList without sending the request + */ + async endpointsDeviceBindingsUsedByListRequestOpts(requestParameters: EndpointsDeviceBindingsUsedByListRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling endpointsDeviceBindingsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/device_bindings/{policy_binding_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsDeviceBindingsUsedByListRaw(requestParameters: EndpointsDeviceBindingsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsDeviceBindingsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsDeviceBindingsUsedByList(requestParameters: EndpointsDeviceBindingsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsDeviceBindingsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDevicesDestroy without sending the request + */ + async endpointsDevicesDestroyRequestOpts(requestParameters: EndpointsDevicesDestroyRequest): Promise { + if (requestParameters['deviceUuid'] == null) { + throw new runtime.RequiredError( + 'deviceUuid', + 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/{device_uuid}/`; + urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesDestroyRaw(requestParameters: EndpointsDevicesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDevicesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesDestroy(requestParameters: EndpointsDevicesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsDevicesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsDevicesList without sending the request + */ + async endpointsDevicesListRequestOpts(requestParameters: EndpointsDevicesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['identifier'] != null) { + queryParameters['identifier'] = requestParameters['identifier']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesListRaw(requestParameters: EndpointsDevicesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDevicesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEndpointDeviceListFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesList(requestParameters: EndpointsDevicesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDevicesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDevicesPartialUpdate without sending the request + */ + async endpointsDevicesPartialUpdateRequestOpts(requestParameters: EndpointsDevicesPartialUpdateRequest): Promise { + if (requestParameters['deviceUuid'] == null) { + throw new runtime.RequiredError( + 'deviceUuid', + 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/{device_uuid}/`; + urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEndpointDeviceRequestToJSON(requestParameters['patchedEndpointDeviceRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesPartialUpdateRaw(requestParameters: EndpointsDevicesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDevicesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointDeviceFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesPartialUpdate(requestParameters: EndpointsDevicesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDevicesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDevicesRetrieve without sending the request + */ + async endpointsDevicesRetrieveRequestOpts(requestParameters: EndpointsDevicesRetrieveRequest): Promise { + if (requestParameters['deviceUuid'] == null) { + throw new runtime.RequiredError( + 'deviceUuid', + 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/{device_uuid}/`; + urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesRetrieveRaw(requestParameters: EndpointsDevicesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDevicesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointDeviceDetailsFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesRetrieve(requestParameters: EndpointsDevicesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDevicesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDevicesSummaryRetrieve without sending the request + */ + async endpointsDevicesSummaryRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/summary/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesSummaryRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDevicesSummaryRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeviceSummaryFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesSummaryRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDevicesSummaryRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDevicesUpdate without sending the request + */ + async endpointsDevicesUpdateRequestOpts(requestParameters: EndpointsDevicesUpdateRequest): Promise { + if (requestParameters['deviceUuid'] == null) { + throw new runtime.RequiredError( + 'deviceUuid', + 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesUpdate().' + ); + } + + if (requestParameters['endpointDeviceRequest'] == null) { + throw new runtime.RequiredError( + 'endpointDeviceRequest', + 'Required parameter "endpointDeviceRequest" was null or undefined when calling endpointsDevicesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/{device_uuid}/`; + urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EndpointDeviceRequestToJSON(requestParameters['endpointDeviceRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesUpdateRaw(requestParameters: EndpointsDevicesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsDevicesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointDeviceFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async endpointsDevicesUpdate(requestParameters: EndpointsDevicesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsDevicesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsDevicesUsedByList without sending the request + */ + async endpointsDevicesUsedByListRequestOpts(requestParameters: EndpointsDevicesUsedByListRequest): Promise { + if (requestParameters['deviceUuid'] == null) { + throw new runtime.RequiredError( + 'deviceUuid', + 'Required parameter "deviceUuid" was null or undefined when calling endpointsDevicesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/devices/{device_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"device_uuid"}}`, encodeURIComponent(String(requestParameters['deviceUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsDevicesUsedByListRaw(requestParameters: EndpointsDevicesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsDevicesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsDevicesUsedByList(requestParameters: EndpointsDevicesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsDevicesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsFleetConnectorsCreate without sending the request + */ + async endpointsFleetConnectorsCreateRequestOpts(requestParameters: EndpointsFleetConnectorsCreateRequest): Promise { + if (requestParameters['fleetConnectorRequest'] == null) { + throw new runtime.RequiredError( + 'fleetConnectorRequest', + 'Required parameter "fleetConnectorRequest" was null or undefined when calling endpointsFleetConnectorsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: FleetConnectorRequestToJSON(requestParameters['fleetConnectorRequest']), + }; + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsCreateRaw(requestParameters: EndpointsFleetConnectorsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsFleetConnectorsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FleetConnectorFromJSON(jsonValue)); + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsCreate(requestParameters: EndpointsFleetConnectorsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsFleetConnectorsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsFleetConnectorsDestroy without sending the request + */ + async endpointsFleetConnectorsDestroyRequestOpts(requestParameters: EndpointsFleetConnectorsDestroyRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsFleetConnectorsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsDestroyRaw(requestParameters: EndpointsFleetConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsFleetConnectorsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsDestroy(requestParameters: EndpointsFleetConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsFleetConnectorsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsFleetConnectorsList without sending the request + */ + async endpointsFleetConnectorsListRequestOpts(requestParameters: EndpointsFleetConnectorsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsListRaw(requestParameters: EndpointsFleetConnectorsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsFleetConnectorsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedFleetConnectorListFromJSON(jsonValue)); + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsList(requestParameters: EndpointsFleetConnectorsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsFleetConnectorsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsFleetConnectorsPartialUpdate without sending the request + */ + async endpointsFleetConnectorsPartialUpdateRequestOpts(requestParameters: EndpointsFleetConnectorsPartialUpdateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsFleetConnectorsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedFleetConnectorRequestToJSON(requestParameters['patchedFleetConnectorRequest']), + }; + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsPartialUpdateRaw(requestParameters: EndpointsFleetConnectorsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsFleetConnectorsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FleetConnectorFromJSON(jsonValue)); + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsPartialUpdate(requestParameters: EndpointsFleetConnectorsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsFleetConnectorsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsFleetConnectorsRetrieve without sending the request + */ + async endpointsFleetConnectorsRetrieveRequestOpts(requestParameters: EndpointsFleetConnectorsRetrieveRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsFleetConnectorsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsRetrieveRaw(requestParameters: EndpointsFleetConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsFleetConnectorsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FleetConnectorFromJSON(jsonValue)); + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsRetrieve(requestParameters: EndpointsFleetConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsFleetConnectorsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsFleetConnectorsUpdate without sending the request + */ + async endpointsFleetConnectorsUpdateRequestOpts(requestParameters: EndpointsFleetConnectorsUpdateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsFleetConnectorsUpdate().' + ); + } + + if (requestParameters['fleetConnectorRequest'] == null) { + throw new runtime.RequiredError( + 'fleetConnectorRequest', + 'Required parameter "fleetConnectorRequest" was null or undefined when calling endpointsFleetConnectorsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: FleetConnectorRequestToJSON(requestParameters['fleetConnectorRequest']), + }; + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsUpdateRaw(requestParameters: EndpointsFleetConnectorsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsFleetConnectorsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FleetConnectorFromJSON(jsonValue)); + } + + /** + * FleetConnector Viewset + */ + async endpointsFleetConnectorsUpdate(requestParameters: EndpointsFleetConnectorsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsFleetConnectorsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsFleetConnectorsUsedByList without sending the request + */ + async endpointsFleetConnectorsUsedByListRequestOpts(requestParameters: EndpointsFleetConnectorsUsedByListRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsFleetConnectorsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/fleet/connectors/{connector_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsFleetConnectorsUsedByListRaw(requestParameters: EndpointsFleetConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsFleetConnectorsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsFleetConnectorsUsedByList(requestParameters: EndpointsFleetConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsFleetConnectorsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsCreate without sending the request + */ + async endpointsGoogleChromeConnectorsCreateRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsCreateRequest): Promise { + if (requestParameters['googleChromeConnectorRequest'] == null) { + throw new runtime.RequiredError( + 'googleChromeConnectorRequest', + 'Required parameter "googleChromeConnectorRequest" was null or undefined when calling endpointsGoogleChromeConnectorsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GoogleChromeConnectorRequestToJSON(requestParameters['googleChromeConnectorRequest']), + }; + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsCreateRaw(requestParameters: EndpointsGoogleChromeConnectorsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsGoogleChromeConnectorsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleChromeConnectorFromJSON(jsonValue)); + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsCreate(requestParameters: EndpointsGoogleChromeConnectorsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsGoogleChromeConnectorsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsDestroy without sending the request + */ + async endpointsGoogleChromeConnectorsDestroyRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsDestroyRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsGoogleChromeConnectorsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsDestroyRaw(requestParameters: EndpointsGoogleChromeConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsGoogleChromeConnectorsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsDestroy(requestParameters: EndpointsGoogleChromeConnectorsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.endpointsGoogleChromeConnectorsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsList without sending the request + */ + async endpointsGoogleChromeConnectorsListRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsListRaw(requestParameters: EndpointsGoogleChromeConnectorsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsGoogleChromeConnectorsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleChromeConnectorListFromJSON(jsonValue)); + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsList(requestParameters: EndpointsGoogleChromeConnectorsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsGoogleChromeConnectorsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsPartialUpdate without sending the request + */ + async endpointsGoogleChromeConnectorsPartialUpdateRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsPartialUpdateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsGoogleChromeConnectorsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGoogleChromeConnectorRequestToJSON(requestParameters['patchedGoogleChromeConnectorRequest']), + }; + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsPartialUpdateRaw(requestParameters: EndpointsGoogleChromeConnectorsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsGoogleChromeConnectorsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleChromeConnectorFromJSON(jsonValue)); + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsPartialUpdate(requestParameters: EndpointsGoogleChromeConnectorsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsGoogleChromeConnectorsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsRetrieve without sending the request + */ + async endpointsGoogleChromeConnectorsRetrieveRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsRetrieveRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsGoogleChromeConnectorsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsRetrieveRaw(requestParameters: EndpointsGoogleChromeConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsGoogleChromeConnectorsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleChromeConnectorFromJSON(jsonValue)); + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsRetrieve(requestParameters: EndpointsGoogleChromeConnectorsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsGoogleChromeConnectorsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsUpdate without sending the request + */ + async endpointsGoogleChromeConnectorsUpdateRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsUpdateRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsGoogleChromeConnectorsUpdate().' + ); + } + + if (requestParameters['googleChromeConnectorRequest'] == null) { + throw new runtime.RequiredError( + 'googleChromeConnectorRequest', + 'Required parameter "googleChromeConnectorRequest" was null or undefined when calling endpointsGoogleChromeConnectorsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/{connector_uuid}/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GoogleChromeConnectorRequestToJSON(requestParameters['googleChromeConnectorRequest']), + }; + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsUpdateRaw(requestParameters: EndpointsGoogleChromeConnectorsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.endpointsGoogleChromeConnectorsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleChromeConnectorFromJSON(jsonValue)); + } + + /** + * GoogleChromeConnector Viewset + */ + async endpointsGoogleChromeConnectorsUpdate(requestParameters: EndpointsGoogleChromeConnectorsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.endpointsGoogleChromeConnectorsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for endpointsGoogleChromeConnectorsUsedByList without sending the request + */ + async endpointsGoogleChromeConnectorsUsedByListRequestOpts(requestParameters: EndpointsGoogleChromeConnectorsUsedByListRequest): Promise { + if (requestParameters['connectorUuid'] == null) { + throw new runtime.RequiredError( + 'connectorUuid', + 'Required parameter "connectorUuid" was null or undefined when calling endpointsGoogleChromeConnectorsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/endpoints/google_chrome/connectors/{connector_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"connector_uuid"}}`, encodeURIComponent(String(requestParameters['connectorUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async endpointsGoogleChromeConnectorsUsedByListRaw(requestParameters: EndpointsGoogleChromeConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.endpointsGoogleChromeConnectorsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async endpointsGoogleChromeConnectorsUsedByList(requestParameters: EndpointsGoogleChromeConnectorsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.endpointsGoogleChromeConnectorsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/EnterpriseApi.ts b/packages/client-ts/src/apis/EnterpriseApi.ts new file mode 100644 index 0000000000..76b9cdfd25 --- /dev/null +++ b/packages/client-ts/src/apis/EnterpriseApi.ts @@ -0,0 +1,631 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + InstallID, + License, + LicenseForecast, + LicenseRequest, + LicenseSummary, + PaginatedLicenseList, + PatchedLicenseRequest, + UsedBy, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + InstallIDFromJSON, + InstallIDToJSON, + LicenseFromJSON, + LicenseToJSON, + LicenseForecastFromJSON, + LicenseForecastToJSON, + LicenseRequestFromJSON, + LicenseRequestToJSON, + LicenseSummaryFromJSON, + LicenseSummaryToJSON, + PaginatedLicenseListFromJSON, + PaginatedLicenseListToJSON, + PatchedLicenseRequestFromJSON, + PatchedLicenseRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface EnterpriseLicenseCreateRequest { + licenseRequest: LicenseRequest; +} + +export interface EnterpriseLicenseDestroyRequest { + licenseUuid: string; +} + +export interface EnterpriseLicenseListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface EnterpriseLicensePartialUpdateRequest { + licenseUuid: string; + patchedLicenseRequest?: PatchedLicenseRequest; +} + +export interface EnterpriseLicenseRetrieveRequest { + licenseUuid: string; +} + +export interface EnterpriseLicenseSummaryRetrieveRequest { + cached?: boolean; +} + +export interface EnterpriseLicenseUpdateRequest { + licenseUuid: string; + licenseRequest: LicenseRequest; +} + +export interface EnterpriseLicenseUsedByListRequest { + licenseUuid: string; +} + +/** + * + */ +export class EnterpriseApi extends runtime.BaseAPI { + + /** + * Creates request options for enterpriseLicenseCreate without sending the request + */ + async enterpriseLicenseCreateRequestOpts(requestParameters: EnterpriseLicenseCreateRequest): Promise { + if (requestParameters['licenseRequest'] == null) { + throw new runtime.RequiredError( + 'licenseRequest', + 'Required parameter "licenseRequest" was null or undefined when calling enterpriseLicenseCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LicenseRequestToJSON(requestParameters['licenseRequest']), + }; + } + + /** + * License Viewset + */ + async enterpriseLicenseCreateRaw(requestParameters: EnterpriseLicenseCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LicenseFromJSON(jsonValue)); + } + + /** + * License Viewset + */ + async enterpriseLicenseCreate(requestParameters: EnterpriseLicenseCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseDestroy without sending the request + */ + async enterpriseLicenseDestroyRequestOpts(requestParameters: EnterpriseLicenseDestroyRequest): Promise { + if (requestParameters['licenseUuid'] == null) { + throw new runtime.RequiredError( + 'licenseUuid', + 'Required parameter "licenseUuid" was null or undefined when calling enterpriseLicenseDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/{license_uuid}/`; + urlPath = urlPath.replace(`{${"license_uuid"}}`, encodeURIComponent(String(requestParameters['licenseUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * License Viewset + */ + async enterpriseLicenseDestroyRaw(requestParameters: EnterpriseLicenseDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * License Viewset + */ + async enterpriseLicenseDestroy(requestParameters: EnterpriseLicenseDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.enterpriseLicenseDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for enterpriseLicenseForecastRetrieve without sending the request + */ + async enterpriseLicenseForecastRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/forecast/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Forecast how many users will be required in a year + */ + async enterpriseLicenseForecastRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseForecastRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LicenseForecastFromJSON(jsonValue)); + } + + /** + * Forecast how many users will be required in a year + */ + async enterpriseLicenseForecastRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseForecastRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseInstallIdRetrieve without sending the request + */ + async enterpriseLicenseInstallIdRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/install_id/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get install_id + */ + async enterpriseLicenseInstallIdRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseInstallIdRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InstallIDFromJSON(jsonValue)); + } + + /** + * Get install_id + */ + async enterpriseLicenseInstallIdRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseInstallIdRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseList without sending the request + */ + async enterpriseLicenseListRequestOpts(requestParameters: EnterpriseLicenseListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * License Viewset + */ + async enterpriseLicenseListRaw(requestParameters: EnterpriseLicenseListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLicenseListFromJSON(jsonValue)); + } + + /** + * License Viewset + */ + async enterpriseLicenseList(requestParameters: EnterpriseLicenseListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicensePartialUpdate without sending the request + */ + async enterpriseLicensePartialUpdateRequestOpts(requestParameters: EnterpriseLicensePartialUpdateRequest): Promise { + if (requestParameters['licenseUuid'] == null) { + throw new runtime.RequiredError( + 'licenseUuid', + 'Required parameter "licenseUuid" was null or undefined when calling enterpriseLicensePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/{license_uuid}/`; + urlPath = urlPath.replace(`{${"license_uuid"}}`, encodeURIComponent(String(requestParameters['licenseUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedLicenseRequestToJSON(requestParameters['patchedLicenseRequest']), + }; + } + + /** + * License Viewset + */ + async enterpriseLicensePartialUpdateRaw(requestParameters: EnterpriseLicensePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicensePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LicenseFromJSON(jsonValue)); + } + + /** + * License Viewset + */ + async enterpriseLicensePartialUpdate(requestParameters: EnterpriseLicensePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicensePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseRetrieve without sending the request + */ + async enterpriseLicenseRetrieveRequestOpts(requestParameters: EnterpriseLicenseRetrieveRequest): Promise { + if (requestParameters['licenseUuid'] == null) { + throw new runtime.RequiredError( + 'licenseUuid', + 'Required parameter "licenseUuid" was null or undefined when calling enterpriseLicenseRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/{license_uuid}/`; + urlPath = urlPath.replace(`{${"license_uuid"}}`, encodeURIComponent(String(requestParameters['licenseUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * License Viewset + */ + async enterpriseLicenseRetrieveRaw(requestParameters: EnterpriseLicenseRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LicenseFromJSON(jsonValue)); + } + + /** + * License Viewset + */ + async enterpriseLicenseRetrieve(requestParameters: EnterpriseLicenseRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseSummaryRetrieve without sending the request + */ + async enterpriseLicenseSummaryRetrieveRequestOpts(requestParameters: EnterpriseLicenseSummaryRetrieveRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['cached'] != null) { + queryParameters['cached'] = requestParameters['cached']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/summary/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get the total license status + */ + async enterpriseLicenseSummaryRetrieveRaw(requestParameters: EnterpriseLicenseSummaryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseSummaryRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LicenseSummaryFromJSON(jsonValue)); + } + + /** + * Get the total license status + */ + async enterpriseLicenseSummaryRetrieve(requestParameters: EnterpriseLicenseSummaryRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseSummaryRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseUpdate without sending the request + */ + async enterpriseLicenseUpdateRequestOpts(requestParameters: EnterpriseLicenseUpdateRequest): Promise { + if (requestParameters['licenseUuid'] == null) { + throw new runtime.RequiredError( + 'licenseUuid', + 'Required parameter "licenseUuid" was null or undefined when calling enterpriseLicenseUpdate().' + ); + } + + if (requestParameters['licenseRequest'] == null) { + throw new runtime.RequiredError( + 'licenseRequest', + 'Required parameter "licenseRequest" was null or undefined when calling enterpriseLicenseUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/{license_uuid}/`; + urlPath = urlPath.replace(`{${"license_uuid"}}`, encodeURIComponent(String(requestParameters['licenseUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: LicenseRequestToJSON(requestParameters['licenseRequest']), + }; + } + + /** + * License Viewset + */ + async enterpriseLicenseUpdateRaw(requestParameters: EnterpriseLicenseUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.enterpriseLicenseUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LicenseFromJSON(jsonValue)); + } + + /** + * License Viewset + */ + async enterpriseLicenseUpdate(requestParameters: EnterpriseLicenseUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enterpriseLicenseUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for enterpriseLicenseUsedByList without sending the request + */ + async enterpriseLicenseUsedByListRequestOpts(requestParameters: EnterpriseLicenseUsedByListRequest): Promise { + if (requestParameters['licenseUuid'] == null) { + throw new runtime.RequiredError( + 'licenseUuid', + 'Required parameter "licenseUuid" was null or undefined when calling enterpriseLicenseUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/enterprise/license/{license_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"license_uuid"}}`, encodeURIComponent(String(requestParameters['licenseUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async enterpriseLicenseUsedByListRaw(requestParameters: EnterpriseLicenseUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.enterpriseLicenseUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async enterpriseLicenseUsedByList(requestParameters: EnterpriseLicenseUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.enterpriseLicenseUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/EventsApi.ts b/packages/client-ts/src/apis/EventsApi.ts new file mode 100644 index 0000000000..2f27f2fdde --- /dev/null +++ b/packages/client-ts/src/apis/EventsApi.ts @@ -0,0 +1,2357 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + DataExport, + Event, + EventRequest, + EventTopPerUser, + EventVolume, + GenericError, + Notification, + NotificationRequest, + NotificationRule, + NotificationRuleRequest, + NotificationTransport, + NotificationTransportRequest, + NotificationTransportTest, + PaginatedEventList, + PaginatedNotificationList, + PaginatedNotificationRuleList, + PaginatedNotificationTransportList, + PatchedEventRequest, + PatchedNotificationRequest, + PatchedNotificationRuleRequest, + PatchedNotificationTransportRequest, + TypeCreate, + UsedBy, + ValidationError, +} from '../models/index'; +import { + DataExportFromJSON, + DataExportToJSON, + EventFromJSON, + EventToJSON, + EventRequestFromJSON, + EventRequestToJSON, + EventTopPerUserFromJSON, + EventTopPerUserToJSON, + EventVolumeFromJSON, + EventVolumeToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + NotificationFromJSON, + NotificationToJSON, + NotificationRequestFromJSON, + NotificationRequestToJSON, + NotificationRuleFromJSON, + NotificationRuleToJSON, + NotificationRuleRequestFromJSON, + NotificationRuleRequestToJSON, + NotificationTransportFromJSON, + NotificationTransportToJSON, + NotificationTransportRequestFromJSON, + NotificationTransportRequestToJSON, + NotificationTransportTestFromJSON, + NotificationTransportTestToJSON, + PaginatedEventListFromJSON, + PaginatedEventListToJSON, + PaginatedNotificationListFromJSON, + PaginatedNotificationListToJSON, + PaginatedNotificationRuleListFromJSON, + PaginatedNotificationRuleListToJSON, + PaginatedNotificationTransportListFromJSON, + PaginatedNotificationTransportListToJSON, + PatchedEventRequestFromJSON, + PatchedEventRequestToJSON, + PatchedNotificationRequestFromJSON, + PatchedNotificationRequestToJSON, + PatchedNotificationRuleRequestFromJSON, + PatchedNotificationRuleRequestToJSON, + PatchedNotificationTransportRequestFromJSON, + PatchedNotificationTransportRequestToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface EventsEventsCreateRequest { + eventRequest: EventRequest; +} + +export interface EventsEventsDestroyRequest { + eventUuid: string; +} + +export interface EventsEventsExportCreateRequest { + action?: string; + actions?: Array; + brandName?: string; + clientIp?: string; + contextAuthorizedApp?: string; + contextModelApp?: string; + contextModelName?: string; + contextModelPk?: string; + ordering?: string; + search?: string; + username?: string; +} + +export interface EventsEventsListRequest { + action?: string; + actions?: Array; + brandName?: string; + clientIp?: string; + contextAuthorizedApp?: string; + contextModelApp?: string; + contextModelName?: string; + contextModelPk?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + username?: string; +} + +export interface EventsEventsPartialUpdateRequest { + eventUuid: string; + patchedEventRequest?: PatchedEventRequest; +} + +export interface EventsEventsRetrieveRequest { + eventUuid: string; +} + +export interface EventsEventsTopPerUserListRequest { + action?: string; + topN?: number; +} + +export interface EventsEventsUpdateRequest { + eventUuid: string; + eventRequest: EventRequest; +} + +export interface EventsEventsVolumeListRequest { + action?: string; + actions?: Array; + brandName?: string; + clientIp?: string; + contextAuthorizedApp?: string; + contextModelApp?: string; + contextModelName?: string; + contextModelPk?: string; + historyDays?: number; + ordering?: string; + search?: string; + username?: string; +} + +export interface EventsNotificationsDestroyRequest { + uuid: string; +} + +export interface EventsNotificationsListRequest { + body?: string; + created?: Date; + event?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + seen?: boolean; + severity?: EventsNotificationsListSeverityEnum; + user?: number; +} + +export interface EventsNotificationsPartialUpdateRequest { + uuid: string; + patchedNotificationRequest?: PatchedNotificationRequest; +} + +export interface EventsNotificationsRetrieveRequest { + uuid: string; +} + +export interface EventsNotificationsUpdateRequest { + uuid: string; + notificationRequest?: NotificationRequest; +} + +export interface EventsNotificationsUsedByListRequest { + uuid: string; +} + +export interface EventsRulesCreateRequest { + notificationRuleRequest: NotificationRuleRequest; +} + +export interface EventsRulesDestroyRequest { + pbmUuid: string; +} + +export interface EventsRulesListRequest { + destinationGroupName?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + severity?: EventsRulesListSeverityEnum; +} + +export interface EventsRulesPartialUpdateRequest { + pbmUuid: string; + patchedNotificationRuleRequest?: PatchedNotificationRuleRequest; +} + +export interface EventsRulesRetrieveRequest { + pbmUuid: string; +} + +export interface EventsRulesUpdateRequest { + pbmUuid: string; + notificationRuleRequest: NotificationRuleRequest; +} + +export interface EventsRulesUsedByListRequest { + pbmUuid: string; +} + +export interface EventsTransportsCreateRequest { + notificationTransportRequest: NotificationTransportRequest; +} + +export interface EventsTransportsDestroyRequest { + uuid: string; +} + +export interface EventsTransportsListRequest { + mode?: EventsTransportsListModeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sendOnce?: boolean; + webhookUrl?: string; +} + +export interface EventsTransportsPartialUpdateRequest { + uuid: string; + patchedNotificationTransportRequest?: PatchedNotificationTransportRequest; +} + +export interface EventsTransportsRetrieveRequest { + uuid: string; +} + +export interface EventsTransportsTestCreateRequest { + uuid: string; +} + +export interface EventsTransportsUpdateRequest { + uuid: string; + notificationTransportRequest: NotificationTransportRequest; +} + +export interface EventsTransportsUsedByListRequest { + uuid: string; +} + +/** + * + */ +export class EventsApi extends runtime.BaseAPI { + + /** + * Creates request options for eventsEventsActionsList without sending the request + */ + async eventsEventsActionsListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/actions/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all actions + */ + async eventsEventsActionsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.eventsEventsActionsListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all actions + */ + async eventsEventsActionsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.eventsEventsActionsListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsCreate without sending the request + */ + async eventsEventsCreateRequestOpts(requestParameters: EventsEventsCreateRequest): Promise { + if (requestParameters['eventRequest'] == null) { + throw new runtime.RequiredError( + 'eventRequest', + 'Required parameter "eventRequest" was null or undefined when calling eventsEventsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EventRequestToJSON(requestParameters['eventRequest']), + }; + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsCreateRaw(requestParameters: EventsEventsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventFromJSON(jsonValue)); + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsCreate(requestParameters: EventsEventsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsEventsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsDestroy without sending the request + */ + async eventsEventsDestroyRequestOpts(requestParameters: EventsEventsDestroyRequest): Promise { + if (requestParameters['eventUuid'] == null) { + throw new runtime.RequiredError( + 'eventUuid', + 'Required parameter "eventUuid" was null or undefined when calling eventsEventsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/{event_uuid}/`; + urlPath = urlPath.replace(`{${"event_uuid"}}`, encodeURIComponent(String(requestParameters['eventUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsDestroyRaw(requestParameters: EventsEventsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsDestroy(requestParameters: EventsEventsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.eventsEventsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for eventsEventsExportCreate without sending the request + */ + async eventsEventsExportCreateRequestOpts(requestParameters: EventsEventsExportCreateRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['action'] != null) { + queryParameters['action'] = requestParameters['action']; + } + + if (requestParameters['actions'] != null) { + queryParameters['actions'] = requestParameters['actions']; + } + + if (requestParameters['brandName'] != null) { + queryParameters['brand_name'] = requestParameters['brandName']; + } + + if (requestParameters['clientIp'] != null) { + queryParameters['client_ip'] = requestParameters['clientIp']; + } + + if (requestParameters['contextAuthorizedApp'] != null) { + queryParameters['context_authorized_app'] = requestParameters['contextAuthorizedApp']; + } + + if (requestParameters['contextModelApp'] != null) { + queryParameters['context_model_app'] = requestParameters['contextModelApp']; + } + + if (requestParameters['contextModelName'] != null) { + queryParameters['context_model_name'] = requestParameters['contextModelName']; + } + + if (requestParameters['contextModelPk'] != null) { + queryParameters['context_model_pk'] = requestParameters['contextModelPk']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/export/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Create a data export for this data type. Note that the export is generated asynchronously: this method returns a `DataExport` object that will initially have `completed=false` as well as the permanent URL to that object in the `Location` header. You can poll that URL until `completed=true`, at which point the `file_url` property will contain a URL to download + */ + async eventsEventsExportCreateRaw(requestParameters: EventsEventsExportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsExportCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataExportFromJSON(jsonValue)); + } + + /** + * Create a data export for this data type. Note that the export is generated asynchronously: this method returns a `DataExport` object that will initially have `completed=false` as well as the permanent URL to that object in the `Location` header. You can poll that URL until `completed=true`, at which point the `file_url` property will contain a URL to download + */ + async eventsEventsExportCreate(requestParameters: EventsEventsExportCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsEventsExportCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsList without sending the request + */ + async eventsEventsListRequestOpts(requestParameters: EventsEventsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['action'] != null) { + queryParameters['action'] = requestParameters['action']; + } + + if (requestParameters['actions'] != null) { + queryParameters['actions'] = requestParameters['actions']; + } + + if (requestParameters['brandName'] != null) { + queryParameters['brand_name'] = requestParameters['brandName']; + } + + if (requestParameters['clientIp'] != null) { + queryParameters['client_ip'] = requestParameters['clientIp']; + } + + if (requestParameters['contextAuthorizedApp'] != null) { + queryParameters['context_authorized_app'] = requestParameters['contextAuthorizedApp']; + } + + if (requestParameters['contextModelApp'] != null) { + queryParameters['context_model_app'] = requestParameters['contextModelApp']; + } + + if (requestParameters['contextModelName'] != null) { + queryParameters['context_model_name'] = requestParameters['contextModelName']; + } + + if (requestParameters['contextModelPk'] != null) { + queryParameters['context_model_pk'] = requestParameters['contextModelPk']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsListRaw(requestParameters: EventsEventsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEventListFromJSON(jsonValue)); + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsList(requestParameters: EventsEventsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsEventsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsPartialUpdate without sending the request + */ + async eventsEventsPartialUpdateRequestOpts(requestParameters: EventsEventsPartialUpdateRequest): Promise { + if (requestParameters['eventUuid'] == null) { + throw new runtime.RequiredError( + 'eventUuid', + 'Required parameter "eventUuid" was null or undefined when calling eventsEventsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/{event_uuid}/`; + urlPath = urlPath.replace(`{${"event_uuid"}}`, encodeURIComponent(String(requestParameters['eventUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEventRequestToJSON(requestParameters['patchedEventRequest']), + }; + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsPartialUpdateRaw(requestParameters: EventsEventsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventFromJSON(jsonValue)); + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsPartialUpdate(requestParameters: EventsEventsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsEventsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsRetrieve without sending the request + */ + async eventsEventsRetrieveRequestOpts(requestParameters: EventsEventsRetrieveRequest): Promise { + if (requestParameters['eventUuid'] == null) { + throw new runtime.RequiredError( + 'eventUuid', + 'Required parameter "eventUuid" was null or undefined when calling eventsEventsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/{event_uuid}/`; + urlPath = urlPath.replace(`{${"event_uuid"}}`, encodeURIComponent(String(requestParameters['eventUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsRetrieveRaw(requestParameters: EventsEventsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventFromJSON(jsonValue)); + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsRetrieve(requestParameters: EventsEventsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsEventsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsTopPerUserList without sending the request + */ + async eventsEventsTopPerUserListRequestOpts(requestParameters: EventsEventsTopPerUserListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['action'] != null) { + queryParameters['action'] = requestParameters['action']; + } + + if (requestParameters['topN'] != null) { + queryParameters['top_n'] = requestParameters['topN']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/top_per_user/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get the top_n events grouped by user count + */ + async eventsEventsTopPerUserListRaw(requestParameters: EventsEventsTopPerUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.eventsEventsTopPerUserListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(EventTopPerUserFromJSON)); + } + + /** + * Get the top_n events grouped by user count + */ + async eventsEventsTopPerUserList(requestParameters: EventsEventsTopPerUserListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.eventsEventsTopPerUserListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsUpdate without sending the request + */ + async eventsEventsUpdateRequestOpts(requestParameters: EventsEventsUpdateRequest): Promise { + if (requestParameters['eventUuid'] == null) { + throw new runtime.RequiredError( + 'eventUuid', + 'Required parameter "eventUuid" was null or undefined when calling eventsEventsUpdate().' + ); + } + + if (requestParameters['eventRequest'] == null) { + throw new runtime.RequiredError( + 'eventRequest', + 'Required parameter "eventRequest" was null or undefined when calling eventsEventsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/{event_uuid}/`; + urlPath = urlPath.replace(`{${"event_uuid"}}`, encodeURIComponent(String(requestParameters['eventUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EventRequestToJSON(requestParameters['eventRequest']), + }; + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsUpdateRaw(requestParameters: EventsEventsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsEventsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventFromJSON(jsonValue)); + } + + /** + * Event Read-Only Viewset + */ + async eventsEventsUpdate(requestParameters: EventsEventsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsEventsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsEventsVolumeList without sending the request + */ + async eventsEventsVolumeListRequestOpts(requestParameters: EventsEventsVolumeListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['action'] != null) { + queryParameters['action'] = requestParameters['action']; + } + + if (requestParameters['actions'] != null) { + queryParameters['actions'] = requestParameters['actions']; + } + + if (requestParameters['brandName'] != null) { + queryParameters['brand_name'] = requestParameters['brandName']; + } + + if (requestParameters['clientIp'] != null) { + queryParameters['client_ip'] = requestParameters['clientIp']; + } + + if (requestParameters['contextAuthorizedApp'] != null) { + queryParameters['context_authorized_app'] = requestParameters['contextAuthorizedApp']; + } + + if (requestParameters['contextModelApp'] != null) { + queryParameters['context_model_app'] = requestParameters['contextModelApp']; + } + + if (requestParameters['contextModelName'] != null) { + queryParameters['context_model_name'] = requestParameters['contextModelName']; + } + + if (requestParameters['contextModelPk'] != null) { + queryParameters['context_model_pk'] = requestParameters['contextModelPk']; + } + + if (requestParameters['historyDays'] != null) { + queryParameters['history_days'] = requestParameters['historyDays']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/events/volume/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get event volume for specified filters and timeframe + */ + async eventsEventsVolumeListRaw(requestParameters: EventsEventsVolumeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.eventsEventsVolumeListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(EventVolumeFromJSON)); + } + + /** + * Get event volume for specified filters and timeframe + */ + async eventsEventsVolumeList(requestParameters: EventsEventsVolumeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.eventsEventsVolumeListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsNotificationsDestroy without sending the request + */ + async eventsNotificationsDestroyRequestOpts(requestParameters: EventsNotificationsDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsNotificationsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Notification Viewset + */ + async eventsNotificationsDestroyRaw(requestParameters: EventsNotificationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsNotificationsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Notification Viewset + */ + async eventsNotificationsDestroy(requestParameters: EventsNotificationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.eventsNotificationsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for eventsNotificationsList without sending the request + */ + async eventsNotificationsListRequestOpts(requestParameters: EventsNotificationsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['body'] != null) { + queryParameters['body'] = requestParameters['body']; + } + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['event'] != null) { + queryParameters['event'] = requestParameters['event']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['seen'] != null) { + queryParameters['seen'] = requestParameters['seen']; + } + + if (requestParameters['severity'] != null) { + queryParameters['severity'] = requestParameters['severity']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Notification Viewset + */ + async eventsNotificationsListRaw(requestParameters: EventsNotificationsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsNotificationsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedNotificationListFromJSON(jsonValue)); + } + + /** + * Notification Viewset + */ + async eventsNotificationsList(requestParameters: EventsNotificationsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsNotificationsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsNotificationsMarkAllSeenCreate without sending the request + */ + async eventsNotificationsMarkAllSeenCreateRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/mark_all_seen/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mark all the user\'s notifications as seen + */ + async eventsNotificationsMarkAllSeenCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsNotificationsMarkAllSeenCreateRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Mark all the user\'s notifications as seen + */ + async eventsNotificationsMarkAllSeenCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.eventsNotificationsMarkAllSeenCreateRaw(initOverrides); + } + + /** + * Creates request options for eventsNotificationsPartialUpdate without sending the request + */ + async eventsNotificationsPartialUpdateRequestOpts(requestParameters: EventsNotificationsPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsNotificationsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedNotificationRequestToJSON(requestParameters['patchedNotificationRequest']), + }; + } + + /** + * Notification Viewset + */ + async eventsNotificationsPartialUpdateRaw(requestParameters: EventsNotificationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsNotificationsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue)); + } + + /** + * Notification Viewset + */ + async eventsNotificationsPartialUpdate(requestParameters: EventsNotificationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsNotificationsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsNotificationsRetrieve without sending the request + */ + async eventsNotificationsRetrieveRequestOpts(requestParameters: EventsNotificationsRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsNotificationsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Notification Viewset + */ + async eventsNotificationsRetrieveRaw(requestParameters: EventsNotificationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsNotificationsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue)); + } + + /** + * Notification Viewset + */ + async eventsNotificationsRetrieve(requestParameters: EventsNotificationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsNotificationsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsNotificationsUpdate without sending the request + */ + async eventsNotificationsUpdateRequestOpts(requestParameters: EventsNotificationsUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsNotificationsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: NotificationRequestToJSON(requestParameters['notificationRequest']), + }; + } + + /** + * Notification Viewset + */ + async eventsNotificationsUpdateRaw(requestParameters: EventsNotificationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsNotificationsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue)); + } + + /** + * Notification Viewset + */ + async eventsNotificationsUpdate(requestParameters: EventsNotificationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsNotificationsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsNotificationsUsedByList without sending the request + */ + async eventsNotificationsUsedByListRequestOpts(requestParameters: EventsNotificationsUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsNotificationsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/notifications/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async eventsNotificationsUsedByListRaw(requestParameters: EventsNotificationsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.eventsNotificationsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async eventsNotificationsUsedByList(requestParameters: EventsNotificationsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.eventsNotificationsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsRulesCreate without sending the request + */ + async eventsRulesCreateRequestOpts(requestParameters: EventsRulesCreateRequest): Promise { + if (requestParameters['notificationRuleRequest'] == null) { + throw new runtime.RequiredError( + 'notificationRuleRequest', + 'Required parameter "notificationRuleRequest" was null or undefined when calling eventsRulesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NotificationRuleRequestToJSON(requestParameters['notificationRuleRequest']), + }; + } + + /** + * NotificationRule Viewset + */ + async eventsRulesCreateRaw(requestParameters: EventsRulesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsRulesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationRuleFromJSON(jsonValue)); + } + + /** + * NotificationRule Viewset + */ + async eventsRulesCreate(requestParameters: EventsRulesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsRulesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsRulesDestroy without sending the request + */ + async eventsRulesDestroyRequestOpts(requestParameters: EventsRulesDestroyRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling eventsRulesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationRule Viewset + */ + async eventsRulesDestroyRaw(requestParameters: EventsRulesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsRulesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * NotificationRule Viewset + */ + async eventsRulesDestroy(requestParameters: EventsRulesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.eventsRulesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for eventsRulesList without sending the request + */ + async eventsRulesListRequestOpts(requestParameters: EventsRulesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['destinationGroupName'] != null) { + queryParameters['destination_group__name'] = requestParameters['destinationGroupName']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['severity'] != null) { + queryParameters['severity'] = requestParameters['severity']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationRule Viewset + */ + async eventsRulesListRaw(requestParameters: EventsRulesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsRulesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedNotificationRuleListFromJSON(jsonValue)); + } + + /** + * NotificationRule Viewset + */ + async eventsRulesList(requestParameters: EventsRulesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsRulesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsRulesPartialUpdate without sending the request + */ + async eventsRulesPartialUpdateRequestOpts(requestParameters: EventsRulesPartialUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling eventsRulesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedNotificationRuleRequestToJSON(requestParameters['patchedNotificationRuleRequest']), + }; + } + + /** + * NotificationRule Viewset + */ + async eventsRulesPartialUpdateRaw(requestParameters: EventsRulesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsRulesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationRuleFromJSON(jsonValue)); + } + + /** + * NotificationRule Viewset + */ + async eventsRulesPartialUpdate(requestParameters: EventsRulesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsRulesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsRulesRetrieve without sending the request + */ + async eventsRulesRetrieveRequestOpts(requestParameters: EventsRulesRetrieveRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling eventsRulesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationRule Viewset + */ + async eventsRulesRetrieveRaw(requestParameters: EventsRulesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsRulesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationRuleFromJSON(jsonValue)); + } + + /** + * NotificationRule Viewset + */ + async eventsRulesRetrieve(requestParameters: EventsRulesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsRulesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsRulesUpdate without sending the request + */ + async eventsRulesUpdateRequestOpts(requestParameters: EventsRulesUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling eventsRulesUpdate().' + ); + } + + if (requestParameters['notificationRuleRequest'] == null) { + throw new runtime.RequiredError( + 'notificationRuleRequest', + 'Required parameter "notificationRuleRequest" was null or undefined when calling eventsRulesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: NotificationRuleRequestToJSON(requestParameters['notificationRuleRequest']), + }; + } + + /** + * NotificationRule Viewset + */ + async eventsRulesUpdateRaw(requestParameters: EventsRulesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsRulesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationRuleFromJSON(jsonValue)); + } + + /** + * NotificationRule Viewset + */ + async eventsRulesUpdate(requestParameters: EventsRulesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsRulesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsRulesUsedByList without sending the request + */ + async eventsRulesUsedByListRequestOpts(requestParameters: EventsRulesUsedByListRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling eventsRulesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/rules/{pbm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async eventsRulesUsedByListRaw(requestParameters: EventsRulesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.eventsRulesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async eventsRulesUsedByList(requestParameters: EventsRulesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.eventsRulesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsCreate without sending the request + */ + async eventsTransportsCreateRequestOpts(requestParameters: EventsTransportsCreateRequest): Promise { + if (requestParameters['notificationTransportRequest'] == null) { + throw new runtime.RequiredError( + 'notificationTransportRequest', + 'Required parameter "notificationTransportRequest" was null or undefined when calling eventsTransportsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NotificationTransportRequestToJSON(requestParameters['notificationTransportRequest']), + }; + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsCreateRaw(requestParameters: EventsTransportsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTransportFromJSON(jsonValue)); + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsCreate(requestParameters: EventsTransportsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsTransportsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsDestroy without sending the request + */ + async eventsTransportsDestroyRequestOpts(requestParameters: EventsTransportsDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsTransportsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsDestroyRaw(requestParameters: EventsTransportsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsDestroy(requestParameters: EventsTransportsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.eventsTransportsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for eventsTransportsList without sending the request + */ + async eventsTransportsListRequestOpts(requestParameters: EventsTransportsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['mode'] != null) { + queryParameters['mode'] = requestParameters['mode']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sendOnce'] != null) { + queryParameters['send_once'] = requestParameters['sendOnce']; + } + + if (requestParameters['webhookUrl'] != null) { + queryParameters['webhook_url'] = requestParameters['webhookUrl']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsListRaw(requestParameters: EventsTransportsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedNotificationTransportListFromJSON(jsonValue)); + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsList(requestParameters: EventsTransportsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsTransportsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsPartialUpdate without sending the request + */ + async eventsTransportsPartialUpdateRequestOpts(requestParameters: EventsTransportsPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsTransportsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedNotificationTransportRequestToJSON(requestParameters['patchedNotificationTransportRequest']), + }; + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsPartialUpdateRaw(requestParameters: EventsTransportsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTransportFromJSON(jsonValue)); + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsPartialUpdate(requestParameters: EventsTransportsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsTransportsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsRetrieve without sending the request + */ + async eventsTransportsRetrieveRequestOpts(requestParameters: EventsTransportsRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsTransportsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsRetrieveRaw(requestParameters: EventsTransportsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTransportFromJSON(jsonValue)); + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsRetrieve(requestParameters: EventsTransportsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsTransportsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsTestCreate without sending the request + */ + async eventsTransportsTestCreateRequestOpts(requestParameters: EventsTransportsTestCreateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsTransportsTestCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/{uuid}/test/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Send example notification using selected transport. Requires Modify permissions. + */ + async eventsTransportsTestCreateRaw(requestParameters: EventsTransportsTestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsTestCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTransportTestFromJSON(jsonValue)); + } + + /** + * Send example notification using selected transport. Requires Modify permissions. + */ + async eventsTransportsTestCreate(requestParameters: EventsTransportsTestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsTransportsTestCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsUpdate without sending the request + */ + async eventsTransportsUpdateRequestOpts(requestParameters: EventsTransportsUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsTransportsUpdate().' + ); + } + + if (requestParameters['notificationTransportRequest'] == null) { + throw new runtime.RequiredError( + 'notificationTransportRequest', + 'Required parameter "notificationTransportRequest" was null or undefined when calling eventsTransportsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: NotificationTransportRequestToJSON(requestParameters['notificationTransportRequest']), + }; + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsUpdateRaw(requestParameters: EventsTransportsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.eventsTransportsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTransportFromJSON(jsonValue)); + } + + /** + * NotificationTransport Viewset + */ + async eventsTransportsUpdate(requestParameters: EventsTransportsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.eventsTransportsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for eventsTransportsUsedByList without sending the request + */ + async eventsTransportsUsedByListRequestOpts(requestParameters: EventsTransportsUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling eventsTransportsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/events/transports/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async eventsTransportsUsedByListRaw(requestParameters: EventsTransportsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.eventsTransportsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async eventsTransportsUsedByList(requestParameters: EventsTransportsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.eventsTransportsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const EventsEventsExportCreateActionsEnum = { + AuthorizeApplication: 'authorize_application', + ConfigurationError: 'configuration_error', + ConfigurationWarning: 'configuration_warning', + Custom: 'custom_', + EmailSent: 'email_sent', + ExportReady: 'export_ready', + FlowExecution: 'flow_execution', + ImpersonationEnded: 'impersonation_ended', + ImpersonationStarted: 'impersonation_started', + InvitationUsed: 'invitation_used', + Login: 'login', + LoginFailed: 'login_failed', + Logout: 'logout', + ModelCreated: 'model_created', + ModelDeleted: 'model_deleted', + ModelUpdated: 'model_updated', + PasswordSet: 'password_set', + PolicyException: 'policy_exception', + PolicyExecution: 'policy_execution', + PropertyMappingException: 'property_mapping_exception', + ReviewAttested: 'review_attested', + ReviewCompleted: 'review_completed', + ReviewInitiated: 'review_initiated', + ReviewOverdue: 'review_overdue', + SecretRotate: 'secret_rotate', + SecretView: 'secret_view', + SourceLinked: 'source_linked', + SuspiciousRequest: 'suspicious_request', + SystemException: 'system_exception', + SystemTaskException: 'system_task_exception', + SystemTaskExecution: 'system_task_execution', + UpdateAvailable: 'update_available', + UserWrite: 'user_write', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsEventsExportCreateActionsEnum = typeof EventsEventsExportCreateActionsEnum[keyof typeof EventsEventsExportCreateActionsEnum]; +/** + * @export + */ +export const EventsEventsListActionsEnum = { + AuthorizeApplication: 'authorize_application', + ConfigurationError: 'configuration_error', + ConfigurationWarning: 'configuration_warning', + Custom: 'custom_', + EmailSent: 'email_sent', + ExportReady: 'export_ready', + FlowExecution: 'flow_execution', + ImpersonationEnded: 'impersonation_ended', + ImpersonationStarted: 'impersonation_started', + InvitationUsed: 'invitation_used', + Login: 'login', + LoginFailed: 'login_failed', + Logout: 'logout', + ModelCreated: 'model_created', + ModelDeleted: 'model_deleted', + ModelUpdated: 'model_updated', + PasswordSet: 'password_set', + PolicyException: 'policy_exception', + PolicyExecution: 'policy_execution', + PropertyMappingException: 'property_mapping_exception', + ReviewAttested: 'review_attested', + ReviewCompleted: 'review_completed', + ReviewInitiated: 'review_initiated', + ReviewOverdue: 'review_overdue', + SecretRotate: 'secret_rotate', + SecretView: 'secret_view', + SourceLinked: 'source_linked', + SuspiciousRequest: 'suspicious_request', + SystemException: 'system_exception', + SystemTaskException: 'system_task_exception', + SystemTaskExecution: 'system_task_execution', + UpdateAvailable: 'update_available', + UserWrite: 'user_write', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsEventsListActionsEnum = typeof EventsEventsListActionsEnum[keyof typeof EventsEventsListActionsEnum]; +/** + * @export + */ +export const EventsEventsVolumeListActionsEnum = { + AuthorizeApplication: 'authorize_application', + ConfigurationError: 'configuration_error', + ConfigurationWarning: 'configuration_warning', + Custom: 'custom_', + EmailSent: 'email_sent', + ExportReady: 'export_ready', + FlowExecution: 'flow_execution', + ImpersonationEnded: 'impersonation_ended', + ImpersonationStarted: 'impersonation_started', + InvitationUsed: 'invitation_used', + Login: 'login', + LoginFailed: 'login_failed', + Logout: 'logout', + ModelCreated: 'model_created', + ModelDeleted: 'model_deleted', + ModelUpdated: 'model_updated', + PasswordSet: 'password_set', + PolicyException: 'policy_exception', + PolicyExecution: 'policy_execution', + PropertyMappingException: 'property_mapping_exception', + ReviewAttested: 'review_attested', + ReviewCompleted: 'review_completed', + ReviewInitiated: 'review_initiated', + ReviewOverdue: 'review_overdue', + SecretRotate: 'secret_rotate', + SecretView: 'secret_view', + SourceLinked: 'source_linked', + SuspiciousRequest: 'suspicious_request', + SystemException: 'system_exception', + SystemTaskException: 'system_task_exception', + SystemTaskExecution: 'system_task_execution', + UpdateAvailable: 'update_available', + UserWrite: 'user_write', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsEventsVolumeListActionsEnum = typeof EventsEventsVolumeListActionsEnum[keyof typeof EventsEventsVolumeListActionsEnum]; +/** + * @export + */ +export const EventsNotificationsListSeverityEnum = { + Alert: 'alert', + Notice: 'notice', + Warning: 'warning', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsNotificationsListSeverityEnum = typeof EventsNotificationsListSeverityEnum[keyof typeof EventsNotificationsListSeverityEnum]; +/** + * @export + */ +export const EventsRulesListSeverityEnum = { + Alert: 'alert', + Notice: 'notice', + Warning: 'warning', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsRulesListSeverityEnum = typeof EventsRulesListSeverityEnum[keyof typeof EventsRulesListSeverityEnum]; +/** + * @export + */ +export const EventsTransportsListModeEnum = { + Email: 'email', + Local: 'local', + Webhook: 'webhook', + WebhookSlack: 'webhook_slack', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsTransportsListModeEnum = typeof EventsTransportsListModeEnum[keyof typeof EventsTransportsListModeEnum]; diff --git a/packages/client-ts/src/apis/FlowsApi.ts b/packages/client-ts/src/apis/FlowsApi.ts new file mode 100644 index 0000000000..4a27853fe6 --- /dev/null +++ b/packages/client-ts/src/apis/FlowsApi.ts @@ -0,0 +1,1586 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Cache, + ChallengeTypes, + Flow, + FlowChallengeResponseRequest, + FlowDiagram, + FlowImportResult, + FlowInspection, + FlowRequest, + FlowStageBinding, + FlowStageBindingRequest, + GenericError, + Link, + PaginatedFlowList, + PaginatedFlowStageBindingList, + PatchedFlowRequest, + PatchedFlowStageBindingRequest, + UsedBy, + ValidationError, +} from '../models/index'; +import { + CacheFromJSON, + CacheToJSON, + ChallengeTypesFromJSON, + ChallengeTypesToJSON, + FlowFromJSON, + FlowToJSON, + FlowChallengeResponseRequestFromJSON, + FlowChallengeResponseRequestToJSON, + FlowDiagramFromJSON, + FlowDiagramToJSON, + FlowImportResultFromJSON, + FlowImportResultToJSON, + FlowInspectionFromJSON, + FlowInspectionToJSON, + FlowRequestFromJSON, + FlowRequestToJSON, + FlowStageBindingFromJSON, + FlowStageBindingToJSON, + FlowStageBindingRequestFromJSON, + FlowStageBindingRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + LinkFromJSON, + LinkToJSON, + PaginatedFlowListFromJSON, + PaginatedFlowListToJSON, + PaginatedFlowStageBindingListFromJSON, + PaginatedFlowStageBindingListToJSON, + PatchedFlowRequestFromJSON, + PatchedFlowRequestToJSON, + PatchedFlowStageBindingRequestFromJSON, + PatchedFlowStageBindingRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface FlowsBindingsCreateRequest { + flowStageBindingRequest: FlowStageBindingRequest; +} + +export interface FlowsBindingsDestroyRequest { + fsbUuid: string; +} + +export interface FlowsBindingsListRequest { + evaluateOnPlan?: boolean; + fsbUuid?: string; + invalidResponseAction?: FlowsBindingsListInvalidResponseActionEnum; + order?: number; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + policies?: Array; + policyEngineMode?: FlowsBindingsListPolicyEngineModeEnum; + reEvaluatePolicies?: boolean; + search?: string; + stage?: string; + target?: string; +} + +export interface FlowsBindingsPartialUpdateRequest { + fsbUuid: string; + patchedFlowStageBindingRequest?: PatchedFlowStageBindingRequest; +} + +export interface FlowsBindingsRetrieveRequest { + fsbUuid: string; +} + +export interface FlowsBindingsUpdateRequest { + fsbUuid: string; + flowStageBindingRequest: FlowStageBindingRequest; +} + +export interface FlowsBindingsUsedByListRequest { + fsbUuid: string; +} + +export interface FlowsExecutorGetRequest { + flowSlug: string; + query: string; +} + +export interface FlowsExecutorSolveRequest { + flowSlug: string; + query: string; + flowChallengeResponseRequest?: FlowChallengeResponseRequest; +} + +export interface FlowsInspectorGetRequest { + flowSlug: string; +} + +export interface FlowsInstancesCreateRequest { + flowRequest: FlowRequest; +} + +export interface FlowsInstancesDestroyRequest { + slug: string; +} + +export interface FlowsInstancesDiagramRetrieveRequest { + slug: string; +} + +export interface FlowsInstancesExecuteRetrieveRequest { + slug: string; +} + +export interface FlowsInstancesExportRetrieveRequest { + slug: string; +} + +export interface FlowsInstancesImportCreateRequest { + file?: Blob; + clear?: boolean; +} + +export interface FlowsInstancesListRequest { + deniedAction?: FlowsInstancesListDeniedActionEnum; + designation?: FlowsInstancesListDesignationEnum; + flowUuid?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + slug?: string; +} + +export interface FlowsInstancesPartialUpdateRequest { + slug: string; + patchedFlowRequest?: PatchedFlowRequest; +} + +export interface FlowsInstancesRetrieveRequest { + slug: string; +} + +export interface FlowsInstancesUpdateRequest { + slug: string; + flowRequest: FlowRequest; +} + +export interface FlowsInstancesUsedByListRequest { + slug: string; +} + +/** + * + */ +export class FlowsApi extends runtime.BaseAPI { + + /** + * Creates request options for flowsBindingsCreate without sending the request + */ + async flowsBindingsCreateRequestOpts(requestParameters: FlowsBindingsCreateRequest): Promise { + if (requestParameters['flowStageBindingRequest'] == null) { + throw new runtime.RequiredError( + 'flowStageBindingRequest', + 'Required parameter "flowStageBindingRequest" was null or undefined when calling flowsBindingsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: FlowStageBindingRequestToJSON(requestParameters['flowStageBindingRequest']), + }; + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsCreateRaw(requestParameters: FlowsBindingsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsBindingsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowStageBindingFromJSON(jsonValue)); + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsCreate(requestParameters: FlowsBindingsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsBindingsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsBindingsDestroy without sending the request + */ + async flowsBindingsDestroyRequestOpts(requestParameters: FlowsBindingsDestroyRequest): Promise { + if (requestParameters['fsbUuid'] == null) { + throw new runtime.RequiredError( + 'fsbUuid', + 'Required parameter "fsbUuid" was null or undefined when calling flowsBindingsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/{fsb_uuid}/`; + urlPath = urlPath.replace(`{${"fsb_uuid"}}`, encodeURIComponent(String(requestParameters['fsbUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsDestroyRaw(requestParameters: FlowsBindingsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsBindingsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsDestroy(requestParameters: FlowsBindingsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.flowsBindingsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for flowsBindingsList without sending the request + */ + async flowsBindingsListRequestOpts(requestParameters: FlowsBindingsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['evaluateOnPlan'] != null) { + queryParameters['evaluate_on_plan'] = requestParameters['evaluateOnPlan']; + } + + if (requestParameters['fsbUuid'] != null) { + queryParameters['fsb_uuid'] = requestParameters['fsbUuid']; + } + + if (requestParameters['invalidResponseAction'] != null) { + queryParameters['invalid_response_action'] = requestParameters['invalidResponseAction']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['policies'] != null) { + queryParameters['policies'] = requestParameters['policies']; + } + + if (requestParameters['policyEngineMode'] != null) { + queryParameters['policy_engine_mode'] = requestParameters['policyEngineMode']; + } + + if (requestParameters['reEvaluatePolicies'] != null) { + queryParameters['re_evaluate_policies'] = requestParameters['reEvaluatePolicies']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stage'] != null) { + queryParameters['stage'] = requestParameters['stage']; + } + + if (requestParameters['target'] != null) { + queryParameters['target'] = requestParameters['target']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsListRaw(requestParameters: FlowsBindingsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsBindingsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedFlowStageBindingListFromJSON(jsonValue)); + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsList(requestParameters: FlowsBindingsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsBindingsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsBindingsPartialUpdate without sending the request + */ + async flowsBindingsPartialUpdateRequestOpts(requestParameters: FlowsBindingsPartialUpdateRequest): Promise { + if (requestParameters['fsbUuid'] == null) { + throw new runtime.RequiredError( + 'fsbUuid', + 'Required parameter "fsbUuid" was null or undefined when calling flowsBindingsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/{fsb_uuid}/`; + urlPath = urlPath.replace(`{${"fsb_uuid"}}`, encodeURIComponent(String(requestParameters['fsbUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedFlowStageBindingRequestToJSON(requestParameters['patchedFlowStageBindingRequest']), + }; + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsPartialUpdateRaw(requestParameters: FlowsBindingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsBindingsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowStageBindingFromJSON(jsonValue)); + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsPartialUpdate(requestParameters: FlowsBindingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsBindingsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsBindingsRetrieve without sending the request + */ + async flowsBindingsRetrieveRequestOpts(requestParameters: FlowsBindingsRetrieveRequest): Promise { + if (requestParameters['fsbUuid'] == null) { + throw new runtime.RequiredError( + 'fsbUuid', + 'Required parameter "fsbUuid" was null or undefined when calling flowsBindingsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/{fsb_uuid}/`; + urlPath = urlPath.replace(`{${"fsb_uuid"}}`, encodeURIComponent(String(requestParameters['fsbUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsRetrieveRaw(requestParameters: FlowsBindingsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsBindingsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowStageBindingFromJSON(jsonValue)); + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsRetrieve(requestParameters: FlowsBindingsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsBindingsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsBindingsUpdate without sending the request + */ + async flowsBindingsUpdateRequestOpts(requestParameters: FlowsBindingsUpdateRequest): Promise { + if (requestParameters['fsbUuid'] == null) { + throw new runtime.RequiredError( + 'fsbUuid', + 'Required parameter "fsbUuid" was null or undefined when calling flowsBindingsUpdate().' + ); + } + + if (requestParameters['flowStageBindingRequest'] == null) { + throw new runtime.RequiredError( + 'flowStageBindingRequest', + 'Required parameter "flowStageBindingRequest" was null or undefined when calling flowsBindingsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/{fsb_uuid}/`; + urlPath = urlPath.replace(`{${"fsb_uuid"}}`, encodeURIComponent(String(requestParameters['fsbUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: FlowStageBindingRequestToJSON(requestParameters['flowStageBindingRequest']), + }; + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsUpdateRaw(requestParameters: FlowsBindingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsBindingsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowStageBindingFromJSON(jsonValue)); + } + + /** + * FlowStageBinding Viewset + */ + async flowsBindingsUpdate(requestParameters: FlowsBindingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsBindingsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsBindingsUsedByList without sending the request + */ + async flowsBindingsUsedByListRequestOpts(requestParameters: FlowsBindingsUsedByListRequest): Promise { + if (requestParameters['fsbUuid'] == null) { + throw new runtime.RequiredError( + 'fsbUuid', + 'Required parameter "fsbUuid" was null or undefined when calling flowsBindingsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/bindings/{fsb_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"fsb_uuid"}}`, encodeURIComponent(String(requestParameters['fsbUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async flowsBindingsUsedByListRaw(requestParameters: FlowsBindingsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.flowsBindingsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async flowsBindingsUsedByList(requestParameters: FlowsBindingsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.flowsBindingsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsExecutorGet without sending the request + */ + async flowsExecutorGetRequestOpts(requestParameters: FlowsExecutorGetRequest): Promise { + if (requestParameters['flowSlug'] == null) { + throw new runtime.RequiredError( + 'flowSlug', + 'Required parameter "flowSlug" was null or undefined when calling flowsExecutorGet().' + ); + } + + if (requestParameters['query'] == null) { + throw new runtime.RequiredError( + 'query', + 'Required parameter "query" was null or undefined when calling flowsExecutorGet().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/executor/{flow_slug}/`; + urlPath = urlPath.replace(`{${"flow_slug"}}`, encodeURIComponent(String(requestParameters['flowSlug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get the next pending challenge from the currently active flow. + */ + async flowsExecutorGetRaw(requestParameters: FlowsExecutorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsExecutorGetRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ChallengeTypesFromJSON(jsonValue)); + } + + /** + * Get the next pending challenge from the currently active flow. + */ + async flowsExecutorGet(requestParameters: FlowsExecutorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsExecutorGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsExecutorSolve without sending the request + */ + async flowsExecutorSolveRequestOpts(requestParameters: FlowsExecutorSolveRequest): Promise { + if (requestParameters['flowSlug'] == null) { + throw new runtime.RequiredError( + 'flowSlug', + 'Required parameter "flowSlug" was null or undefined when calling flowsExecutorSolve().' + ); + } + + if (requestParameters['query'] == null) { + throw new runtime.RequiredError( + 'query', + 'Required parameter "query" was null or undefined when calling flowsExecutorSolve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['query'] != null) { + queryParameters['query'] = requestParameters['query']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/executor/{flow_slug}/`; + urlPath = urlPath.replace(`{${"flow_slug"}}`, encodeURIComponent(String(requestParameters['flowSlug']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: FlowChallengeResponseRequestToJSON(requestParameters['flowChallengeResponseRequest']), + }; + } + + /** + * Solve the previously retrieved challenge and advanced to the next stage. + */ + async flowsExecutorSolveRaw(requestParameters: FlowsExecutorSolveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsExecutorSolveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ChallengeTypesFromJSON(jsonValue)); + } + + /** + * Solve the previously retrieved challenge and advanced to the next stage. + */ + async flowsExecutorSolve(requestParameters: FlowsExecutorSolveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsExecutorSolveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInspectorGet without sending the request + */ + async flowsInspectorGetRequestOpts(requestParameters: FlowsInspectorGetRequest): Promise { + if (requestParameters['flowSlug'] == null) { + throw new runtime.RequiredError( + 'flowSlug', + 'Required parameter "flowSlug" was null or undefined when calling flowsInspectorGet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/inspector/{flow_slug}/`; + urlPath = urlPath.replace(`{${"flow_slug"}}`, encodeURIComponent(String(requestParameters['flowSlug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get current flow state and record it + */ + async flowsInspectorGetRaw(requestParameters: FlowsInspectorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInspectorGetRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowInspectionFromJSON(jsonValue)); + } + + /** + * Get current flow state and record it + */ + async flowsInspectorGet(requestParameters: FlowsInspectorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInspectorGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesCacheClearCreate without sending the request + */ + async flowsInstancesCacheClearCreateRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/cache_clear/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Clear flow cache + */ + async flowsInstancesCacheClearCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesCacheClearCreateRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Clear flow cache + */ + async flowsInstancesCacheClearCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.flowsInstancesCacheClearCreateRaw(initOverrides); + } + + /** + * Creates request options for flowsInstancesCacheInfoRetrieve without sending the request + */ + async flowsInstancesCacheInfoRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/cache_info/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Info about cached flows + */ + async flowsInstancesCacheInfoRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesCacheInfoRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CacheFromJSON(jsonValue)); + } + + /** + * Info about cached flows + */ + async flowsInstancesCacheInfoRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesCacheInfoRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesCreate without sending the request + */ + async flowsInstancesCreateRequestOpts(requestParameters: FlowsInstancesCreateRequest): Promise { + if (requestParameters['flowRequest'] == null) { + throw new runtime.RequiredError( + 'flowRequest', + 'Required parameter "flowRequest" was null or undefined when calling flowsInstancesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: FlowRequestToJSON(requestParameters['flowRequest']), + }; + } + + /** + * Flow Viewset + */ + async flowsInstancesCreateRaw(requestParameters: FlowsInstancesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowFromJSON(jsonValue)); + } + + /** + * Flow Viewset + */ + async flowsInstancesCreate(requestParameters: FlowsInstancesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesDestroy without sending the request + */ + async flowsInstancesDestroyRequestOpts(requestParameters: FlowsInstancesDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Flow Viewset + */ + async flowsInstancesDestroyRaw(requestParameters: FlowsInstancesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Flow Viewset + */ + async flowsInstancesDestroy(requestParameters: FlowsInstancesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.flowsInstancesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for flowsInstancesDiagramRetrieve without sending the request + */ + async flowsInstancesDiagramRetrieveRequestOpts(requestParameters: FlowsInstancesDiagramRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesDiagramRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/diagram/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return diagram for flow with slug `slug`, in the format used by flowchart.js + */ + async flowsInstancesDiagramRetrieveRaw(requestParameters: FlowsInstancesDiagramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesDiagramRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowDiagramFromJSON(jsonValue)); + } + + /** + * Return diagram for flow with slug `slug`, in the format used by flowchart.js + */ + async flowsInstancesDiagramRetrieve(requestParameters: FlowsInstancesDiagramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesDiagramRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesExecuteRetrieve without sending the request + */ + async flowsInstancesExecuteRetrieveRequestOpts(requestParameters: FlowsInstancesExecuteRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesExecuteRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/execute/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Execute flow for current user + */ + async flowsInstancesExecuteRetrieveRaw(requestParameters: FlowsInstancesExecuteRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesExecuteRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LinkFromJSON(jsonValue)); + } + + /** + * Execute flow for current user + */ + async flowsInstancesExecuteRetrieve(requestParameters: FlowsInstancesExecuteRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesExecuteRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesExportRetrieve without sending the request + */ + async flowsInstancesExportRetrieveRequestOpts(requestParameters: FlowsInstancesExportRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesExportRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/export/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Export flow to .yaml file + */ + async flowsInstancesExportRetrieveRaw(requestParameters: FlowsInstancesExportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesExportRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Export flow to .yaml file + */ + async flowsInstancesExportRetrieve(requestParameters: FlowsInstancesExportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesExportRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesImportCreate without sending the request + */ + async flowsInstancesImportCreateRequestOpts(requestParameters: FlowsInstancesImportCreateRequest): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['file'] != null) { + formParams.append('file', requestParameters['file'] as any); + } + + if (requestParameters['clear'] != null) { + formParams.append('clear', requestParameters['clear'] as any); + } + + + let urlPath = `/flows/instances/import/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Import flow from .yaml file + */ + async flowsInstancesImportCreateRaw(requestParameters: FlowsInstancesImportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesImportCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowImportResultFromJSON(jsonValue)); + } + + /** + * Import flow from .yaml file + */ + async flowsInstancesImportCreate(requestParameters: FlowsInstancesImportCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesImportCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesList without sending the request + */ + async flowsInstancesListRequestOpts(requestParameters: FlowsInstancesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['deniedAction'] != null) { + queryParameters['denied_action'] = requestParameters['deniedAction']; + } + + if (requestParameters['designation'] != null) { + queryParameters['designation'] = requestParameters['designation']; + } + + if (requestParameters['flowUuid'] != null) { + queryParameters['flow_uuid'] = requestParameters['flowUuid']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Flow Viewset + */ + async flowsInstancesListRaw(requestParameters: FlowsInstancesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedFlowListFromJSON(jsonValue)); + } + + /** + * Flow Viewset + */ + async flowsInstancesList(requestParameters: FlowsInstancesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesPartialUpdate without sending the request + */ + async flowsInstancesPartialUpdateRequestOpts(requestParameters: FlowsInstancesPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedFlowRequestToJSON(requestParameters['patchedFlowRequest']), + }; + } + + /** + * Flow Viewset + */ + async flowsInstancesPartialUpdateRaw(requestParameters: FlowsInstancesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowFromJSON(jsonValue)); + } + + /** + * Flow Viewset + */ + async flowsInstancesPartialUpdate(requestParameters: FlowsInstancesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesRetrieve without sending the request + */ + async flowsInstancesRetrieveRequestOpts(requestParameters: FlowsInstancesRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Flow Viewset + */ + async flowsInstancesRetrieveRaw(requestParameters: FlowsInstancesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowFromJSON(jsonValue)); + } + + /** + * Flow Viewset + */ + async flowsInstancesRetrieve(requestParameters: FlowsInstancesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesUpdate without sending the request + */ + async flowsInstancesUpdateRequestOpts(requestParameters: FlowsInstancesUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesUpdate().' + ); + } + + if (requestParameters['flowRequest'] == null) { + throw new runtime.RequiredError( + 'flowRequest', + 'Required parameter "flowRequest" was null or undefined when calling flowsInstancesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: FlowRequestToJSON(requestParameters['flowRequest']), + }; + } + + /** + * Flow Viewset + */ + async flowsInstancesUpdateRaw(requestParameters: FlowsInstancesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.flowsInstancesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FlowFromJSON(jsonValue)); + } + + /** + * Flow Viewset + */ + async flowsInstancesUpdate(requestParameters: FlowsInstancesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.flowsInstancesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for flowsInstancesUsedByList without sending the request + */ + async flowsInstancesUsedByListRequestOpts(requestParameters: FlowsInstancesUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling flowsInstancesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/flows/instances/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async flowsInstancesUsedByListRaw(requestParameters: FlowsInstancesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.flowsInstancesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async flowsInstancesUsedByList(requestParameters: FlowsInstancesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.flowsInstancesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const FlowsBindingsListInvalidResponseActionEnum = { + Restart: 'restart', + RestartWithContext: 'restart_with_context', + Retry: 'retry', + UnknownDefaultOpenApi: '11184809' +} as const; +export type FlowsBindingsListInvalidResponseActionEnum = typeof FlowsBindingsListInvalidResponseActionEnum[keyof typeof FlowsBindingsListInvalidResponseActionEnum]; +/** + * @export + */ +export const FlowsBindingsListPolicyEngineModeEnum = { + All: 'all', + Any: 'any', + UnknownDefaultOpenApi: '11184809' +} as const; +export type FlowsBindingsListPolicyEngineModeEnum = typeof FlowsBindingsListPolicyEngineModeEnum[keyof typeof FlowsBindingsListPolicyEngineModeEnum]; +/** + * @export + */ +export const FlowsInstancesListDeniedActionEnum = { + Continue: 'continue', + Message: 'message', + MessageContinue: 'message_continue', + UnknownDefaultOpenApi: '11184809' +} as const; +export type FlowsInstancesListDeniedActionEnum = typeof FlowsInstancesListDeniedActionEnum[keyof typeof FlowsInstancesListDeniedActionEnum]; +/** + * @export + */ +export const FlowsInstancesListDesignationEnum = { + Authentication: 'authentication', + Authorization: 'authorization', + Enrollment: 'enrollment', + Invalidation: 'invalidation', + Recovery: 'recovery', + StageConfiguration: 'stage_configuration', + Unenrollment: 'unenrollment', + UnknownDefaultOpenApi: '11184809' +} as const; +export type FlowsInstancesListDesignationEnum = typeof FlowsInstancesListDesignationEnum[keyof typeof FlowsInstancesListDesignationEnum]; diff --git a/packages/client-ts/src/apis/LifecycleApi.ts b/packages/client-ts/src/apis/LifecycleApi.ts new file mode 100644 index 0000000000..d12c73e78e --- /dev/null +++ b/packages/client-ts/src/apis/LifecycleApi.ts @@ -0,0 +1,679 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + LifecycleIteration, + LifecycleIterationRequest, + LifecycleRule, + LifecycleRuleRequest, + PaginatedLifecycleIterationList, + PaginatedLifecycleRuleList, + PatchedLifecycleRuleRequest, + Review, + ReviewRequest, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + LifecycleIterationFromJSON, + LifecycleIterationToJSON, + LifecycleIterationRequestFromJSON, + LifecycleIterationRequestToJSON, + LifecycleRuleFromJSON, + LifecycleRuleToJSON, + LifecycleRuleRequestFromJSON, + LifecycleRuleRequestToJSON, + PaginatedLifecycleIterationListFromJSON, + PaginatedLifecycleIterationListToJSON, + PaginatedLifecycleRuleListFromJSON, + PaginatedLifecycleRuleListToJSON, + PatchedLifecycleRuleRequestFromJSON, + PatchedLifecycleRuleRequestToJSON, + ReviewFromJSON, + ReviewToJSON, + ReviewRequestFromJSON, + ReviewRequestToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface LifecycleIterationsCreateRequest { + lifecycleIterationRequest: LifecycleIterationRequest; +} + +export interface LifecycleIterationsLatestRetrieveRequest { + contentType: string; + objectId: string; +} + +export interface LifecycleIterationsListOpenRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + userIsReviewer?: boolean; +} + +export interface LifecycleReviewsCreateRequest { + reviewRequest: ReviewRequest; +} + +export interface LifecycleRulesCreateRequest { + lifecycleRuleRequest: LifecycleRuleRequest; +} + +export interface LifecycleRulesDestroyRequest { + id: string; +} + +export interface LifecycleRulesListRequest { + contentTypeModel?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface LifecycleRulesPartialUpdateRequest { + id: string; + patchedLifecycleRuleRequest?: PatchedLifecycleRuleRequest; +} + +export interface LifecycleRulesRetrieveRequest { + id: string; +} + +export interface LifecycleRulesUpdateRequest { + id: string; + lifecycleRuleRequest: LifecycleRuleRequest; +} + +/** + * + */ +export class LifecycleApi extends runtime.BaseAPI { + + /** + * Creates request options for lifecycleIterationsCreate without sending the request + */ + async lifecycleIterationsCreateRequestOpts(requestParameters: LifecycleIterationsCreateRequest): Promise { + if (requestParameters['lifecycleIterationRequest'] == null) { + throw new runtime.RequiredError( + 'lifecycleIterationRequest', + 'Required parameter "lifecycleIterationRequest" was null or undefined when calling lifecycleIterationsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/iterations/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LifecycleIterationRequestToJSON(requestParameters['lifecycleIterationRequest']), + }; + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleIterationsCreateRaw(requestParameters: LifecycleIterationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleIterationsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LifecycleIterationFromJSON(jsonValue)); + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleIterationsCreate(requestParameters: LifecycleIterationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleIterationsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleIterationsLatestRetrieve without sending the request + */ + async lifecycleIterationsLatestRetrieveRequestOpts(requestParameters: LifecycleIterationsLatestRetrieveRequest): Promise { + if (requestParameters['contentType'] == null) { + throw new runtime.RequiredError( + 'contentType', + 'Required parameter "contentType" was null or undefined when calling lifecycleIterationsLatestRetrieve().' + ); + } + + if (requestParameters['objectId'] == null) { + throw new runtime.RequiredError( + 'objectId', + 'Required parameter "objectId" was null or undefined when calling lifecycleIterationsLatestRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/iterations/latest/{content_type}/{object_id}/`; + urlPath = urlPath.replace(`{${"content_type"}}`, encodeURIComponent(String(requestParameters['contentType']))); + urlPath = urlPath.replace(`{${"object_id"}}`, encodeURIComponent(String(requestParameters['objectId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleIterationsLatestRetrieveRaw(requestParameters: LifecycleIterationsLatestRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleIterationsLatestRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LifecycleIterationFromJSON(jsonValue)); + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleIterationsLatestRetrieve(requestParameters: LifecycleIterationsLatestRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleIterationsLatestRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleIterationsListOpen without sending the request + */ + async lifecycleIterationsListOpenRequestOpts(requestParameters: LifecycleIterationsListOpenRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['userIsReviewer'] != null) { + queryParameters['user_is_reviewer'] = requestParameters['userIsReviewer']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/iterations/open/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleIterationsListOpenRaw(requestParameters: LifecycleIterationsListOpenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleIterationsListOpenRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLifecycleIterationListFromJSON(jsonValue)); + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleIterationsListOpen(requestParameters: LifecycleIterationsListOpenRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleIterationsListOpenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleReviewsCreate without sending the request + */ + async lifecycleReviewsCreateRequestOpts(requestParameters: LifecycleReviewsCreateRequest): Promise { + if (requestParameters['reviewRequest'] == null) { + throw new runtime.RequiredError( + 'reviewRequest', + 'Required parameter "reviewRequest" was null or undefined when calling lifecycleReviewsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/reviews/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ReviewRequestToJSON(requestParameters['reviewRequest']), + }; + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleReviewsCreateRaw(requestParameters: LifecycleReviewsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleReviewsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReviewFromJSON(jsonValue)); + } + + /** + * Mixin to validate that a valid enterprise license exists before allowing to save the object + */ + async lifecycleReviewsCreate(requestParameters: LifecycleReviewsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleReviewsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleRulesCreate without sending the request + */ + async lifecycleRulesCreateRequestOpts(requestParameters: LifecycleRulesCreateRequest): Promise { + if (requestParameters['lifecycleRuleRequest'] == null) { + throw new runtime.RequiredError( + 'lifecycleRuleRequest', + 'Required parameter "lifecycleRuleRequest" was null or undefined when calling lifecycleRulesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/rules/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LifecycleRuleRequestToJSON(requestParameters['lifecycleRuleRequest']), + }; + } + + /** + */ + async lifecycleRulesCreateRaw(requestParameters: LifecycleRulesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleRulesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LifecycleRuleFromJSON(jsonValue)); + } + + /** + */ + async lifecycleRulesCreate(requestParameters: LifecycleRulesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleRulesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleRulesDestroy without sending the request + */ + async lifecycleRulesDestroyRequestOpts(requestParameters: LifecycleRulesDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling lifecycleRulesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/rules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async lifecycleRulesDestroyRaw(requestParameters: LifecycleRulesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleRulesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async lifecycleRulesDestroy(requestParameters: LifecycleRulesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.lifecycleRulesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for lifecycleRulesList without sending the request + */ + async lifecycleRulesListRequestOpts(requestParameters: LifecycleRulesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['contentTypeModel'] != null) { + queryParameters['content_type__model'] = requestParameters['contentTypeModel']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/rules/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async lifecycleRulesListRaw(requestParameters: LifecycleRulesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleRulesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLifecycleRuleListFromJSON(jsonValue)); + } + + /** + */ + async lifecycleRulesList(requestParameters: LifecycleRulesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleRulesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleRulesPartialUpdate without sending the request + */ + async lifecycleRulesPartialUpdateRequestOpts(requestParameters: LifecycleRulesPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling lifecycleRulesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/rules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedLifecycleRuleRequestToJSON(requestParameters['patchedLifecycleRuleRequest']), + }; + } + + /** + */ + async lifecycleRulesPartialUpdateRaw(requestParameters: LifecycleRulesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleRulesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LifecycleRuleFromJSON(jsonValue)); + } + + /** + */ + async lifecycleRulesPartialUpdate(requestParameters: LifecycleRulesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleRulesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleRulesRetrieve without sending the request + */ + async lifecycleRulesRetrieveRequestOpts(requestParameters: LifecycleRulesRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling lifecycleRulesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/rules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async lifecycleRulesRetrieveRaw(requestParameters: LifecycleRulesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleRulesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LifecycleRuleFromJSON(jsonValue)); + } + + /** + */ + async lifecycleRulesRetrieve(requestParameters: LifecycleRulesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleRulesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for lifecycleRulesUpdate without sending the request + */ + async lifecycleRulesUpdateRequestOpts(requestParameters: LifecycleRulesUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling lifecycleRulesUpdate().' + ); + } + + if (requestParameters['lifecycleRuleRequest'] == null) { + throw new runtime.RequiredError( + 'lifecycleRuleRequest', + 'Required parameter "lifecycleRuleRequest" was null or undefined when calling lifecycleRulesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/lifecycle/rules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: LifecycleRuleRequestToJSON(requestParameters['lifecycleRuleRequest']), + }; + } + + /** + */ + async lifecycleRulesUpdateRaw(requestParameters: LifecycleRulesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.lifecycleRulesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LifecycleRuleFromJSON(jsonValue)); + } + + /** + */ + async lifecycleRulesUpdate(requestParameters: LifecycleRulesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lifecycleRulesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/ManagedApi.ts b/packages/client-ts/src/apis/ManagedApi.ts new file mode 100644 index 0000000000..4876eff91b --- /dev/null +++ b/packages/client-ts/src/apis/ManagedApi.ts @@ -0,0 +1,589 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + BlueprintFile, + BlueprintInstance, + BlueprintInstanceRequest, + GenericError, + PaginatedBlueprintInstanceList, + PatchedBlueprintInstanceRequest, + UsedBy, + ValidationError, +} from '../models/index'; +import { + BlueprintFileFromJSON, + BlueprintFileToJSON, + BlueprintInstanceFromJSON, + BlueprintInstanceToJSON, + BlueprintInstanceRequestFromJSON, + BlueprintInstanceRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedBlueprintInstanceListFromJSON, + PaginatedBlueprintInstanceListToJSON, + PatchedBlueprintInstanceRequestFromJSON, + PatchedBlueprintInstanceRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface ManagedBlueprintsApplyCreateRequest { + instanceUuid: string; +} + +export interface ManagedBlueprintsCreateRequest { + blueprintInstanceRequest: BlueprintInstanceRequest; +} + +export interface ManagedBlueprintsDestroyRequest { + instanceUuid: string; +} + +export interface ManagedBlueprintsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + path?: string; + search?: string; +} + +export interface ManagedBlueprintsPartialUpdateRequest { + instanceUuid: string; + patchedBlueprintInstanceRequest?: PatchedBlueprintInstanceRequest; +} + +export interface ManagedBlueprintsRetrieveRequest { + instanceUuid: string; +} + +export interface ManagedBlueprintsUpdateRequest { + instanceUuid: string; + blueprintInstanceRequest: BlueprintInstanceRequest; +} + +export interface ManagedBlueprintsUsedByListRequest { + instanceUuid: string; +} + +/** + * + */ +export class ManagedApi extends runtime.BaseAPI { + + /** + * Creates request options for managedBlueprintsApplyCreate without sending the request + */ + async managedBlueprintsApplyCreateRequestOpts(requestParameters: ManagedBlueprintsApplyCreateRequest): Promise { + if (requestParameters['instanceUuid'] == null) { + throw new runtime.RequiredError( + 'instanceUuid', + 'Required parameter "instanceUuid" was null or undefined when calling managedBlueprintsApplyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/{instance_uuid}/apply/`; + urlPath = urlPath.replace(`{${"instance_uuid"}}`, encodeURIComponent(String(requestParameters['instanceUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Apply a blueprint + */ + async managedBlueprintsApplyCreateRaw(requestParameters: ManagedBlueprintsApplyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsApplyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BlueprintInstanceFromJSON(jsonValue)); + } + + /** + * Apply a blueprint + */ + async managedBlueprintsApplyCreate(requestParameters: ManagedBlueprintsApplyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedBlueprintsApplyCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsAvailableList without sending the request + */ + async managedBlueprintsAvailableListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/available/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get blueprints + */ + async managedBlueprintsAvailableListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.managedBlueprintsAvailableListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BlueprintFileFromJSON)); + } + + /** + * Get blueprints + */ + async managedBlueprintsAvailableList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.managedBlueprintsAvailableListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsCreate without sending the request + */ + async managedBlueprintsCreateRequestOpts(requestParameters: ManagedBlueprintsCreateRequest): Promise { + if (requestParameters['blueprintInstanceRequest'] == null) { + throw new runtime.RequiredError( + 'blueprintInstanceRequest', + 'Required parameter "blueprintInstanceRequest" was null or undefined when calling managedBlueprintsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: BlueprintInstanceRequestToJSON(requestParameters['blueprintInstanceRequest']), + }; + } + + /** + * Blueprint instances + */ + async managedBlueprintsCreateRaw(requestParameters: ManagedBlueprintsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BlueprintInstanceFromJSON(jsonValue)); + } + + /** + * Blueprint instances + */ + async managedBlueprintsCreate(requestParameters: ManagedBlueprintsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedBlueprintsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsDestroy without sending the request + */ + async managedBlueprintsDestroyRequestOpts(requestParameters: ManagedBlueprintsDestroyRequest): Promise { + if (requestParameters['instanceUuid'] == null) { + throw new runtime.RequiredError( + 'instanceUuid', + 'Required parameter "instanceUuid" was null or undefined when calling managedBlueprintsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/{instance_uuid}/`; + urlPath = urlPath.replace(`{${"instance_uuid"}}`, encodeURIComponent(String(requestParameters['instanceUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Blueprint instances + */ + async managedBlueprintsDestroyRaw(requestParameters: ManagedBlueprintsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Blueprint instances + */ + async managedBlueprintsDestroy(requestParameters: ManagedBlueprintsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.managedBlueprintsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for managedBlueprintsList without sending the request + */ + async managedBlueprintsListRequestOpts(requestParameters: ManagedBlueprintsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Blueprint instances + */ + async managedBlueprintsListRaw(requestParameters: ManagedBlueprintsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedBlueprintInstanceListFromJSON(jsonValue)); + } + + /** + * Blueprint instances + */ + async managedBlueprintsList(requestParameters: ManagedBlueprintsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedBlueprintsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsPartialUpdate without sending the request + */ + async managedBlueprintsPartialUpdateRequestOpts(requestParameters: ManagedBlueprintsPartialUpdateRequest): Promise { + if (requestParameters['instanceUuid'] == null) { + throw new runtime.RequiredError( + 'instanceUuid', + 'Required parameter "instanceUuid" was null or undefined when calling managedBlueprintsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/{instance_uuid}/`; + urlPath = urlPath.replace(`{${"instance_uuid"}}`, encodeURIComponent(String(requestParameters['instanceUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedBlueprintInstanceRequestToJSON(requestParameters['patchedBlueprintInstanceRequest']), + }; + } + + /** + * Blueprint instances + */ + async managedBlueprintsPartialUpdateRaw(requestParameters: ManagedBlueprintsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BlueprintInstanceFromJSON(jsonValue)); + } + + /** + * Blueprint instances + */ + async managedBlueprintsPartialUpdate(requestParameters: ManagedBlueprintsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedBlueprintsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsRetrieve without sending the request + */ + async managedBlueprintsRetrieveRequestOpts(requestParameters: ManagedBlueprintsRetrieveRequest): Promise { + if (requestParameters['instanceUuid'] == null) { + throw new runtime.RequiredError( + 'instanceUuid', + 'Required parameter "instanceUuid" was null or undefined when calling managedBlueprintsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/{instance_uuid}/`; + urlPath = urlPath.replace(`{${"instance_uuid"}}`, encodeURIComponent(String(requestParameters['instanceUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Blueprint instances + */ + async managedBlueprintsRetrieveRaw(requestParameters: ManagedBlueprintsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BlueprintInstanceFromJSON(jsonValue)); + } + + /** + * Blueprint instances + */ + async managedBlueprintsRetrieve(requestParameters: ManagedBlueprintsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedBlueprintsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsUpdate without sending the request + */ + async managedBlueprintsUpdateRequestOpts(requestParameters: ManagedBlueprintsUpdateRequest): Promise { + if (requestParameters['instanceUuid'] == null) { + throw new runtime.RequiredError( + 'instanceUuid', + 'Required parameter "instanceUuid" was null or undefined when calling managedBlueprintsUpdate().' + ); + } + + if (requestParameters['blueprintInstanceRequest'] == null) { + throw new runtime.RequiredError( + 'blueprintInstanceRequest', + 'Required parameter "blueprintInstanceRequest" was null or undefined when calling managedBlueprintsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/{instance_uuid}/`; + urlPath = urlPath.replace(`{${"instance_uuid"}}`, encodeURIComponent(String(requestParameters['instanceUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: BlueprintInstanceRequestToJSON(requestParameters['blueprintInstanceRequest']), + }; + } + + /** + * Blueprint instances + */ + async managedBlueprintsUpdateRaw(requestParameters: ManagedBlueprintsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.managedBlueprintsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BlueprintInstanceFromJSON(jsonValue)); + } + + /** + * Blueprint instances + */ + async managedBlueprintsUpdate(requestParameters: ManagedBlueprintsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedBlueprintsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for managedBlueprintsUsedByList without sending the request + */ + async managedBlueprintsUsedByListRequestOpts(requestParameters: ManagedBlueprintsUsedByListRequest): Promise { + if (requestParameters['instanceUuid'] == null) { + throw new runtime.RequiredError( + 'instanceUuid', + 'Required parameter "instanceUuid" was null or undefined when calling managedBlueprintsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/managed/blueprints/{instance_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"instance_uuid"}}`, encodeURIComponent(String(requestParameters['instanceUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async managedBlueprintsUsedByListRaw(requestParameters: ManagedBlueprintsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.managedBlueprintsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async managedBlueprintsUsedByList(requestParameters: ManagedBlueprintsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.managedBlueprintsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/Oauth2Api.ts b/packages/client-ts/src/apis/Oauth2Api.ts new file mode 100644 index 0000000000..9d8f35e479 --- /dev/null +++ b/packages/client-ts/src/apis/Oauth2Api.ts @@ -0,0 +1,792 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ExpiringBaseGrantModel, + GenericError, + PaginatedExpiringBaseGrantModelList, + PaginatedTokenModelList, + TokenModel, + UsedBy, + ValidationError, +} from '../models/index'; +import { + ExpiringBaseGrantModelFromJSON, + ExpiringBaseGrantModelToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedExpiringBaseGrantModelListFromJSON, + PaginatedExpiringBaseGrantModelListToJSON, + PaginatedTokenModelListFromJSON, + PaginatedTokenModelListToJSON, + TokenModelFromJSON, + TokenModelToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface Oauth2AccessTokensDestroyRequest { + id: number; +} + +export interface Oauth2AccessTokensListRequest { + ordering?: string; + page?: number; + pageSize?: number; + provider?: number; + search?: string; + user?: number; +} + +export interface Oauth2AccessTokensRetrieveRequest { + id: number; +} + +export interface Oauth2AccessTokensUsedByListRequest { + id: number; +} + +export interface Oauth2AuthorizationCodesDestroyRequest { + id: number; +} + +export interface Oauth2AuthorizationCodesListRequest { + ordering?: string; + page?: number; + pageSize?: number; + provider?: number; + search?: string; + user?: number; +} + +export interface Oauth2AuthorizationCodesRetrieveRequest { + id: number; +} + +export interface Oauth2AuthorizationCodesUsedByListRequest { + id: number; +} + +export interface Oauth2RefreshTokensDestroyRequest { + id: number; +} + +export interface Oauth2RefreshTokensListRequest { + ordering?: string; + page?: number; + pageSize?: number; + provider?: number; + search?: string; + user?: number; +} + +export interface Oauth2RefreshTokensRetrieveRequest { + id: number; +} + +export interface Oauth2RefreshTokensUsedByListRequest { + id: number; +} + +/** + * + */ +export class Oauth2Api extends runtime.BaseAPI { + + /** + * Creates request options for oauth2AccessTokensDestroy without sending the request + */ + async oauth2AccessTokensDestroyRequestOpts(requestParameters: Oauth2AccessTokensDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2AccessTokensDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/access_tokens/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AccessToken Viewset + */ + async oauth2AccessTokensDestroyRaw(requestParameters: Oauth2AccessTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2AccessTokensDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AccessToken Viewset + */ + async oauth2AccessTokensDestroy(requestParameters: Oauth2AccessTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.oauth2AccessTokensDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for oauth2AccessTokensList without sending the request + */ + async oauth2AccessTokensListRequestOpts(requestParameters: Oauth2AccessTokensListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/access_tokens/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AccessToken Viewset + */ + async oauth2AccessTokensListRaw(requestParameters: Oauth2AccessTokensListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2AccessTokensListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTokenModelListFromJSON(jsonValue)); + } + + /** + * AccessToken Viewset + */ + async oauth2AccessTokensList(requestParameters: Oauth2AccessTokensListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2AccessTokensListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2AccessTokensRetrieve without sending the request + */ + async oauth2AccessTokensRetrieveRequestOpts(requestParameters: Oauth2AccessTokensRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2AccessTokensRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/access_tokens/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AccessToken Viewset + */ + async oauth2AccessTokensRetrieveRaw(requestParameters: Oauth2AccessTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2AccessTokensRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenModelFromJSON(jsonValue)); + } + + /** + * AccessToken Viewset + */ + async oauth2AccessTokensRetrieve(requestParameters: Oauth2AccessTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2AccessTokensRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2AccessTokensUsedByList without sending the request + */ + async oauth2AccessTokensUsedByListRequestOpts(requestParameters: Oauth2AccessTokensUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2AccessTokensUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/access_tokens/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async oauth2AccessTokensUsedByListRaw(requestParameters: Oauth2AccessTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.oauth2AccessTokensUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async oauth2AccessTokensUsedByList(requestParameters: Oauth2AccessTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.oauth2AccessTokensUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2AuthorizationCodesDestroy without sending the request + */ + async oauth2AuthorizationCodesDestroyRequestOpts(requestParameters: Oauth2AuthorizationCodesDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2AuthorizationCodesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/authorization_codes/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthorizationCode Viewset + */ + async oauth2AuthorizationCodesDestroyRaw(requestParameters: Oauth2AuthorizationCodesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2AuthorizationCodesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthorizationCode Viewset + */ + async oauth2AuthorizationCodesDestroy(requestParameters: Oauth2AuthorizationCodesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.oauth2AuthorizationCodesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for oauth2AuthorizationCodesList without sending the request + */ + async oauth2AuthorizationCodesListRequestOpts(requestParameters: Oauth2AuthorizationCodesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/authorization_codes/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthorizationCode Viewset + */ + async oauth2AuthorizationCodesListRaw(requestParameters: Oauth2AuthorizationCodesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2AuthorizationCodesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedExpiringBaseGrantModelListFromJSON(jsonValue)); + } + + /** + * AuthorizationCode Viewset + */ + async oauth2AuthorizationCodesList(requestParameters: Oauth2AuthorizationCodesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2AuthorizationCodesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2AuthorizationCodesRetrieve without sending the request + */ + async oauth2AuthorizationCodesRetrieveRequestOpts(requestParameters: Oauth2AuthorizationCodesRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2AuthorizationCodesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/authorization_codes/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthorizationCode Viewset + */ + async oauth2AuthorizationCodesRetrieveRaw(requestParameters: Oauth2AuthorizationCodesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2AuthorizationCodesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExpiringBaseGrantModelFromJSON(jsonValue)); + } + + /** + * AuthorizationCode Viewset + */ + async oauth2AuthorizationCodesRetrieve(requestParameters: Oauth2AuthorizationCodesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2AuthorizationCodesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2AuthorizationCodesUsedByList without sending the request + */ + async oauth2AuthorizationCodesUsedByListRequestOpts(requestParameters: Oauth2AuthorizationCodesUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2AuthorizationCodesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/authorization_codes/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async oauth2AuthorizationCodesUsedByListRaw(requestParameters: Oauth2AuthorizationCodesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.oauth2AuthorizationCodesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async oauth2AuthorizationCodesUsedByList(requestParameters: Oauth2AuthorizationCodesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.oauth2AuthorizationCodesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2RefreshTokensDestroy without sending the request + */ + async oauth2RefreshTokensDestroyRequestOpts(requestParameters: Oauth2RefreshTokensDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2RefreshTokensDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/refresh_tokens/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RefreshToken Viewset + */ + async oauth2RefreshTokensDestroyRaw(requestParameters: Oauth2RefreshTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2RefreshTokensDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * RefreshToken Viewset + */ + async oauth2RefreshTokensDestroy(requestParameters: Oauth2RefreshTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.oauth2RefreshTokensDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for oauth2RefreshTokensList without sending the request + */ + async oauth2RefreshTokensListRequestOpts(requestParameters: Oauth2RefreshTokensListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/refresh_tokens/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RefreshToken Viewset + */ + async oauth2RefreshTokensListRaw(requestParameters: Oauth2RefreshTokensListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2RefreshTokensListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTokenModelListFromJSON(jsonValue)); + } + + /** + * RefreshToken Viewset + */ + async oauth2RefreshTokensList(requestParameters: Oauth2RefreshTokensListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2RefreshTokensListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2RefreshTokensRetrieve without sending the request + */ + async oauth2RefreshTokensRetrieveRequestOpts(requestParameters: Oauth2RefreshTokensRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2RefreshTokensRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/refresh_tokens/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RefreshToken Viewset + */ + async oauth2RefreshTokensRetrieveRaw(requestParameters: Oauth2RefreshTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauth2RefreshTokensRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenModelFromJSON(jsonValue)); + } + + /** + * RefreshToken Viewset + */ + async oauth2RefreshTokensRetrieve(requestParameters: Oauth2RefreshTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.oauth2RefreshTokensRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for oauth2RefreshTokensUsedByList without sending the request + */ + async oauth2RefreshTokensUsedByListRequestOpts(requestParameters: Oauth2RefreshTokensUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling oauth2RefreshTokensUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/oauth2/refresh_tokens/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async oauth2RefreshTokensUsedByListRaw(requestParameters: Oauth2RefreshTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.oauth2RefreshTokensUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async oauth2RefreshTokensUsedByList(requestParameters: Oauth2RefreshTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.oauth2RefreshTokensUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/OutpostsApi.ts b/packages/client-ts/src/apis/OutpostsApi.ts new file mode 100644 index 0000000000..135d35702f --- /dev/null +++ b/packages/client-ts/src/apis/OutpostsApi.ts @@ -0,0 +1,2298 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + DockerServiceConnection, + DockerServiceConnectionRequest, + GenericError, + KubernetesServiceConnection, + KubernetesServiceConnectionRequest, + LDAPCheckAccess, + Outpost, + OutpostDefaultConfig, + OutpostHealth, + OutpostRequest, + PaginatedDockerServiceConnectionList, + PaginatedKubernetesServiceConnectionList, + PaginatedLDAPOutpostConfigList, + PaginatedOutpostList, + PaginatedProxyOutpostConfigList, + PaginatedRadiusOutpostConfigList, + PaginatedServiceConnectionList, + PatchedDockerServiceConnectionRequest, + PatchedKubernetesServiceConnectionRequest, + PatchedOutpostRequest, + RadiusCheckAccess, + ServiceConnection, + ServiceConnectionState, + TypeCreate, + UsedBy, + ValidationError, +} from '../models/index'; +import { + DockerServiceConnectionFromJSON, + DockerServiceConnectionToJSON, + DockerServiceConnectionRequestFromJSON, + DockerServiceConnectionRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + KubernetesServiceConnectionFromJSON, + KubernetesServiceConnectionToJSON, + KubernetesServiceConnectionRequestFromJSON, + KubernetesServiceConnectionRequestToJSON, + LDAPCheckAccessFromJSON, + LDAPCheckAccessToJSON, + OutpostFromJSON, + OutpostToJSON, + OutpostDefaultConfigFromJSON, + OutpostDefaultConfigToJSON, + OutpostHealthFromJSON, + OutpostHealthToJSON, + OutpostRequestFromJSON, + OutpostRequestToJSON, + PaginatedDockerServiceConnectionListFromJSON, + PaginatedDockerServiceConnectionListToJSON, + PaginatedKubernetesServiceConnectionListFromJSON, + PaginatedKubernetesServiceConnectionListToJSON, + PaginatedLDAPOutpostConfigListFromJSON, + PaginatedLDAPOutpostConfigListToJSON, + PaginatedOutpostListFromJSON, + PaginatedOutpostListToJSON, + PaginatedProxyOutpostConfigListFromJSON, + PaginatedProxyOutpostConfigListToJSON, + PaginatedRadiusOutpostConfigListFromJSON, + PaginatedRadiusOutpostConfigListToJSON, + PaginatedServiceConnectionListFromJSON, + PaginatedServiceConnectionListToJSON, + PatchedDockerServiceConnectionRequestFromJSON, + PatchedDockerServiceConnectionRequestToJSON, + PatchedKubernetesServiceConnectionRequestFromJSON, + PatchedKubernetesServiceConnectionRequestToJSON, + PatchedOutpostRequestFromJSON, + PatchedOutpostRequestToJSON, + RadiusCheckAccessFromJSON, + RadiusCheckAccessToJSON, + ServiceConnectionFromJSON, + ServiceConnectionToJSON, + ServiceConnectionStateFromJSON, + ServiceConnectionStateToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface OutpostsInstancesCreateRequest { + outpostRequest: OutpostRequest; +} + +export interface OutpostsInstancesDestroyRequest { + uuid: string; +} + +export interface OutpostsInstancesHealthListRequest { + uuid: string; + managedIcontains?: string; + managedIexact?: string; + nameIcontains?: string; + nameIexact?: string; + ordering?: string; + providersIsnull?: boolean; + providersByPk?: Array; + search?: string; + serviceConnectionNameIcontains?: string; + serviceConnectionNameIexact?: string; +} + +export interface OutpostsInstancesListRequest { + managedIcontains?: string; + managedIexact?: string; + nameIcontains?: string; + nameIexact?: string; + ordering?: string; + page?: number; + pageSize?: number; + providersIsnull?: boolean; + providersByPk?: Array; + search?: string; + serviceConnectionNameIcontains?: string; + serviceConnectionNameIexact?: string; +} + +export interface OutpostsInstancesPartialUpdateRequest { + uuid: string; + patchedOutpostRequest?: PatchedOutpostRequest; +} + +export interface OutpostsInstancesRetrieveRequest { + uuid: string; +} + +export interface OutpostsInstancesUpdateRequest { + uuid: string; + outpostRequest: OutpostRequest; +} + +export interface OutpostsInstancesUsedByListRequest { + uuid: string; +} + +export interface OutpostsLdapAccessCheckRequest { + id: number; + appSlug?: string; +} + +export interface OutpostsLdapListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface OutpostsProxyListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface OutpostsRadiusAccessCheckRequest { + id: number; + appSlug?: string; +} + +export interface OutpostsRadiusListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface OutpostsServiceConnectionsAllDestroyRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsAllListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface OutpostsServiceConnectionsAllRetrieveRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsAllStateRetrieveRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsAllUsedByListRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsDockerCreateRequest { + dockerServiceConnectionRequest: DockerServiceConnectionRequest; +} + +export interface OutpostsServiceConnectionsDockerDestroyRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsDockerListRequest { + local?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + tlsAuthentication?: string; + tlsVerification?: string; + url?: string; +} + +export interface OutpostsServiceConnectionsDockerPartialUpdateRequest { + uuid: string; + patchedDockerServiceConnectionRequest?: PatchedDockerServiceConnectionRequest; +} + +export interface OutpostsServiceConnectionsDockerRetrieveRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsDockerUpdateRequest { + uuid: string; + dockerServiceConnectionRequest: DockerServiceConnectionRequest; +} + +export interface OutpostsServiceConnectionsDockerUsedByListRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsKubernetesCreateRequest { + kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest; +} + +export interface OutpostsServiceConnectionsKubernetesDestroyRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsKubernetesListRequest { + local?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface OutpostsServiceConnectionsKubernetesPartialUpdateRequest { + uuid: string; + patchedKubernetesServiceConnectionRequest?: PatchedKubernetesServiceConnectionRequest; +} + +export interface OutpostsServiceConnectionsKubernetesRetrieveRequest { + uuid: string; +} + +export interface OutpostsServiceConnectionsKubernetesUpdateRequest { + uuid: string; + kubernetesServiceConnectionRequest: KubernetesServiceConnectionRequest; +} + +export interface OutpostsServiceConnectionsKubernetesUsedByListRequest { + uuid: string; +} + +/** + * + */ +export class OutpostsApi extends runtime.BaseAPI { + + /** + * Creates request options for outpostsInstancesCreate without sending the request + */ + async outpostsInstancesCreateRequestOpts(requestParameters: OutpostsInstancesCreateRequest): Promise { + if (requestParameters['outpostRequest'] == null) { + throw new runtime.RequiredError( + 'outpostRequest', + 'Required parameter "outpostRequest" was null or undefined when calling outpostsInstancesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OutpostRequestToJSON(requestParameters['outpostRequest']), + }; + } + + /** + * Outpost Viewset + */ + async outpostsInstancesCreateRaw(requestParameters: OutpostsInstancesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue)); + } + + /** + * Outpost Viewset + */ + async outpostsInstancesCreate(requestParameters: OutpostsInstancesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsInstancesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesDefaultSettingsRetrieve without sending the request + */ + async outpostsInstancesDefaultSettingsRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/default_settings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Global default outpost config + */ + async outpostsInstancesDefaultSettingsRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesDefaultSettingsRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OutpostDefaultConfigFromJSON(jsonValue)); + } + + /** + * Global default outpost config + */ + async outpostsInstancesDefaultSettingsRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsInstancesDefaultSettingsRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesDestroy without sending the request + */ + async outpostsInstancesDestroyRequestOpts(requestParameters: OutpostsInstancesDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsInstancesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Outpost Viewset + */ + async outpostsInstancesDestroyRaw(requestParameters: OutpostsInstancesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Outpost Viewset + */ + async outpostsInstancesDestroy(requestParameters: OutpostsInstancesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.outpostsInstancesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for outpostsInstancesHealthList without sending the request + */ + async outpostsInstancesHealthListRequestOpts(requestParameters: OutpostsInstancesHealthListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsInstancesHealthList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['managedIcontains'] != null) { + queryParameters['managed__icontains'] = requestParameters['managedIcontains']; + } + + if (requestParameters['managedIexact'] != null) { + queryParameters['managed__iexact'] = requestParameters['managedIexact']; + } + + if (requestParameters['nameIcontains'] != null) { + queryParameters['name__icontains'] = requestParameters['nameIcontains']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['providersIsnull'] != null) { + queryParameters['providers__isnull'] = requestParameters['providersIsnull']; + } + + if (requestParameters['providersByPk'] != null) { + queryParameters['providers_by_pk'] = requestParameters['providersByPk']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['serviceConnectionNameIcontains'] != null) { + queryParameters['service_connection__name__icontains'] = requestParameters['serviceConnectionNameIcontains']; + } + + if (requestParameters['serviceConnectionNameIexact'] != null) { + queryParameters['service_connection__name__iexact'] = requestParameters['serviceConnectionNameIexact']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/{uuid}/health/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get outposts current health + */ + async outpostsInstancesHealthListRaw(requestParameters: OutpostsInstancesHealthListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.outpostsInstancesHealthListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OutpostHealthFromJSON)); + } + + /** + * Get outposts current health + */ + async outpostsInstancesHealthList(requestParameters: OutpostsInstancesHealthListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.outpostsInstancesHealthListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesList without sending the request + */ + async outpostsInstancesListRequestOpts(requestParameters: OutpostsInstancesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managedIcontains'] != null) { + queryParameters['managed__icontains'] = requestParameters['managedIcontains']; + } + + if (requestParameters['managedIexact'] != null) { + queryParameters['managed__iexact'] = requestParameters['managedIexact']; + } + + if (requestParameters['nameIcontains'] != null) { + queryParameters['name__icontains'] = requestParameters['nameIcontains']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providersIsnull'] != null) { + queryParameters['providers__isnull'] = requestParameters['providersIsnull']; + } + + if (requestParameters['providersByPk'] != null) { + queryParameters['providers_by_pk'] = requestParameters['providersByPk']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['serviceConnectionNameIcontains'] != null) { + queryParameters['service_connection__name__icontains'] = requestParameters['serviceConnectionNameIcontains']; + } + + if (requestParameters['serviceConnectionNameIexact'] != null) { + queryParameters['service_connection__name__iexact'] = requestParameters['serviceConnectionNameIexact']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Outpost Viewset + */ + async outpostsInstancesListRaw(requestParameters: OutpostsInstancesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOutpostListFromJSON(jsonValue)); + } + + /** + * Outpost Viewset + */ + async outpostsInstancesList(requestParameters: OutpostsInstancesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsInstancesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesPartialUpdate without sending the request + */ + async outpostsInstancesPartialUpdateRequestOpts(requestParameters: OutpostsInstancesPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsInstancesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedOutpostRequestToJSON(requestParameters['patchedOutpostRequest']), + }; + } + + /** + * Outpost Viewset + */ + async outpostsInstancesPartialUpdateRaw(requestParameters: OutpostsInstancesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue)); + } + + /** + * Outpost Viewset + */ + async outpostsInstancesPartialUpdate(requestParameters: OutpostsInstancesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsInstancesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesRetrieve without sending the request + */ + async outpostsInstancesRetrieveRequestOpts(requestParameters: OutpostsInstancesRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsInstancesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Outpost Viewset + */ + async outpostsInstancesRetrieveRaw(requestParameters: OutpostsInstancesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue)); + } + + /** + * Outpost Viewset + */ + async outpostsInstancesRetrieve(requestParameters: OutpostsInstancesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsInstancesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesUpdate without sending the request + */ + async outpostsInstancesUpdateRequestOpts(requestParameters: OutpostsInstancesUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsInstancesUpdate().' + ); + } + + if (requestParameters['outpostRequest'] == null) { + throw new runtime.RequiredError( + 'outpostRequest', + 'Required parameter "outpostRequest" was null or undefined when calling outpostsInstancesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OutpostRequestToJSON(requestParameters['outpostRequest']), + }; + } + + /** + * Outpost Viewset + */ + async outpostsInstancesUpdateRaw(requestParameters: OutpostsInstancesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsInstancesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OutpostFromJSON(jsonValue)); + } + + /** + * Outpost Viewset + */ + async outpostsInstancesUpdate(requestParameters: OutpostsInstancesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsInstancesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsInstancesUsedByList without sending the request + */ + async outpostsInstancesUsedByListRequestOpts(requestParameters: OutpostsInstancesUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsInstancesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/instances/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async outpostsInstancesUsedByListRaw(requestParameters: OutpostsInstancesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.outpostsInstancesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async outpostsInstancesUsedByList(requestParameters: OutpostsInstancesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.outpostsInstancesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsLdapAccessCheck without sending the request + */ + async outpostsLdapAccessCheckRequestOpts(requestParameters: OutpostsLdapAccessCheckRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling outpostsLdapAccessCheck().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['appSlug'] != null) { + queryParameters['app_slug'] = requestParameters['appSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/ldap/{id}/check_access/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Check access to a single application by slug + */ + async outpostsLdapAccessCheckRaw(requestParameters: OutpostsLdapAccessCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsLdapAccessCheckRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPCheckAccessFromJSON(jsonValue)); + } + + /** + * Check access to a single application by slug + */ + async outpostsLdapAccessCheck(requestParameters: OutpostsLdapAccessCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsLdapAccessCheckRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsLdapList without sending the request + */ + async outpostsLdapListRequestOpts(requestParameters: OutpostsLdapListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/ldap/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAPProvider Viewset + */ + async outpostsLdapListRaw(requestParameters: OutpostsLdapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsLdapListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLDAPOutpostConfigListFromJSON(jsonValue)); + } + + /** + * LDAPProvider Viewset + */ + async outpostsLdapList(requestParameters: OutpostsLdapListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsLdapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsProxyList without sending the request + */ + async outpostsProxyListRequestOpts(requestParameters: OutpostsProxyListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/proxy/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ProxyProvider Viewset + */ + async outpostsProxyListRaw(requestParameters: OutpostsProxyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsProxyListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProxyOutpostConfigListFromJSON(jsonValue)); + } + + /** + * ProxyProvider Viewset + */ + async outpostsProxyList(requestParameters: OutpostsProxyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsProxyListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsRadiusAccessCheck without sending the request + */ + async outpostsRadiusAccessCheckRequestOpts(requestParameters: OutpostsRadiusAccessCheckRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling outpostsRadiusAccessCheck().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['appSlug'] != null) { + queryParameters['app_slug'] = requestParameters['appSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/radius/{id}/check_access/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Check access to a single application by slug + */ + async outpostsRadiusAccessCheckRaw(requestParameters: OutpostsRadiusAccessCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsRadiusAccessCheckRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusCheckAccessFromJSON(jsonValue)); + } + + /** + * Check access to a single application by slug + */ + async outpostsRadiusAccessCheck(requestParameters: OutpostsRadiusAccessCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsRadiusAccessCheckRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsRadiusList without sending the request + */ + async outpostsRadiusListRequestOpts(requestParameters: OutpostsRadiusListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/radius/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProvider Viewset + */ + async outpostsRadiusListRaw(requestParameters: OutpostsRadiusListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsRadiusListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRadiusOutpostConfigListFromJSON(jsonValue)); + } + + /** + * RadiusProvider Viewset + */ + async outpostsRadiusList(requestParameters: OutpostsRadiusListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsRadiusListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsAllDestroy without sending the request + */ + async outpostsServiceConnectionsAllDestroyRequestOpts(requestParameters: OutpostsServiceConnectionsAllDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/all/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ServiceConnection Viewset + */ + async outpostsServiceConnectionsAllDestroyRaw(requestParameters: OutpostsServiceConnectionsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ServiceConnection Viewset + */ + async outpostsServiceConnectionsAllDestroy(requestParameters: OutpostsServiceConnectionsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.outpostsServiceConnectionsAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for outpostsServiceConnectionsAllList without sending the request + */ + async outpostsServiceConnectionsAllListRequestOpts(requestParameters: OutpostsServiceConnectionsAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ServiceConnection Viewset + */ + async outpostsServiceConnectionsAllListRaw(requestParameters: OutpostsServiceConnectionsAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedServiceConnectionListFromJSON(jsonValue)); + } + + /** + * ServiceConnection Viewset + */ + async outpostsServiceConnectionsAllList(requestParameters: OutpostsServiceConnectionsAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsAllRetrieve without sending the request + */ + async outpostsServiceConnectionsAllRetrieveRequestOpts(requestParameters: OutpostsServiceConnectionsAllRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/all/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ServiceConnection Viewset + */ + async outpostsServiceConnectionsAllRetrieveRaw(requestParameters: OutpostsServiceConnectionsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ServiceConnectionFromJSON(jsonValue)); + } + + /** + * ServiceConnection Viewset + */ + async outpostsServiceConnectionsAllRetrieve(requestParameters: OutpostsServiceConnectionsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsAllStateRetrieve without sending the request + */ + async outpostsServiceConnectionsAllStateRetrieveRequestOpts(requestParameters: OutpostsServiceConnectionsAllStateRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllStateRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/all/{uuid}/state/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get the service connection\'s state + */ + async outpostsServiceConnectionsAllStateRetrieveRaw(requestParameters: OutpostsServiceConnectionsAllStateRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsAllStateRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ServiceConnectionStateFromJSON(jsonValue)); + } + + /** + * Get the service connection\'s state + */ + async outpostsServiceConnectionsAllStateRetrieve(requestParameters: OutpostsServiceConnectionsAllStateRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsAllStateRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsAllTypesList without sending the request + */ + async outpostsServiceConnectionsAllTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/all/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async outpostsServiceConnectionsAllTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.outpostsServiceConnectionsAllTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async outpostsServiceConnectionsAllTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.outpostsServiceConnectionsAllTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsAllUsedByList without sending the request + */ + async outpostsServiceConnectionsAllUsedByListRequestOpts(requestParameters: OutpostsServiceConnectionsAllUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/all/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async outpostsServiceConnectionsAllUsedByListRaw(requestParameters: OutpostsServiceConnectionsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.outpostsServiceConnectionsAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async outpostsServiceConnectionsAllUsedByList(requestParameters: OutpostsServiceConnectionsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.outpostsServiceConnectionsAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerCreate without sending the request + */ + async outpostsServiceConnectionsDockerCreateRequestOpts(requestParameters: OutpostsServiceConnectionsDockerCreateRequest): Promise { + if (requestParameters['dockerServiceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'dockerServiceConnectionRequest', + 'Required parameter "dockerServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsDockerCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DockerServiceConnectionRequestToJSON(requestParameters['dockerServiceConnectionRequest']), + }; + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerCreateRaw(requestParameters: OutpostsServiceConnectionsDockerCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsDockerCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DockerServiceConnectionFromJSON(jsonValue)); + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerCreate(requestParameters: OutpostsServiceConnectionsDockerCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsDockerCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerDestroy without sending the request + */ + async outpostsServiceConnectionsDockerDestroyRequestOpts(requestParameters: OutpostsServiceConnectionsDockerDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerDestroyRaw(requestParameters: OutpostsServiceConnectionsDockerDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsDockerDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerDestroy(requestParameters: OutpostsServiceConnectionsDockerDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.outpostsServiceConnectionsDockerDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerList without sending the request + */ + async outpostsServiceConnectionsDockerListRequestOpts(requestParameters: OutpostsServiceConnectionsDockerListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['local'] != null) { + queryParameters['local'] = requestParameters['local']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['tlsAuthentication'] != null) { + queryParameters['tls_authentication'] = requestParameters['tlsAuthentication']; + } + + if (requestParameters['tlsVerification'] != null) { + queryParameters['tls_verification'] = requestParameters['tlsVerification']; + } + + if (requestParameters['url'] != null) { + queryParameters['url'] = requestParameters['url']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerListRaw(requestParameters: OutpostsServiceConnectionsDockerListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsDockerListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDockerServiceConnectionListFromJSON(jsonValue)); + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerList(requestParameters: OutpostsServiceConnectionsDockerListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsDockerListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerPartialUpdate without sending the request + */ + async outpostsServiceConnectionsDockerPartialUpdateRequestOpts(requestParameters: OutpostsServiceConnectionsDockerPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDockerServiceConnectionRequestToJSON(requestParameters['patchedDockerServiceConnectionRequest']), + }; + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerPartialUpdateRaw(requestParameters: OutpostsServiceConnectionsDockerPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsDockerPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DockerServiceConnectionFromJSON(jsonValue)); + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerPartialUpdate(requestParameters: OutpostsServiceConnectionsDockerPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsDockerPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerRetrieve without sending the request + */ + async outpostsServiceConnectionsDockerRetrieveRequestOpts(requestParameters: OutpostsServiceConnectionsDockerRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerRetrieveRaw(requestParameters: OutpostsServiceConnectionsDockerRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsDockerRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DockerServiceConnectionFromJSON(jsonValue)); + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerRetrieve(requestParameters: OutpostsServiceConnectionsDockerRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsDockerRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerUpdate without sending the request + */ + async outpostsServiceConnectionsDockerUpdateRequestOpts(requestParameters: OutpostsServiceConnectionsDockerUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerUpdate().' + ); + } + + if (requestParameters['dockerServiceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'dockerServiceConnectionRequest', + 'Required parameter "dockerServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsDockerUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DockerServiceConnectionRequestToJSON(requestParameters['dockerServiceConnectionRequest']), + }; + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerUpdateRaw(requestParameters: OutpostsServiceConnectionsDockerUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsDockerUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DockerServiceConnectionFromJSON(jsonValue)); + } + + /** + * DockerServiceConnection Viewset + */ + async outpostsServiceConnectionsDockerUpdate(requestParameters: OutpostsServiceConnectionsDockerUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsDockerUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsDockerUsedByList without sending the request + */ + async outpostsServiceConnectionsDockerUsedByListRequestOpts(requestParameters: OutpostsServiceConnectionsDockerUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsDockerUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/docker/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async outpostsServiceConnectionsDockerUsedByListRaw(requestParameters: OutpostsServiceConnectionsDockerUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.outpostsServiceConnectionsDockerUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async outpostsServiceConnectionsDockerUsedByList(requestParameters: OutpostsServiceConnectionsDockerUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.outpostsServiceConnectionsDockerUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesCreate without sending the request + */ + async outpostsServiceConnectionsKubernetesCreateRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesCreateRequest): Promise { + if (requestParameters['kubernetesServiceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'kubernetesServiceConnectionRequest', + 'Required parameter "kubernetesServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsKubernetesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: KubernetesServiceConnectionRequestToJSON(requestParameters['kubernetesServiceConnectionRequest']), + }; + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesCreateRaw(requestParameters: OutpostsServiceConnectionsKubernetesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KubernetesServiceConnectionFromJSON(jsonValue)); + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesCreate(requestParameters: OutpostsServiceConnectionsKubernetesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsKubernetesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesDestroy without sending the request + */ + async outpostsServiceConnectionsKubernetesDestroyRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters: OutpostsServiceConnectionsKubernetesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesDestroy(requestParameters: OutpostsServiceConnectionsKubernetesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.outpostsServiceConnectionsKubernetesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesList without sending the request + */ + async outpostsServiceConnectionsKubernetesListRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['local'] != null) { + queryParameters['local'] = requestParameters['local']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesListRaw(requestParameters: OutpostsServiceConnectionsKubernetesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedKubernetesServiceConnectionListFromJSON(jsonValue)); + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesList(requestParameters: OutpostsServiceConnectionsKubernetesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsKubernetesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesPartialUpdate without sending the request + */ + async outpostsServiceConnectionsKubernetesPartialUpdateRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedKubernetesServiceConnectionRequestToJSON(requestParameters['patchedKubernetesServiceConnectionRequest']), + }; + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesPartialUpdateRaw(requestParameters: OutpostsServiceConnectionsKubernetesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KubernetesServiceConnectionFromJSON(jsonValue)); + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesPartialUpdate(requestParameters: OutpostsServiceConnectionsKubernetesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsKubernetesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesRetrieve without sending the request + */ + async outpostsServiceConnectionsKubernetesRetrieveRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesRetrieveRaw(requestParameters: OutpostsServiceConnectionsKubernetesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KubernetesServiceConnectionFromJSON(jsonValue)); + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesRetrieve(requestParameters: OutpostsServiceConnectionsKubernetesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsKubernetesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesUpdate without sending the request + */ + async outpostsServiceConnectionsKubernetesUpdateRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesUpdate().' + ); + } + + if (requestParameters['kubernetesServiceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'kubernetesServiceConnectionRequest', + 'Required parameter "kubernetesServiceConnectionRequest" was null or undefined when calling outpostsServiceConnectionsKubernetesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: KubernetesServiceConnectionRequestToJSON(requestParameters['kubernetesServiceConnectionRequest']), + }; + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesUpdateRaw(requestParameters: OutpostsServiceConnectionsKubernetesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KubernetesServiceConnectionFromJSON(jsonValue)); + } + + /** + * KubernetesServiceConnection Viewset + */ + async outpostsServiceConnectionsKubernetesUpdate(requestParameters: OutpostsServiceConnectionsKubernetesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.outpostsServiceConnectionsKubernetesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for outpostsServiceConnectionsKubernetesUsedByList without sending the request + */ + async outpostsServiceConnectionsKubernetesUsedByListRequestOpts(requestParameters: OutpostsServiceConnectionsKubernetesUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling outpostsServiceConnectionsKubernetesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/outposts/service_connections/kubernetes/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async outpostsServiceConnectionsKubernetesUsedByListRaw(requestParameters: OutpostsServiceConnectionsKubernetesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.outpostsServiceConnectionsKubernetesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async outpostsServiceConnectionsKubernetesUsedByList(requestParameters: OutpostsServiceConnectionsKubernetesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.outpostsServiceConnectionsKubernetesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/PoliciesApi.ts b/packages/client-ts/src/apis/PoliciesApi.ts new file mode 100644 index 0000000000..f52aba8c7b --- /dev/null +++ b/packages/client-ts/src/apis/PoliciesApi.ts @@ -0,0 +1,5154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Cache, + DetailedCountry, + DummyPolicy, + DummyPolicyRequest, + EventMatcherPolicy, + EventMatcherPolicyRequest, + ExpressionPolicy, + ExpressionPolicyRequest, + GenericError, + GeoIPPolicy, + GeoIPPolicyRequest, + PaginatedDummyPolicyList, + PaginatedEventMatcherPolicyList, + PaginatedExpressionPolicyList, + PaginatedGeoIPPolicyList, + PaginatedPasswordExpiryPolicyList, + PaginatedPasswordPolicyList, + PaginatedPolicyBindingList, + PaginatedPolicyList, + PaginatedReputationList, + PaginatedReputationPolicyList, + PaginatedUniquePasswordPolicyList, + PasswordExpiryPolicy, + PasswordExpiryPolicyRequest, + PasswordPolicy, + PasswordPolicyRequest, + PatchedDummyPolicyRequest, + PatchedEventMatcherPolicyRequest, + PatchedExpressionPolicyRequest, + PatchedGeoIPPolicyRequest, + PatchedPasswordExpiryPolicyRequest, + PatchedPasswordPolicyRequest, + PatchedPolicyBindingRequest, + PatchedReputationPolicyRequest, + PatchedUniquePasswordPolicyRequest, + Policy, + PolicyBinding, + PolicyBindingRequest, + PolicyTestRequest, + PolicyTestResult, + Reputation, + ReputationPolicy, + ReputationPolicyRequest, + TypeCreate, + UniquePasswordPolicy, + UniquePasswordPolicyRequest, + UsedBy, + ValidationError, +} from '../models/index'; +import { + CacheFromJSON, + CacheToJSON, + DetailedCountryFromJSON, + DetailedCountryToJSON, + DummyPolicyFromJSON, + DummyPolicyToJSON, + DummyPolicyRequestFromJSON, + DummyPolicyRequestToJSON, + EventMatcherPolicyFromJSON, + EventMatcherPolicyToJSON, + EventMatcherPolicyRequestFromJSON, + EventMatcherPolicyRequestToJSON, + ExpressionPolicyFromJSON, + ExpressionPolicyToJSON, + ExpressionPolicyRequestFromJSON, + ExpressionPolicyRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + GeoIPPolicyFromJSON, + GeoIPPolicyToJSON, + GeoIPPolicyRequestFromJSON, + GeoIPPolicyRequestToJSON, + PaginatedDummyPolicyListFromJSON, + PaginatedDummyPolicyListToJSON, + PaginatedEventMatcherPolicyListFromJSON, + PaginatedEventMatcherPolicyListToJSON, + PaginatedExpressionPolicyListFromJSON, + PaginatedExpressionPolicyListToJSON, + PaginatedGeoIPPolicyListFromJSON, + PaginatedGeoIPPolicyListToJSON, + PaginatedPasswordExpiryPolicyListFromJSON, + PaginatedPasswordExpiryPolicyListToJSON, + PaginatedPasswordPolicyListFromJSON, + PaginatedPasswordPolicyListToJSON, + PaginatedPolicyBindingListFromJSON, + PaginatedPolicyBindingListToJSON, + PaginatedPolicyListFromJSON, + PaginatedPolicyListToJSON, + PaginatedReputationListFromJSON, + PaginatedReputationListToJSON, + PaginatedReputationPolicyListFromJSON, + PaginatedReputationPolicyListToJSON, + PaginatedUniquePasswordPolicyListFromJSON, + PaginatedUniquePasswordPolicyListToJSON, + PasswordExpiryPolicyFromJSON, + PasswordExpiryPolicyToJSON, + PasswordExpiryPolicyRequestFromJSON, + PasswordExpiryPolicyRequestToJSON, + PasswordPolicyFromJSON, + PasswordPolicyToJSON, + PasswordPolicyRequestFromJSON, + PasswordPolicyRequestToJSON, + PatchedDummyPolicyRequestFromJSON, + PatchedDummyPolicyRequestToJSON, + PatchedEventMatcherPolicyRequestFromJSON, + PatchedEventMatcherPolicyRequestToJSON, + PatchedExpressionPolicyRequestFromJSON, + PatchedExpressionPolicyRequestToJSON, + PatchedGeoIPPolicyRequestFromJSON, + PatchedGeoIPPolicyRequestToJSON, + PatchedPasswordExpiryPolicyRequestFromJSON, + PatchedPasswordExpiryPolicyRequestToJSON, + PatchedPasswordPolicyRequestFromJSON, + PatchedPasswordPolicyRequestToJSON, + PatchedPolicyBindingRequestFromJSON, + PatchedPolicyBindingRequestToJSON, + PatchedReputationPolicyRequestFromJSON, + PatchedReputationPolicyRequestToJSON, + PatchedUniquePasswordPolicyRequestFromJSON, + PatchedUniquePasswordPolicyRequestToJSON, + PolicyFromJSON, + PolicyToJSON, + PolicyBindingFromJSON, + PolicyBindingToJSON, + PolicyBindingRequestFromJSON, + PolicyBindingRequestToJSON, + PolicyTestRequestFromJSON, + PolicyTestRequestToJSON, + PolicyTestResultFromJSON, + PolicyTestResultToJSON, + ReputationFromJSON, + ReputationToJSON, + ReputationPolicyFromJSON, + ReputationPolicyToJSON, + ReputationPolicyRequestFromJSON, + ReputationPolicyRequestToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UniquePasswordPolicyFromJSON, + UniquePasswordPolicyToJSON, + UniquePasswordPolicyRequestFromJSON, + UniquePasswordPolicyRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface PoliciesAllDestroyRequest { + policyUuid: string; +} + +export interface PoliciesAllListRequest { + bindingsIsnull?: boolean; + ordering?: string; + page?: number; + pageSize?: number; + promptstageIsnull?: boolean; + search?: string; +} + +export interface PoliciesAllRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesAllTestCreateRequest { + policyUuid: string; + policyTestRequest: PolicyTestRequest; +} + +export interface PoliciesAllUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesBindingsCreateRequest { + policyBindingRequest: PolicyBindingRequest; +} + +export interface PoliciesBindingsDestroyRequest { + policyBindingUuid: string; +} + +export interface PoliciesBindingsListRequest { + enabled?: boolean; + order?: number; + ordering?: string; + page?: number; + pageSize?: number; + policy?: string; + policyIsnull?: boolean; + search?: string; + target?: string; + targetIn?: Array; + timeout?: number; +} + +export interface PoliciesBindingsPartialUpdateRequest { + policyBindingUuid: string; + patchedPolicyBindingRequest?: PatchedPolicyBindingRequest; +} + +export interface PoliciesBindingsRetrieveRequest { + policyBindingUuid: string; +} + +export interface PoliciesBindingsUpdateRequest { + policyBindingUuid: string; + policyBindingRequest: PolicyBindingRequest; +} + +export interface PoliciesBindingsUsedByListRequest { + policyBindingUuid: string; +} + +export interface PoliciesDummyCreateRequest { + dummyPolicyRequest: DummyPolicyRequest; +} + +export interface PoliciesDummyDestroyRequest { + policyUuid: string; +} + +export interface PoliciesDummyListRequest { + created?: Date; + executionLogging?: boolean; + lastUpdated?: Date; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + policyUuid?: string; + result?: boolean; + search?: string; + waitMax?: number; + waitMin?: number; +} + +export interface PoliciesDummyPartialUpdateRequest { + policyUuid: string; + patchedDummyPolicyRequest?: PatchedDummyPolicyRequest; +} + +export interface PoliciesDummyRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesDummyUpdateRequest { + policyUuid: string; + dummyPolicyRequest: DummyPolicyRequest; +} + +export interface PoliciesDummyUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesEventMatcherCreateRequest { + eventMatcherPolicyRequest: EventMatcherPolicyRequest; +} + +export interface PoliciesEventMatcherDestroyRequest { + policyUuid: string; +} + +export interface PoliciesEventMatcherListRequest { + action?: PoliciesEventMatcherListActionEnum; + app?: string; + clientIp?: string; + created?: Date; + executionLogging?: boolean; + lastUpdated?: Date; + model?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + policyUuid?: string; + search?: string; +} + +export interface PoliciesEventMatcherPartialUpdateRequest { + policyUuid: string; + patchedEventMatcherPolicyRequest?: PatchedEventMatcherPolicyRequest; +} + +export interface PoliciesEventMatcherRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesEventMatcherUpdateRequest { + policyUuid: string; + eventMatcherPolicyRequest: EventMatcherPolicyRequest; +} + +export interface PoliciesEventMatcherUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesExpressionCreateRequest { + expressionPolicyRequest: ExpressionPolicyRequest; +} + +export interface PoliciesExpressionDestroyRequest { + policyUuid: string; +} + +export interface PoliciesExpressionListRequest { + created?: Date; + executionLogging?: boolean; + expression?: string; + lastUpdated?: Date; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + policyUuid?: string; + search?: string; +} + +export interface PoliciesExpressionPartialUpdateRequest { + policyUuid: string; + patchedExpressionPolicyRequest?: PatchedExpressionPolicyRequest; +} + +export interface PoliciesExpressionRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesExpressionUpdateRequest { + policyUuid: string; + expressionPolicyRequest: ExpressionPolicyRequest; +} + +export interface PoliciesExpressionUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesGeoipCreateRequest { + geoIPPolicyRequest: GeoIPPolicyRequest; +} + +export interface PoliciesGeoipDestroyRequest { + policyUuid: string; +} + +export interface PoliciesGeoipListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PoliciesGeoipPartialUpdateRequest { + policyUuid: string; + patchedGeoIPPolicyRequest?: PatchedGeoIPPolicyRequest; +} + +export interface PoliciesGeoipRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesGeoipUpdateRequest { + policyUuid: string; + geoIPPolicyRequest: GeoIPPolicyRequest; +} + +export interface PoliciesGeoipUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesPasswordCreateRequest { + passwordPolicyRequest: PasswordPolicyRequest; +} + +export interface PoliciesPasswordDestroyRequest { + policyUuid: string; +} + +export interface PoliciesPasswordExpiryCreateRequest { + passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest; +} + +export interface PoliciesPasswordExpiryDestroyRequest { + policyUuid: string; +} + +export interface PoliciesPasswordExpiryListRequest { + created?: Date; + days?: number; + denyOnly?: boolean; + executionLogging?: boolean; + lastUpdated?: Date; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + policyUuid?: string; + search?: string; +} + +export interface PoliciesPasswordExpiryPartialUpdateRequest { + policyUuid: string; + patchedPasswordExpiryPolicyRequest?: PatchedPasswordExpiryPolicyRequest; +} + +export interface PoliciesPasswordExpiryRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesPasswordExpiryUpdateRequest { + policyUuid: string; + passwordExpiryPolicyRequest: PasswordExpiryPolicyRequest; +} + +export interface PoliciesPasswordExpiryUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesPasswordListRequest { + amountDigits?: number; + amountLowercase?: number; + amountSymbols?: number; + amountUppercase?: number; + checkHaveIBeenPwned?: boolean; + checkStaticRules?: boolean; + checkZxcvbn?: boolean; + created?: Date; + errorMessage?: string; + executionLogging?: boolean; + hibpAllowedCount?: number; + lastUpdated?: Date; + lengthMin?: number; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + passwordField?: string; + policyUuid?: string; + search?: string; + symbolCharset?: string; + zxcvbnScoreThreshold?: number; +} + +export interface PoliciesPasswordPartialUpdateRequest { + policyUuid: string; + patchedPasswordPolicyRequest?: PatchedPasswordPolicyRequest; +} + +export interface PoliciesPasswordRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesPasswordUpdateRequest { + policyUuid: string; + passwordPolicyRequest: PasswordPolicyRequest; +} + +export interface PoliciesPasswordUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesReputationCreateRequest { + reputationPolicyRequest: ReputationPolicyRequest; +} + +export interface PoliciesReputationDestroyRequest { + policyUuid: string; +} + +export interface PoliciesReputationListRequest { + checkIp?: boolean; + checkUsername?: boolean; + created?: Date; + executionLogging?: boolean; + lastUpdated?: Date; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + policyUuid?: string; + search?: string; + threshold?: number; +} + +export interface PoliciesReputationPartialUpdateRequest { + policyUuid: string; + patchedReputationPolicyRequest?: PatchedReputationPolicyRequest; +} + +export interface PoliciesReputationRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesReputationScoresDestroyRequest { + reputationUuid: string; +} + +export interface PoliciesReputationScoresListRequest { + identifier?: string; + identifierIn?: Array; + ip?: string; + ordering?: string; + page?: number; + pageSize?: number; + score?: number; + search?: string; +} + +export interface PoliciesReputationScoresRetrieveRequest { + reputationUuid: string; +} + +export interface PoliciesReputationScoresUsedByListRequest { + reputationUuid: string; +} + +export interface PoliciesReputationUpdateRequest { + policyUuid: string; + reputationPolicyRequest: ReputationPolicyRequest; +} + +export interface PoliciesReputationUsedByListRequest { + policyUuid: string; +} + +export interface PoliciesUniquePasswordCreateRequest { + uniquePasswordPolicyRequest: UniquePasswordPolicyRequest; +} + +export interface PoliciesUniquePasswordDestroyRequest { + policyUuid: string; +} + +export interface PoliciesUniquePasswordListRequest { + created?: Date; + executionLogging?: boolean; + lastUpdated?: Date; + name?: string; + numHistoricalPasswords?: number; + ordering?: string; + page?: number; + pageSize?: number; + passwordField?: string; + policyUuid?: string; + search?: string; +} + +export interface PoliciesUniquePasswordPartialUpdateRequest { + policyUuid: string; + patchedUniquePasswordPolicyRequest?: PatchedUniquePasswordPolicyRequest; +} + +export interface PoliciesUniquePasswordRetrieveRequest { + policyUuid: string; +} + +export interface PoliciesUniquePasswordUpdateRequest { + policyUuid: string; + uniquePasswordPolicyRequest: UniquePasswordPolicyRequest; +} + +export interface PoliciesUniquePasswordUsedByListRequest { + policyUuid: string; +} + +/** + * + */ +export class PoliciesApi extends runtime.BaseAPI { + + /** + * Creates request options for policiesAllCacheClearCreate without sending the request + */ + async policiesAllCacheClearCreateRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/cache_clear/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Clear policy cache + */ + async policiesAllCacheClearCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesAllCacheClearCreateRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Clear policy cache + */ + async policiesAllCacheClearCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesAllCacheClearCreateRaw(initOverrides); + } + + /** + * Creates request options for policiesAllCacheInfoRetrieve without sending the request + */ + async policiesAllCacheInfoRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/cache_info/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Info about cached policies + */ + async policiesAllCacheInfoRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesAllCacheInfoRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CacheFromJSON(jsonValue)); + } + + /** + * Info about cached policies + */ + async policiesAllCacheInfoRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesAllCacheInfoRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesAllDestroy without sending the request + */ + async policiesAllDestroyRequestOpts(requestParameters: PoliciesAllDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Policy Viewset + */ + async policiesAllDestroyRaw(requestParameters: PoliciesAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Policy Viewset + */ + async policiesAllDestroy(requestParameters: PoliciesAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesAllList without sending the request + */ + async policiesAllListRequestOpts(requestParameters: PoliciesAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['bindingsIsnull'] != null) { + queryParameters['bindings__isnull'] = requestParameters['bindingsIsnull']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['promptstageIsnull'] != null) { + queryParameters['promptstage__isnull'] = requestParameters['promptstageIsnull']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Policy Viewset + */ + async policiesAllListRaw(requestParameters: PoliciesAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPolicyListFromJSON(jsonValue)); + } + + /** + * Policy Viewset + */ + async policiesAllList(requestParameters: PoliciesAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesAllRetrieve without sending the request + */ + async policiesAllRetrieveRequestOpts(requestParameters: PoliciesAllRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Policy Viewset + */ + async policiesAllRetrieveRaw(requestParameters: PoliciesAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyFromJSON(jsonValue)); + } + + /** + * Policy Viewset + */ + async policiesAllRetrieve(requestParameters: PoliciesAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesAllTestCreate without sending the request + */ + async policiesAllTestCreateRequestOpts(requestParameters: PoliciesAllTestCreateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesAllTestCreate().' + ); + } + + if (requestParameters['policyTestRequest'] == null) { + throw new runtime.RequiredError( + 'policyTestRequest', + 'Required parameter "policyTestRequest" was null or undefined when calling policiesAllTestCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/{policy_uuid}/test/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PolicyTestRequestToJSON(requestParameters['policyTestRequest']), + }; + } + + /** + * Test policy + */ + async policiesAllTestCreateRaw(requestParameters: PoliciesAllTestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesAllTestCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyTestResultFromJSON(jsonValue)); + } + + /** + * Test policy + */ + async policiesAllTestCreate(requestParameters: PoliciesAllTestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesAllTestCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesAllTypesList without sending the request + */ + async policiesAllTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async policiesAllTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesAllTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async policiesAllTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesAllTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesAllUsedByList without sending the request + */ + async policiesAllUsedByListRequestOpts(requestParameters: PoliciesAllUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/all/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesAllUsedByListRaw(requestParameters: PoliciesAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesAllUsedByList(requestParameters: PoliciesAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesBindingsCreate without sending the request + */ + async policiesBindingsCreateRequestOpts(requestParameters: PoliciesBindingsCreateRequest): Promise { + if (requestParameters['policyBindingRequest'] == null) { + throw new runtime.RequiredError( + 'policyBindingRequest', + 'Required parameter "policyBindingRequest" was null or undefined when calling policiesBindingsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PolicyBindingRequestToJSON(requestParameters['policyBindingRequest']), + }; + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsCreateRaw(requestParameters: PoliciesBindingsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesBindingsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsCreate(requestParameters: PoliciesBindingsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesBindingsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesBindingsDestroy without sending the request + */ + async policiesBindingsDestroyRequestOpts(requestParameters: PoliciesBindingsDestroyRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling policiesBindingsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsDestroyRaw(requestParameters: PoliciesBindingsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesBindingsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsDestroy(requestParameters: PoliciesBindingsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesBindingsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesBindingsList without sending the request + */ + async policiesBindingsListRequestOpts(requestParameters: PoliciesBindingsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policy'] != null) { + queryParameters['policy'] = requestParameters['policy']; + } + + if (requestParameters['policyIsnull'] != null) { + queryParameters['policy__isnull'] = requestParameters['policyIsnull']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['target'] != null) { + queryParameters['target'] = requestParameters['target']; + } + + if (requestParameters['targetIn'] != null) { + queryParameters['target_in'] = requestParameters['targetIn']; + } + + if (requestParameters['timeout'] != null) { + queryParameters['timeout'] = requestParameters['timeout']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsListRaw(requestParameters: PoliciesBindingsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesBindingsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPolicyBindingListFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsList(requestParameters: PoliciesBindingsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesBindingsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesBindingsPartialUpdate without sending the request + */ + async policiesBindingsPartialUpdateRequestOpts(requestParameters: PoliciesBindingsPartialUpdateRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling policiesBindingsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPolicyBindingRequestToJSON(requestParameters['patchedPolicyBindingRequest']), + }; + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsPartialUpdateRaw(requestParameters: PoliciesBindingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesBindingsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsPartialUpdate(requestParameters: PoliciesBindingsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesBindingsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesBindingsRetrieve without sending the request + */ + async policiesBindingsRetrieveRequestOpts(requestParameters: PoliciesBindingsRetrieveRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling policiesBindingsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsRetrieveRaw(requestParameters: PoliciesBindingsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesBindingsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsRetrieve(requestParameters: PoliciesBindingsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesBindingsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesBindingsUpdate without sending the request + */ + async policiesBindingsUpdateRequestOpts(requestParameters: PoliciesBindingsUpdateRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling policiesBindingsUpdate().' + ); + } + + if (requestParameters['policyBindingRequest'] == null) { + throw new runtime.RequiredError( + 'policyBindingRequest', + 'Required parameter "policyBindingRequest" was null or undefined when calling policiesBindingsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/{policy_binding_uuid}/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PolicyBindingRequestToJSON(requestParameters['policyBindingRequest']), + }; + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsUpdateRaw(requestParameters: PoliciesBindingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesBindingsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PolicyBindingFromJSON(jsonValue)); + } + + /** + * PolicyBinding Viewset + */ + async policiesBindingsUpdate(requestParameters: PoliciesBindingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesBindingsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesBindingsUsedByList without sending the request + */ + async policiesBindingsUsedByListRequestOpts(requestParameters: PoliciesBindingsUsedByListRequest): Promise { + if (requestParameters['policyBindingUuid'] == null) { + throw new runtime.RequiredError( + 'policyBindingUuid', + 'Required parameter "policyBindingUuid" was null or undefined when calling policiesBindingsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/bindings/{policy_binding_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_binding_uuid"}}`, encodeURIComponent(String(requestParameters['policyBindingUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesBindingsUsedByListRaw(requestParameters: PoliciesBindingsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesBindingsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesBindingsUsedByList(requestParameters: PoliciesBindingsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesBindingsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesDummyCreate without sending the request + */ + async policiesDummyCreateRequestOpts(requestParameters: PoliciesDummyCreateRequest): Promise { + if (requestParameters['dummyPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'dummyPolicyRequest', + 'Required parameter "dummyPolicyRequest" was null or undefined when calling policiesDummyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DummyPolicyRequestToJSON(requestParameters['dummyPolicyRequest']), + }; + } + + /** + * Dummy Viewset + */ + async policiesDummyCreateRaw(requestParameters: PoliciesDummyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesDummyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyPolicyFromJSON(jsonValue)); + } + + /** + * Dummy Viewset + */ + async policiesDummyCreate(requestParameters: PoliciesDummyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesDummyCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesDummyDestroy without sending the request + */ + async policiesDummyDestroyRequestOpts(requestParameters: PoliciesDummyDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesDummyDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Dummy Viewset + */ + async policiesDummyDestroyRaw(requestParameters: PoliciesDummyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesDummyDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Dummy Viewset + */ + async policiesDummyDestroy(requestParameters: PoliciesDummyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesDummyDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesDummyList without sending the request + */ + async policiesDummyListRequestOpts(requestParameters: PoliciesDummyListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['result'] != null) { + queryParameters['result'] = requestParameters['result']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['waitMax'] != null) { + queryParameters['wait_max'] = requestParameters['waitMax']; + } + + if (requestParameters['waitMin'] != null) { + queryParameters['wait_min'] = requestParameters['waitMin']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Dummy Viewset + */ + async policiesDummyListRaw(requestParameters: PoliciesDummyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesDummyListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDummyPolicyListFromJSON(jsonValue)); + } + + /** + * Dummy Viewset + */ + async policiesDummyList(requestParameters: PoliciesDummyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesDummyListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesDummyPartialUpdate without sending the request + */ + async policiesDummyPartialUpdateRequestOpts(requestParameters: PoliciesDummyPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesDummyPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDummyPolicyRequestToJSON(requestParameters['patchedDummyPolicyRequest']), + }; + } + + /** + * Dummy Viewset + */ + async policiesDummyPartialUpdateRaw(requestParameters: PoliciesDummyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesDummyPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyPolicyFromJSON(jsonValue)); + } + + /** + * Dummy Viewset + */ + async policiesDummyPartialUpdate(requestParameters: PoliciesDummyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesDummyPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesDummyRetrieve without sending the request + */ + async policiesDummyRetrieveRequestOpts(requestParameters: PoliciesDummyRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesDummyRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Dummy Viewset + */ + async policiesDummyRetrieveRaw(requestParameters: PoliciesDummyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesDummyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyPolicyFromJSON(jsonValue)); + } + + /** + * Dummy Viewset + */ + async policiesDummyRetrieve(requestParameters: PoliciesDummyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesDummyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesDummyUpdate without sending the request + */ + async policiesDummyUpdateRequestOpts(requestParameters: PoliciesDummyUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesDummyUpdate().' + ); + } + + if (requestParameters['dummyPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'dummyPolicyRequest', + 'Required parameter "dummyPolicyRequest" was null or undefined when calling policiesDummyUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DummyPolicyRequestToJSON(requestParameters['dummyPolicyRequest']), + }; + } + + /** + * Dummy Viewset + */ + async policiesDummyUpdateRaw(requestParameters: PoliciesDummyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesDummyUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyPolicyFromJSON(jsonValue)); + } + + /** + * Dummy Viewset + */ + async policiesDummyUpdate(requestParameters: PoliciesDummyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesDummyUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesDummyUsedByList without sending the request + */ + async policiesDummyUsedByListRequestOpts(requestParameters: PoliciesDummyUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesDummyUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/dummy/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesDummyUsedByListRaw(requestParameters: PoliciesDummyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesDummyUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesDummyUsedByList(requestParameters: PoliciesDummyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesDummyUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesEventMatcherCreate without sending the request + */ + async policiesEventMatcherCreateRequestOpts(requestParameters: PoliciesEventMatcherCreateRequest): Promise { + if (requestParameters['eventMatcherPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'eventMatcherPolicyRequest', + 'Required parameter "eventMatcherPolicyRequest" was null or undefined when calling policiesEventMatcherCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EventMatcherPolicyRequestToJSON(requestParameters['eventMatcherPolicyRequest']), + }; + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherCreateRaw(requestParameters: PoliciesEventMatcherCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesEventMatcherCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMatcherPolicyFromJSON(jsonValue)); + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherCreate(requestParameters: PoliciesEventMatcherCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesEventMatcherCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesEventMatcherDestroy without sending the request + */ + async policiesEventMatcherDestroyRequestOpts(requestParameters: PoliciesEventMatcherDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesEventMatcherDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherDestroyRaw(requestParameters: PoliciesEventMatcherDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesEventMatcherDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherDestroy(requestParameters: PoliciesEventMatcherDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesEventMatcherDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesEventMatcherList without sending the request + */ + async policiesEventMatcherListRequestOpts(requestParameters: PoliciesEventMatcherListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['action'] != null) { + queryParameters['action'] = requestParameters['action']; + } + + if (requestParameters['app'] != null) { + queryParameters['app'] = requestParameters['app']; + } + + if (requestParameters['clientIp'] != null) { + queryParameters['client_ip'] = requestParameters['clientIp']; + } + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['model'] != null) { + queryParameters['model'] = requestParameters['model']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherListRaw(requestParameters: PoliciesEventMatcherListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesEventMatcherListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEventMatcherPolicyListFromJSON(jsonValue)); + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherList(requestParameters: PoliciesEventMatcherListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesEventMatcherListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesEventMatcherPartialUpdate without sending the request + */ + async policiesEventMatcherPartialUpdateRequestOpts(requestParameters: PoliciesEventMatcherPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesEventMatcherPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEventMatcherPolicyRequestToJSON(requestParameters['patchedEventMatcherPolicyRequest']), + }; + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherPartialUpdateRaw(requestParameters: PoliciesEventMatcherPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesEventMatcherPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMatcherPolicyFromJSON(jsonValue)); + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherPartialUpdate(requestParameters: PoliciesEventMatcherPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesEventMatcherPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesEventMatcherRetrieve without sending the request + */ + async policiesEventMatcherRetrieveRequestOpts(requestParameters: PoliciesEventMatcherRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesEventMatcherRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherRetrieveRaw(requestParameters: PoliciesEventMatcherRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesEventMatcherRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMatcherPolicyFromJSON(jsonValue)); + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherRetrieve(requestParameters: PoliciesEventMatcherRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesEventMatcherRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesEventMatcherUpdate without sending the request + */ + async policiesEventMatcherUpdateRequestOpts(requestParameters: PoliciesEventMatcherUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesEventMatcherUpdate().' + ); + } + + if (requestParameters['eventMatcherPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'eventMatcherPolicyRequest', + 'Required parameter "eventMatcherPolicyRequest" was null or undefined when calling policiesEventMatcherUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EventMatcherPolicyRequestToJSON(requestParameters['eventMatcherPolicyRequest']), + }; + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherUpdateRaw(requestParameters: PoliciesEventMatcherUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesEventMatcherUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMatcherPolicyFromJSON(jsonValue)); + } + + /** + * Event Matcher Policy Viewset + */ + async policiesEventMatcherUpdate(requestParameters: PoliciesEventMatcherUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesEventMatcherUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesEventMatcherUsedByList without sending the request + */ + async policiesEventMatcherUsedByListRequestOpts(requestParameters: PoliciesEventMatcherUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesEventMatcherUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/event_matcher/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesEventMatcherUsedByListRaw(requestParameters: PoliciesEventMatcherUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesEventMatcherUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesEventMatcherUsedByList(requestParameters: PoliciesEventMatcherUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesEventMatcherUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesExpressionCreate without sending the request + */ + async policiesExpressionCreateRequestOpts(requestParameters: PoliciesExpressionCreateRequest): Promise { + if (requestParameters['expressionPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'expressionPolicyRequest', + 'Required parameter "expressionPolicyRequest" was null or undefined when calling policiesExpressionCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ExpressionPolicyRequestToJSON(requestParameters['expressionPolicyRequest']), + }; + } + + /** + * Source Viewset + */ + async policiesExpressionCreateRaw(requestParameters: PoliciesExpressionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesExpressionCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExpressionPolicyFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async policiesExpressionCreate(requestParameters: PoliciesExpressionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesExpressionCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesExpressionDestroy without sending the request + */ + async policiesExpressionDestroyRequestOpts(requestParameters: PoliciesExpressionDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesExpressionDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async policiesExpressionDestroyRaw(requestParameters: PoliciesExpressionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesExpressionDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Source Viewset + */ + async policiesExpressionDestroy(requestParameters: PoliciesExpressionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesExpressionDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesExpressionList without sending the request + */ + async policiesExpressionListRequestOpts(requestParameters: PoliciesExpressionListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['expression'] != null) { + queryParameters['expression'] = requestParameters['expression']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async policiesExpressionListRaw(requestParameters: PoliciesExpressionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesExpressionListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedExpressionPolicyListFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async policiesExpressionList(requestParameters: PoliciesExpressionListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesExpressionListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesExpressionPartialUpdate without sending the request + */ + async policiesExpressionPartialUpdateRequestOpts(requestParameters: PoliciesExpressionPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesExpressionPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedExpressionPolicyRequestToJSON(requestParameters['patchedExpressionPolicyRequest']), + }; + } + + /** + * Source Viewset + */ + async policiesExpressionPartialUpdateRaw(requestParameters: PoliciesExpressionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesExpressionPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExpressionPolicyFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async policiesExpressionPartialUpdate(requestParameters: PoliciesExpressionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesExpressionPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesExpressionRetrieve without sending the request + */ + async policiesExpressionRetrieveRequestOpts(requestParameters: PoliciesExpressionRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesExpressionRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async policiesExpressionRetrieveRaw(requestParameters: PoliciesExpressionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesExpressionRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExpressionPolicyFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async policiesExpressionRetrieve(requestParameters: PoliciesExpressionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesExpressionRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesExpressionUpdate without sending the request + */ + async policiesExpressionUpdateRequestOpts(requestParameters: PoliciesExpressionUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesExpressionUpdate().' + ); + } + + if (requestParameters['expressionPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'expressionPolicyRequest', + 'Required parameter "expressionPolicyRequest" was null or undefined when calling policiesExpressionUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ExpressionPolicyRequestToJSON(requestParameters['expressionPolicyRequest']), + }; + } + + /** + * Source Viewset + */ + async policiesExpressionUpdateRaw(requestParameters: PoliciesExpressionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesExpressionUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExpressionPolicyFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async policiesExpressionUpdate(requestParameters: PoliciesExpressionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesExpressionUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesExpressionUsedByList without sending the request + */ + async policiesExpressionUsedByListRequestOpts(requestParameters: PoliciesExpressionUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesExpressionUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/expression/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesExpressionUsedByListRaw(requestParameters: PoliciesExpressionUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesExpressionUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesExpressionUsedByList(requestParameters: PoliciesExpressionUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesExpressionUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipCreate without sending the request + */ + async policiesGeoipCreateRequestOpts(requestParameters: PoliciesGeoipCreateRequest): Promise { + if (requestParameters['geoIPPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'geoIPPolicyRequest', + 'Required parameter "geoIPPolicyRequest" was null or undefined when calling policiesGeoipCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GeoIPPolicyRequestToJSON(requestParameters['geoIPPolicyRequest']), + }; + } + + /** + * GeoIP Viewset + */ + async policiesGeoipCreateRaw(requestParameters: PoliciesGeoipCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesGeoipCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue)); + } + + /** + * GeoIP Viewset + */ + async policiesGeoipCreate(requestParameters: PoliciesGeoipCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesGeoipCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipDestroy without sending the request + */ + async policiesGeoipDestroyRequestOpts(requestParameters: PoliciesGeoipDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesGeoipDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GeoIP Viewset + */ + async policiesGeoipDestroyRaw(requestParameters: PoliciesGeoipDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesGeoipDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * GeoIP Viewset + */ + async policiesGeoipDestroy(requestParameters: PoliciesGeoipDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesGeoipDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesGeoipIso3166List without sending the request + */ + async policiesGeoipIso3166ListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip_iso3166/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all countries in ISO-3166-1 + */ + async policiesGeoipIso3166ListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesGeoipIso3166ListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DetailedCountryFromJSON)); + } + + /** + * Get all countries in ISO-3166-1 + */ + async policiesGeoipIso3166List(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesGeoipIso3166ListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipList without sending the request + */ + async policiesGeoipListRequestOpts(requestParameters: PoliciesGeoipListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GeoIP Viewset + */ + async policiesGeoipListRaw(requestParameters: PoliciesGeoipListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesGeoipListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGeoIPPolicyListFromJSON(jsonValue)); + } + + /** + * GeoIP Viewset + */ + async policiesGeoipList(requestParameters: PoliciesGeoipListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesGeoipListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipPartialUpdate without sending the request + */ + async policiesGeoipPartialUpdateRequestOpts(requestParameters: PoliciesGeoipPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesGeoipPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGeoIPPolicyRequestToJSON(requestParameters['patchedGeoIPPolicyRequest']), + }; + } + + /** + * GeoIP Viewset + */ + async policiesGeoipPartialUpdateRaw(requestParameters: PoliciesGeoipPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesGeoipPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue)); + } + + /** + * GeoIP Viewset + */ + async policiesGeoipPartialUpdate(requestParameters: PoliciesGeoipPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesGeoipPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipRetrieve without sending the request + */ + async policiesGeoipRetrieveRequestOpts(requestParameters: PoliciesGeoipRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesGeoipRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GeoIP Viewset + */ + async policiesGeoipRetrieveRaw(requestParameters: PoliciesGeoipRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesGeoipRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue)); + } + + /** + * GeoIP Viewset + */ + async policiesGeoipRetrieve(requestParameters: PoliciesGeoipRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesGeoipRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipUpdate without sending the request + */ + async policiesGeoipUpdateRequestOpts(requestParameters: PoliciesGeoipUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesGeoipUpdate().' + ); + } + + if (requestParameters['geoIPPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'geoIPPolicyRequest', + 'Required parameter "geoIPPolicyRequest" was null or undefined when calling policiesGeoipUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GeoIPPolicyRequestToJSON(requestParameters['geoIPPolicyRequest']), + }; + } + + /** + * GeoIP Viewset + */ + async policiesGeoipUpdateRaw(requestParameters: PoliciesGeoipUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesGeoipUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue)); + } + + /** + * GeoIP Viewset + */ + async policiesGeoipUpdate(requestParameters: PoliciesGeoipUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesGeoipUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesGeoipUsedByList without sending the request + */ + async policiesGeoipUsedByListRequestOpts(requestParameters: PoliciesGeoipUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesGeoipUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/geoip/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesGeoipUsedByListRaw(requestParameters: PoliciesGeoipUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesGeoipUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesGeoipUsedByList(requestParameters: PoliciesGeoipUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesGeoipUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordCreate without sending the request + */ + async policiesPasswordCreateRequestOpts(requestParameters: PoliciesPasswordCreateRequest): Promise { + if (requestParameters['passwordPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'passwordPolicyRequest', + 'Required parameter "passwordPolicyRequest" was null or undefined when calling policiesPasswordCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PasswordPolicyRequestToJSON(requestParameters['passwordPolicyRequest']), + }; + } + + /** + * Password Policy Viewset + */ + async policiesPasswordCreateRaw(requestParameters: PoliciesPasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Policy Viewset + */ + async policiesPasswordCreate(requestParameters: PoliciesPasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordDestroy without sending the request + */ + async policiesPasswordDestroyRequestOpts(requestParameters: PoliciesPasswordDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Policy Viewset + */ + async policiesPasswordDestroyRaw(requestParameters: PoliciesPasswordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Password Policy Viewset + */ + async policiesPasswordDestroy(requestParameters: PoliciesPasswordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesPasswordDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesPasswordExpiryCreate without sending the request + */ + async policiesPasswordExpiryCreateRequestOpts(requestParameters: PoliciesPasswordExpiryCreateRequest): Promise { + if (requestParameters['passwordExpiryPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'passwordExpiryPolicyRequest', + 'Required parameter "passwordExpiryPolicyRequest" was null or undefined when calling policiesPasswordExpiryCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PasswordExpiryPolicyRequestToJSON(requestParameters['passwordExpiryPolicyRequest']), + }; + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryCreateRaw(requestParameters: PoliciesPasswordExpiryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordExpiryCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordExpiryPolicyFromJSON(jsonValue)); + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryCreate(requestParameters: PoliciesPasswordExpiryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordExpiryCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordExpiryDestroy without sending the request + */ + async policiesPasswordExpiryDestroyRequestOpts(requestParameters: PoliciesPasswordExpiryDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordExpiryDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryDestroyRaw(requestParameters: PoliciesPasswordExpiryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordExpiryDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryDestroy(requestParameters: PoliciesPasswordExpiryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesPasswordExpiryDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesPasswordExpiryList without sending the request + */ + async policiesPasswordExpiryListRequestOpts(requestParameters: PoliciesPasswordExpiryListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['days'] != null) { + queryParameters['days'] = requestParameters['days']; + } + + if (requestParameters['denyOnly'] != null) { + queryParameters['deny_only'] = requestParameters['denyOnly']; + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryListRaw(requestParameters: PoliciesPasswordExpiryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordExpiryListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPasswordExpiryPolicyListFromJSON(jsonValue)); + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryList(requestParameters: PoliciesPasswordExpiryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordExpiryListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordExpiryPartialUpdate without sending the request + */ + async policiesPasswordExpiryPartialUpdateRequestOpts(requestParameters: PoliciesPasswordExpiryPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordExpiryPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPasswordExpiryPolicyRequestToJSON(requestParameters['patchedPasswordExpiryPolicyRequest']), + }; + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryPartialUpdateRaw(requestParameters: PoliciesPasswordExpiryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordExpiryPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordExpiryPolicyFromJSON(jsonValue)); + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryPartialUpdate(requestParameters: PoliciesPasswordExpiryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordExpiryPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordExpiryRetrieve without sending the request + */ + async policiesPasswordExpiryRetrieveRequestOpts(requestParameters: PoliciesPasswordExpiryRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordExpiryRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryRetrieveRaw(requestParameters: PoliciesPasswordExpiryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordExpiryRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordExpiryPolicyFromJSON(jsonValue)); + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryRetrieve(requestParameters: PoliciesPasswordExpiryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordExpiryRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordExpiryUpdate without sending the request + */ + async policiesPasswordExpiryUpdateRequestOpts(requestParameters: PoliciesPasswordExpiryUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordExpiryUpdate().' + ); + } + + if (requestParameters['passwordExpiryPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'passwordExpiryPolicyRequest', + 'Required parameter "passwordExpiryPolicyRequest" was null or undefined when calling policiesPasswordExpiryUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PasswordExpiryPolicyRequestToJSON(requestParameters['passwordExpiryPolicyRequest']), + }; + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryUpdateRaw(requestParameters: PoliciesPasswordExpiryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordExpiryUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordExpiryPolicyFromJSON(jsonValue)); + } + + /** + * Password Expiry Viewset + */ + async policiesPasswordExpiryUpdate(requestParameters: PoliciesPasswordExpiryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordExpiryUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordExpiryUsedByList without sending the request + */ + async policiesPasswordExpiryUsedByListRequestOpts(requestParameters: PoliciesPasswordExpiryUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordExpiryUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password_expiry/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesPasswordExpiryUsedByListRaw(requestParameters: PoliciesPasswordExpiryUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesPasswordExpiryUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesPasswordExpiryUsedByList(requestParameters: PoliciesPasswordExpiryUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesPasswordExpiryUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordList without sending the request + */ + async policiesPasswordListRequestOpts(requestParameters: PoliciesPasswordListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['amountDigits'] != null) { + queryParameters['amount_digits'] = requestParameters['amountDigits']; + } + + if (requestParameters['amountLowercase'] != null) { + queryParameters['amount_lowercase'] = requestParameters['amountLowercase']; + } + + if (requestParameters['amountSymbols'] != null) { + queryParameters['amount_symbols'] = requestParameters['amountSymbols']; + } + + if (requestParameters['amountUppercase'] != null) { + queryParameters['amount_uppercase'] = requestParameters['amountUppercase']; + } + + if (requestParameters['checkHaveIBeenPwned'] != null) { + queryParameters['check_have_i_been_pwned'] = requestParameters['checkHaveIBeenPwned']; + } + + if (requestParameters['checkStaticRules'] != null) { + queryParameters['check_static_rules'] = requestParameters['checkStaticRules']; + } + + if (requestParameters['checkZxcvbn'] != null) { + queryParameters['check_zxcvbn'] = requestParameters['checkZxcvbn']; + } + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['errorMessage'] != null) { + queryParameters['error_message'] = requestParameters['errorMessage']; + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['hibpAllowedCount'] != null) { + queryParameters['hibp_allowed_count'] = requestParameters['hibpAllowedCount']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['lengthMin'] != null) { + queryParameters['length_min'] = requestParameters['lengthMin']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['passwordField'] != null) { + queryParameters['password_field'] = requestParameters['passwordField']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['symbolCharset'] != null) { + queryParameters['symbol_charset'] = requestParameters['symbolCharset']; + } + + if (requestParameters['zxcvbnScoreThreshold'] != null) { + queryParameters['zxcvbn_score_threshold'] = requestParameters['zxcvbnScoreThreshold']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Policy Viewset + */ + async policiesPasswordListRaw(requestParameters: PoliciesPasswordListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPasswordPolicyListFromJSON(jsonValue)); + } + + /** + * Password Policy Viewset + */ + async policiesPasswordList(requestParameters: PoliciesPasswordListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordPartialUpdate without sending the request + */ + async policiesPasswordPartialUpdateRequestOpts(requestParameters: PoliciesPasswordPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPasswordPolicyRequestToJSON(requestParameters['patchedPasswordPolicyRequest']), + }; + } + + /** + * Password Policy Viewset + */ + async policiesPasswordPartialUpdateRaw(requestParameters: PoliciesPasswordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Policy Viewset + */ + async policiesPasswordPartialUpdate(requestParameters: PoliciesPasswordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordRetrieve without sending the request + */ + async policiesPasswordRetrieveRequestOpts(requestParameters: PoliciesPasswordRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Policy Viewset + */ + async policiesPasswordRetrieveRaw(requestParameters: PoliciesPasswordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Policy Viewset + */ + async policiesPasswordRetrieve(requestParameters: PoliciesPasswordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordUpdate without sending the request + */ + async policiesPasswordUpdateRequestOpts(requestParameters: PoliciesPasswordUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordUpdate().' + ); + } + + if (requestParameters['passwordPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'passwordPolicyRequest', + 'Required parameter "passwordPolicyRequest" was null or undefined when calling policiesPasswordUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PasswordPolicyRequestToJSON(requestParameters['passwordPolicyRequest']), + }; + } + + /** + * Password Policy Viewset + */ + async policiesPasswordUpdateRaw(requestParameters: PoliciesPasswordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesPasswordUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Policy Viewset + */ + async policiesPasswordUpdate(requestParameters: PoliciesPasswordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesPasswordUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesPasswordUsedByList without sending the request + */ + async policiesPasswordUsedByListRequestOpts(requestParameters: PoliciesPasswordUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesPasswordUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/password/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesPasswordUsedByListRaw(requestParameters: PoliciesPasswordUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesPasswordUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesPasswordUsedByList(requestParameters: PoliciesPasswordUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesPasswordUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationCreate without sending the request + */ + async policiesReputationCreateRequestOpts(requestParameters: PoliciesReputationCreateRequest): Promise { + if (requestParameters['reputationPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'reputationPolicyRequest', + 'Required parameter "reputationPolicyRequest" was null or undefined when calling policiesReputationCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ReputationPolicyRequestToJSON(requestParameters['reputationPolicyRequest']), + }; + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationCreateRaw(requestParameters: PoliciesReputationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReputationPolicyFromJSON(jsonValue)); + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationCreate(requestParameters: PoliciesReputationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationDestroy without sending the request + */ + async policiesReputationDestroyRequestOpts(requestParameters: PoliciesReputationDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesReputationDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationDestroyRaw(requestParameters: PoliciesReputationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationDestroy(requestParameters: PoliciesReputationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesReputationDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesReputationList without sending the request + */ + async policiesReputationListRequestOpts(requestParameters: PoliciesReputationListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['checkIp'] != null) { + queryParameters['check_ip'] = requestParameters['checkIp']; + } + + if (requestParameters['checkUsername'] != null) { + queryParameters['check_username'] = requestParameters['checkUsername']; + } + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['threshold'] != null) { + queryParameters['threshold'] = requestParameters['threshold']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationListRaw(requestParameters: PoliciesReputationListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedReputationPolicyListFromJSON(jsonValue)); + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationList(requestParameters: PoliciesReputationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationPartialUpdate without sending the request + */ + async policiesReputationPartialUpdateRequestOpts(requestParameters: PoliciesReputationPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesReputationPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedReputationPolicyRequestToJSON(requestParameters['patchedReputationPolicyRequest']), + }; + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationPartialUpdateRaw(requestParameters: PoliciesReputationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReputationPolicyFromJSON(jsonValue)); + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationPartialUpdate(requestParameters: PoliciesReputationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationRetrieve without sending the request + */ + async policiesReputationRetrieveRequestOpts(requestParameters: PoliciesReputationRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesReputationRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationRetrieveRaw(requestParameters: PoliciesReputationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReputationPolicyFromJSON(jsonValue)); + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationRetrieve(requestParameters: PoliciesReputationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationScoresDestroy without sending the request + */ + async policiesReputationScoresDestroyRequestOpts(requestParameters: PoliciesReputationScoresDestroyRequest): Promise { + if (requestParameters['reputationUuid'] == null) { + throw new runtime.RequiredError( + 'reputationUuid', + 'Required parameter "reputationUuid" was null or undefined when calling policiesReputationScoresDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/scores/{reputation_uuid}/`; + urlPath = urlPath.replace(`{${"reputation_uuid"}}`, encodeURIComponent(String(requestParameters['reputationUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reputation Viewset + */ + async policiesReputationScoresDestroyRaw(requestParameters: PoliciesReputationScoresDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationScoresDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Reputation Viewset + */ + async policiesReputationScoresDestroy(requestParameters: PoliciesReputationScoresDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesReputationScoresDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesReputationScoresList without sending the request + */ + async policiesReputationScoresListRequestOpts(requestParameters: PoliciesReputationScoresListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['identifier'] != null) { + queryParameters['identifier'] = requestParameters['identifier']; + } + + if (requestParameters['identifierIn'] != null) { + queryParameters['identifier_in'] = requestParameters['identifierIn']!.join(runtime.COLLECTION_FORMATS["csv"]); + } + + if (requestParameters['ip'] != null) { + queryParameters['ip'] = requestParameters['ip']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['score'] != null) { + queryParameters['score'] = requestParameters['score']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/scores/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reputation Viewset + */ + async policiesReputationScoresListRaw(requestParameters: PoliciesReputationScoresListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationScoresListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedReputationListFromJSON(jsonValue)); + } + + /** + * Reputation Viewset + */ + async policiesReputationScoresList(requestParameters: PoliciesReputationScoresListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationScoresListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationScoresRetrieve without sending the request + */ + async policiesReputationScoresRetrieveRequestOpts(requestParameters: PoliciesReputationScoresRetrieveRequest): Promise { + if (requestParameters['reputationUuid'] == null) { + throw new runtime.RequiredError( + 'reputationUuid', + 'Required parameter "reputationUuid" was null or undefined when calling policiesReputationScoresRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/scores/{reputation_uuid}/`; + urlPath = urlPath.replace(`{${"reputation_uuid"}}`, encodeURIComponent(String(requestParameters['reputationUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Reputation Viewset + */ + async policiesReputationScoresRetrieveRaw(requestParameters: PoliciesReputationScoresRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationScoresRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReputationFromJSON(jsonValue)); + } + + /** + * Reputation Viewset + */ + async policiesReputationScoresRetrieve(requestParameters: PoliciesReputationScoresRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationScoresRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationScoresUsedByList without sending the request + */ + async policiesReputationScoresUsedByListRequestOpts(requestParameters: PoliciesReputationScoresUsedByListRequest): Promise { + if (requestParameters['reputationUuid'] == null) { + throw new runtime.RequiredError( + 'reputationUuid', + 'Required parameter "reputationUuid" was null or undefined when calling policiesReputationScoresUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/scores/{reputation_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"reputation_uuid"}}`, encodeURIComponent(String(requestParameters['reputationUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesReputationScoresUsedByListRaw(requestParameters: PoliciesReputationScoresUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesReputationScoresUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesReputationScoresUsedByList(requestParameters: PoliciesReputationScoresUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesReputationScoresUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationUpdate without sending the request + */ + async policiesReputationUpdateRequestOpts(requestParameters: PoliciesReputationUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesReputationUpdate().' + ); + } + + if (requestParameters['reputationPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'reputationPolicyRequest', + 'Required parameter "reputationPolicyRequest" was null or undefined when calling policiesReputationUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ReputationPolicyRequestToJSON(requestParameters['reputationPolicyRequest']), + }; + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationUpdateRaw(requestParameters: PoliciesReputationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesReputationUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ReputationPolicyFromJSON(jsonValue)); + } + + /** + * Reputation Policy Viewset + */ + async policiesReputationUpdate(requestParameters: PoliciesReputationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesReputationUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesReputationUsedByList without sending the request + */ + async policiesReputationUsedByListRequestOpts(requestParameters: PoliciesReputationUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesReputationUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/reputation/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesReputationUsedByListRaw(requestParameters: PoliciesReputationUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesReputationUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesReputationUsedByList(requestParameters: PoliciesReputationUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesReputationUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesUniquePasswordCreate without sending the request + */ + async policiesUniquePasswordCreateRequestOpts(requestParameters: PoliciesUniquePasswordCreateRequest): Promise { + if (requestParameters['uniquePasswordPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'uniquePasswordPolicyRequest', + 'Required parameter "uniquePasswordPolicyRequest" was null or undefined when calling policiesUniquePasswordCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UniquePasswordPolicyRequestToJSON(requestParameters['uniquePasswordPolicyRequest']), + }; + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordCreateRaw(requestParameters: PoliciesUniquePasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesUniquePasswordCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UniquePasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordCreate(requestParameters: PoliciesUniquePasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesUniquePasswordCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesUniquePasswordDestroy without sending the request + */ + async policiesUniquePasswordDestroyRequestOpts(requestParameters: PoliciesUniquePasswordDestroyRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesUniquePasswordDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordDestroyRaw(requestParameters: PoliciesUniquePasswordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesUniquePasswordDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordDestroy(requestParameters: PoliciesUniquePasswordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.policiesUniquePasswordDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for policiesUniquePasswordList without sending the request + */ + async policiesUniquePasswordListRequestOpts(requestParameters: PoliciesUniquePasswordListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['created'] != null) { + queryParameters['created'] = (requestParameters['created'] as any).toISOString(); + } + + if (requestParameters['executionLogging'] != null) { + queryParameters['execution_logging'] = requestParameters['executionLogging']; + } + + if (requestParameters['lastUpdated'] != null) { + queryParameters['last_updated'] = (requestParameters['lastUpdated'] as any).toISOString(); + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['numHistoricalPasswords'] != null) { + queryParameters['num_historical_passwords'] = requestParameters['numHistoricalPasswords']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['passwordField'] != null) { + queryParameters['password_field'] = requestParameters['passwordField']; + } + + if (requestParameters['policyUuid'] != null) { + queryParameters['policy_uuid'] = requestParameters['policyUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordListRaw(requestParameters: PoliciesUniquePasswordListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesUniquePasswordListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUniquePasswordPolicyListFromJSON(jsonValue)); + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordList(requestParameters: PoliciesUniquePasswordListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesUniquePasswordListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesUniquePasswordPartialUpdate without sending the request + */ + async policiesUniquePasswordPartialUpdateRequestOpts(requestParameters: PoliciesUniquePasswordPartialUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesUniquePasswordPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUniquePasswordPolicyRequestToJSON(requestParameters['patchedUniquePasswordPolicyRequest']), + }; + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordPartialUpdateRaw(requestParameters: PoliciesUniquePasswordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesUniquePasswordPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UniquePasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordPartialUpdate(requestParameters: PoliciesUniquePasswordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesUniquePasswordPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesUniquePasswordRetrieve without sending the request + */ + async policiesUniquePasswordRetrieveRequestOpts(requestParameters: PoliciesUniquePasswordRetrieveRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesUniquePasswordRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordRetrieveRaw(requestParameters: PoliciesUniquePasswordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesUniquePasswordRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UniquePasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordRetrieve(requestParameters: PoliciesUniquePasswordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesUniquePasswordRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesUniquePasswordUpdate without sending the request + */ + async policiesUniquePasswordUpdateRequestOpts(requestParameters: PoliciesUniquePasswordUpdateRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesUniquePasswordUpdate().' + ); + } + + if (requestParameters['uniquePasswordPolicyRequest'] == null) { + throw new runtime.RequiredError( + 'uniquePasswordPolicyRequest', + 'Required parameter "uniquePasswordPolicyRequest" was null or undefined when calling policiesUniquePasswordUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/{policy_uuid}/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UniquePasswordPolicyRequestToJSON(requestParameters['uniquePasswordPolicyRequest']), + }; + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordUpdateRaw(requestParameters: PoliciesUniquePasswordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.policiesUniquePasswordUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UniquePasswordPolicyFromJSON(jsonValue)); + } + + /** + * Password Uniqueness Policy Viewset + */ + async policiesUniquePasswordUpdate(requestParameters: PoliciesUniquePasswordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policiesUniquePasswordUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for policiesUniquePasswordUsedByList without sending the request + */ + async policiesUniquePasswordUsedByListRequestOpts(requestParameters: PoliciesUniquePasswordUsedByListRequest): Promise { + if (requestParameters['policyUuid'] == null) { + throw new runtime.RequiredError( + 'policyUuid', + 'Required parameter "policyUuid" was null or undefined when calling policiesUniquePasswordUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/policies/unique_password/{policy_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters['policyUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async policiesUniquePasswordUsedByListRaw(requestParameters: PoliciesUniquePasswordUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.policiesUniquePasswordUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async policiesUniquePasswordUsedByList(requestParameters: PoliciesUniquePasswordUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.policiesUniquePasswordUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const PoliciesEventMatcherListActionEnum = { + AuthorizeApplication: 'authorize_application', + ConfigurationError: 'configuration_error', + ConfigurationWarning: 'configuration_warning', + Custom: 'custom_', + EmailSent: 'email_sent', + ExportReady: 'export_ready', + FlowExecution: 'flow_execution', + ImpersonationEnded: 'impersonation_ended', + ImpersonationStarted: 'impersonation_started', + InvitationUsed: 'invitation_used', + Login: 'login', + LoginFailed: 'login_failed', + Logout: 'logout', + ModelCreated: 'model_created', + ModelDeleted: 'model_deleted', + ModelUpdated: 'model_updated', + PasswordSet: 'password_set', + PolicyException: 'policy_exception', + PolicyExecution: 'policy_execution', + PropertyMappingException: 'property_mapping_exception', + ReviewAttested: 'review_attested', + ReviewCompleted: 'review_completed', + ReviewInitiated: 'review_initiated', + ReviewOverdue: 'review_overdue', + SecretRotate: 'secret_rotate', + SecretView: 'secret_view', + SourceLinked: 'source_linked', + SuspiciousRequest: 'suspicious_request', + SystemException: 'system_exception', + SystemTaskException: 'system_task_exception', + SystemTaskExecution: 'system_task_execution', + UpdateAvailable: 'update_available', + UserWrite: 'user_write', + UnknownDefaultOpenApi: '11184809' +} as const; +export type PoliciesEventMatcherListActionEnum = typeof PoliciesEventMatcherListActionEnum[keyof typeof PoliciesEventMatcherListActionEnum]; diff --git a/packages/client-ts/src/apis/PropertymappingsApi.ts b/packages/client-ts/src/apis/PropertymappingsApi.ts new file mode 100644 index 0000000000..920092230e --- /dev/null +++ b/packages/client-ts/src/apis/PropertymappingsApi.ts @@ -0,0 +1,7220 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + GoogleWorkspaceProviderMapping, + GoogleWorkspaceProviderMappingRequest, + KerberosSourcePropertyMapping, + KerberosSourcePropertyMappingRequest, + LDAPSourcePropertyMapping, + LDAPSourcePropertyMappingRequest, + MicrosoftEntraProviderMapping, + MicrosoftEntraProviderMappingRequest, + NotificationWebhookMapping, + NotificationWebhookMappingRequest, + OAuthSourcePropertyMapping, + OAuthSourcePropertyMappingRequest, + PaginatedGoogleWorkspaceProviderMappingList, + PaginatedKerberosSourcePropertyMappingList, + PaginatedLDAPSourcePropertyMappingList, + PaginatedMicrosoftEntraProviderMappingList, + PaginatedNotificationWebhookMappingList, + PaginatedOAuthSourcePropertyMappingList, + PaginatedPlexSourcePropertyMappingList, + PaginatedPropertyMappingList, + PaginatedRACPropertyMappingList, + PaginatedRadiusProviderPropertyMappingList, + PaginatedSAMLPropertyMappingList, + PaginatedSAMLSourcePropertyMappingList, + PaginatedSCIMMappingList, + PaginatedSCIMSourcePropertyMappingList, + PaginatedScopeMappingList, + PaginatedTelegramSourcePropertyMappingList, + PatchedGoogleWorkspaceProviderMappingRequest, + PatchedKerberosSourcePropertyMappingRequest, + PatchedLDAPSourcePropertyMappingRequest, + PatchedMicrosoftEntraProviderMappingRequest, + PatchedNotificationWebhookMappingRequest, + PatchedOAuthSourcePropertyMappingRequest, + PatchedPlexSourcePropertyMappingRequest, + PatchedRACPropertyMappingRequest, + PatchedRadiusProviderPropertyMappingRequest, + PatchedSAMLPropertyMappingRequest, + PatchedSAMLSourcePropertyMappingRequest, + PatchedSCIMMappingRequest, + PatchedSCIMSourcePropertyMappingRequest, + PatchedScopeMappingRequest, + PatchedTelegramSourcePropertyMappingRequest, + PlexSourcePropertyMapping, + PlexSourcePropertyMappingRequest, + PropertyMapping, + PropertyMappingTestRequest, + PropertyMappingTestResult, + RACPropertyMapping, + RACPropertyMappingRequest, + RadiusProviderPropertyMapping, + RadiusProviderPropertyMappingRequest, + SAMLPropertyMapping, + SAMLPropertyMappingRequest, + SAMLSourcePropertyMapping, + SAMLSourcePropertyMappingRequest, + SCIMMapping, + SCIMMappingRequest, + SCIMSourcePropertyMapping, + SCIMSourcePropertyMappingRequest, + ScopeMapping, + ScopeMappingRequest, + TelegramSourcePropertyMapping, + TelegramSourcePropertyMappingRequest, + TypeCreate, + UsedBy, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + GoogleWorkspaceProviderMappingFromJSON, + GoogleWorkspaceProviderMappingToJSON, + GoogleWorkspaceProviderMappingRequestFromJSON, + GoogleWorkspaceProviderMappingRequestToJSON, + KerberosSourcePropertyMappingFromJSON, + KerberosSourcePropertyMappingToJSON, + KerberosSourcePropertyMappingRequestFromJSON, + KerberosSourcePropertyMappingRequestToJSON, + LDAPSourcePropertyMappingFromJSON, + LDAPSourcePropertyMappingToJSON, + LDAPSourcePropertyMappingRequestFromJSON, + LDAPSourcePropertyMappingRequestToJSON, + MicrosoftEntraProviderMappingFromJSON, + MicrosoftEntraProviderMappingToJSON, + MicrosoftEntraProviderMappingRequestFromJSON, + MicrosoftEntraProviderMappingRequestToJSON, + NotificationWebhookMappingFromJSON, + NotificationWebhookMappingToJSON, + NotificationWebhookMappingRequestFromJSON, + NotificationWebhookMappingRequestToJSON, + OAuthSourcePropertyMappingFromJSON, + OAuthSourcePropertyMappingToJSON, + OAuthSourcePropertyMappingRequestFromJSON, + OAuthSourcePropertyMappingRequestToJSON, + PaginatedGoogleWorkspaceProviderMappingListFromJSON, + PaginatedGoogleWorkspaceProviderMappingListToJSON, + PaginatedKerberosSourcePropertyMappingListFromJSON, + PaginatedKerberosSourcePropertyMappingListToJSON, + PaginatedLDAPSourcePropertyMappingListFromJSON, + PaginatedLDAPSourcePropertyMappingListToJSON, + PaginatedMicrosoftEntraProviderMappingListFromJSON, + PaginatedMicrosoftEntraProviderMappingListToJSON, + PaginatedNotificationWebhookMappingListFromJSON, + PaginatedNotificationWebhookMappingListToJSON, + PaginatedOAuthSourcePropertyMappingListFromJSON, + PaginatedOAuthSourcePropertyMappingListToJSON, + PaginatedPlexSourcePropertyMappingListFromJSON, + PaginatedPlexSourcePropertyMappingListToJSON, + PaginatedPropertyMappingListFromJSON, + PaginatedPropertyMappingListToJSON, + PaginatedRACPropertyMappingListFromJSON, + PaginatedRACPropertyMappingListToJSON, + PaginatedRadiusProviderPropertyMappingListFromJSON, + PaginatedRadiusProviderPropertyMappingListToJSON, + PaginatedSAMLPropertyMappingListFromJSON, + PaginatedSAMLPropertyMappingListToJSON, + PaginatedSAMLSourcePropertyMappingListFromJSON, + PaginatedSAMLSourcePropertyMappingListToJSON, + PaginatedSCIMMappingListFromJSON, + PaginatedSCIMMappingListToJSON, + PaginatedSCIMSourcePropertyMappingListFromJSON, + PaginatedSCIMSourcePropertyMappingListToJSON, + PaginatedScopeMappingListFromJSON, + PaginatedScopeMappingListToJSON, + PaginatedTelegramSourcePropertyMappingListFromJSON, + PaginatedTelegramSourcePropertyMappingListToJSON, + PatchedGoogleWorkspaceProviderMappingRequestFromJSON, + PatchedGoogleWorkspaceProviderMappingRequestToJSON, + PatchedKerberosSourcePropertyMappingRequestFromJSON, + PatchedKerberosSourcePropertyMappingRequestToJSON, + PatchedLDAPSourcePropertyMappingRequestFromJSON, + PatchedLDAPSourcePropertyMappingRequestToJSON, + PatchedMicrosoftEntraProviderMappingRequestFromJSON, + PatchedMicrosoftEntraProviderMappingRequestToJSON, + PatchedNotificationWebhookMappingRequestFromJSON, + PatchedNotificationWebhookMappingRequestToJSON, + PatchedOAuthSourcePropertyMappingRequestFromJSON, + PatchedOAuthSourcePropertyMappingRequestToJSON, + PatchedPlexSourcePropertyMappingRequestFromJSON, + PatchedPlexSourcePropertyMappingRequestToJSON, + PatchedRACPropertyMappingRequestFromJSON, + PatchedRACPropertyMappingRequestToJSON, + PatchedRadiusProviderPropertyMappingRequestFromJSON, + PatchedRadiusProviderPropertyMappingRequestToJSON, + PatchedSAMLPropertyMappingRequestFromJSON, + PatchedSAMLPropertyMappingRequestToJSON, + PatchedSAMLSourcePropertyMappingRequestFromJSON, + PatchedSAMLSourcePropertyMappingRequestToJSON, + PatchedSCIMMappingRequestFromJSON, + PatchedSCIMMappingRequestToJSON, + PatchedSCIMSourcePropertyMappingRequestFromJSON, + PatchedSCIMSourcePropertyMappingRequestToJSON, + PatchedScopeMappingRequestFromJSON, + PatchedScopeMappingRequestToJSON, + PatchedTelegramSourcePropertyMappingRequestFromJSON, + PatchedTelegramSourcePropertyMappingRequestToJSON, + PlexSourcePropertyMappingFromJSON, + PlexSourcePropertyMappingToJSON, + PlexSourcePropertyMappingRequestFromJSON, + PlexSourcePropertyMappingRequestToJSON, + PropertyMappingFromJSON, + PropertyMappingToJSON, + PropertyMappingTestRequestFromJSON, + PropertyMappingTestRequestToJSON, + PropertyMappingTestResultFromJSON, + PropertyMappingTestResultToJSON, + RACPropertyMappingFromJSON, + RACPropertyMappingToJSON, + RACPropertyMappingRequestFromJSON, + RACPropertyMappingRequestToJSON, + RadiusProviderPropertyMappingFromJSON, + RadiusProviderPropertyMappingToJSON, + RadiusProviderPropertyMappingRequestFromJSON, + RadiusProviderPropertyMappingRequestToJSON, + SAMLPropertyMappingFromJSON, + SAMLPropertyMappingToJSON, + SAMLPropertyMappingRequestFromJSON, + SAMLPropertyMappingRequestToJSON, + SAMLSourcePropertyMappingFromJSON, + SAMLSourcePropertyMappingToJSON, + SAMLSourcePropertyMappingRequestFromJSON, + SAMLSourcePropertyMappingRequestToJSON, + SCIMMappingFromJSON, + SCIMMappingToJSON, + SCIMMappingRequestFromJSON, + SCIMMappingRequestToJSON, + SCIMSourcePropertyMappingFromJSON, + SCIMSourcePropertyMappingToJSON, + SCIMSourcePropertyMappingRequestFromJSON, + SCIMSourcePropertyMappingRequestToJSON, + ScopeMappingFromJSON, + ScopeMappingToJSON, + ScopeMappingRequestFromJSON, + ScopeMappingRequestToJSON, + TelegramSourcePropertyMappingFromJSON, + TelegramSourcePropertyMappingToJSON, + TelegramSourcePropertyMappingRequestFromJSON, + TelegramSourcePropertyMappingRequestToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface PropertymappingsAllDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsAllListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsAllRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsAllTestCreateRequest { + pmUuid: string; + formatResult?: boolean; + propertyMappingTestRequest?: PropertyMappingTestRequest; +} + +export interface PropertymappingsAllUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsNotificationCreateRequest { + notificationWebhookMappingRequest: NotificationWebhookMappingRequest; +} + +export interface PropertymappingsNotificationDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsNotificationListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsNotificationPartialUpdateRequest { + pmUuid: string; + patchedNotificationWebhookMappingRequest?: PatchedNotificationWebhookMappingRequest; +} + +export interface PropertymappingsNotificationRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsNotificationUpdateRequest { + pmUuid: string; + notificationWebhookMappingRequest: NotificationWebhookMappingRequest; +} + +export interface PropertymappingsNotificationUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderGoogleWorkspaceCreateRequest { + googleWorkspaceProviderMappingRequest: GoogleWorkspaceProviderMappingRequest; +} + +export interface PropertymappingsProviderGoogleWorkspaceDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderGoogleWorkspaceListRequest { + expression?: string; + managed?: Array; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pmUuid?: string; + search?: string; +} + +export interface PropertymappingsProviderGoogleWorkspacePartialUpdateRequest { + pmUuid: string; + patchedGoogleWorkspaceProviderMappingRequest?: PatchedGoogleWorkspaceProviderMappingRequest; +} + +export interface PropertymappingsProviderGoogleWorkspaceRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderGoogleWorkspaceUpdateRequest { + pmUuid: string; + googleWorkspaceProviderMappingRequest: GoogleWorkspaceProviderMappingRequest; +} + +export interface PropertymappingsProviderGoogleWorkspaceUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderMicrosoftEntraCreateRequest { + microsoftEntraProviderMappingRequest: MicrosoftEntraProviderMappingRequest; +} + +export interface PropertymappingsProviderMicrosoftEntraDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderMicrosoftEntraListRequest { + expression?: string; + managed?: Array; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pmUuid?: string; + search?: string; +} + +export interface PropertymappingsProviderMicrosoftEntraPartialUpdateRequest { + pmUuid: string; + patchedMicrosoftEntraProviderMappingRequest?: PatchedMicrosoftEntraProviderMappingRequest; +} + +export interface PropertymappingsProviderMicrosoftEntraRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderMicrosoftEntraUpdateRequest { + pmUuid: string; + microsoftEntraProviderMappingRequest: MicrosoftEntraProviderMappingRequest; +} + +export interface PropertymappingsProviderMicrosoftEntraUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderRacCreateRequest { + rACPropertyMappingRequest: RACPropertyMappingRequest; +} + +export interface PropertymappingsProviderRacDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderRacListRequest { + managed?: Array; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsProviderRacPartialUpdateRequest { + pmUuid: string; + patchedRACPropertyMappingRequest?: PatchedRACPropertyMappingRequest; +} + +export interface PropertymappingsProviderRacRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderRacUpdateRequest { + pmUuid: string; + rACPropertyMappingRequest: RACPropertyMappingRequest; +} + +export interface PropertymappingsProviderRacUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderRadiusCreateRequest { + radiusProviderPropertyMappingRequest: RadiusProviderPropertyMappingRequest; +} + +export interface PropertymappingsProviderRadiusDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderRadiusListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsProviderRadiusPartialUpdateRequest { + pmUuid: string; + patchedRadiusProviderPropertyMappingRequest?: PatchedRadiusProviderPropertyMappingRequest; +} + +export interface PropertymappingsProviderRadiusRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderRadiusUpdateRequest { + pmUuid: string; + radiusProviderPropertyMappingRequest: RadiusProviderPropertyMappingRequest; +} + +export interface PropertymappingsProviderRadiusUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderSamlCreateRequest { + sAMLPropertyMappingRequest: SAMLPropertyMappingRequest; +} + +export interface PropertymappingsProviderSamlDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderSamlListRequest { + friendlyName?: string; + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + samlName?: string; + search?: string; +} + +export interface PropertymappingsProviderSamlPartialUpdateRequest { + pmUuid: string; + patchedSAMLPropertyMappingRequest?: PatchedSAMLPropertyMappingRequest; +} + +export interface PropertymappingsProviderSamlRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderSamlUpdateRequest { + pmUuid: string; + sAMLPropertyMappingRequest: SAMLPropertyMappingRequest; +} + +export interface PropertymappingsProviderSamlUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderScimCreateRequest { + sCIMMappingRequest: SCIMMappingRequest; +} + +export interface PropertymappingsProviderScimDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderScimListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsProviderScimPartialUpdateRequest { + pmUuid: string; + patchedSCIMMappingRequest?: PatchedSCIMMappingRequest; +} + +export interface PropertymappingsProviderScimRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderScimUpdateRequest { + pmUuid: string; + sCIMMappingRequest: SCIMMappingRequest; +} + +export interface PropertymappingsProviderScimUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderScopeCreateRequest { + scopeMappingRequest: ScopeMappingRequest; +} + +export interface PropertymappingsProviderScopeDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderScopeListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + scopeName?: string; + search?: string; +} + +export interface PropertymappingsProviderScopePartialUpdateRequest { + pmUuid: string; + patchedScopeMappingRequest?: PatchedScopeMappingRequest; +} + +export interface PropertymappingsProviderScopeRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsProviderScopeUpdateRequest { + pmUuid: string; + scopeMappingRequest: ScopeMappingRequest; +} + +export interface PropertymappingsProviderScopeUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceKerberosCreateRequest { + kerberosSourcePropertyMappingRequest: KerberosSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceKerberosDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceKerberosListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourceKerberosPartialUpdateRequest { + pmUuid: string; + patchedKerberosSourcePropertyMappingRequest?: PatchedKerberosSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceKerberosRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceKerberosUpdateRequest { + pmUuid: string; + kerberosSourcePropertyMappingRequest: KerberosSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceKerberosUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceLdapCreateRequest { + lDAPSourcePropertyMappingRequest: LDAPSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceLdapDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceLdapListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourceLdapPartialUpdateRequest { + pmUuid: string; + patchedLDAPSourcePropertyMappingRequest?: PatchedLDAPSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceLdapRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceLdapUpdateRequest { + pmUuid: string; + lDAPSourcePropertyMappingRequest: LDAPSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceLdapUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceOauthCreateRequest { + oAuthSourcePropertyMappingRequest: OAuthSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceOauthDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceOauthListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourceOauthPartialUpdateRequest { + pmUuid: string; + patchedOAuthSourcePropertyMappingRequest?: PatchedOAuthSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceOauthRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceOauthUpdateRequest { + pmUuid: string; + oAuthSourcePropertyMappingRequest: OAuthSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceOauthUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourcePlexCreateRequest { + plexSourcePropertyMappingRequest: PlexSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourcePlexDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourcePlexListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourcePlexPartialUpdateRequest { + pmUuid: string; + patchedPlexSourcePropertyMappingRequest?: PatchedPlexSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourcePlexRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourcePlexUpdateRequest { + pmUuid: string; + plexSourcePropertyMappingRequest: PlexSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourcePlexUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceSamlCreateRequest { + sAMLSourcePropertyMappingRequest: SAMLSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceSamlDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceSamlListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourceSamlPartialUpdateRequest { + pmUuid: string; + patchedSAMLSourcePropertyMappingRequest?: PatchedSAMLSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceSamlRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceSamlUpdateRequest { + pmUuid: string; + sAMLSourcePropertyMappingRequest: SAMLSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceSamlUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceScimCreateRequest { + sCIMSourcePropertyMappingRequest: SCIMSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceScimDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceScimListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourceScimPartialUpdateRequest { + pmUuid: string; + patchedSCIMSourcePropertyMappingRequest?: PatchedSCIMSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceScimRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceScimUpdateRequest { + pmUuid: string; + sCIMSourcePropertyMappingRequest: SCIMSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceScimUsedByListRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceTelegramCreateRequest { + telegramSourcePropertyMappingRequest: TelegramSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceTelegramDestroyRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceTelegramListRequest { + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface PropertymappingsSourceTelegramPartialUpdateRequest { + pmUuid: string; + patchedTelegramSourcePropertyMappingRequest?: PatchedTelegramSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceTelegramRetrieveRequest { + pmUuid: string; +} + +export interface PropertymappingsSourceTelegramUpdateRequest { + pmUuid: string; + telegramSourcePropertyMappingRequest: TelegramSourcePropertyMappingRequest; +} + +export interface PropertymappingsSourceTelegramUsedByListRequest { + pmUuid: string; +} + +/** + * + */ +export class PropertymappingsApi extends runtime.BaseAPI { + + /** + * Creates request options for propertymappingsAllDestroy without sending the request + */ + async propertymappingsAllDestroyRequestOpts(requestParameters: PropertymappingsAllDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/all/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PropertyMapping Viewset + */ + async propertymappingsAllDestroyRaw(requestParameters: PropertymappingsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * PropertyMapping Viewset + */ + async propertymappingsAllDestroy(requestParameters: PropertymappingsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsAllList without sending the request + */ + async propertymappingsAllListRequestOpts(requestParameters: PropertymappingsAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PropertyMapping Viewset + */ + async propertymappingsAllListRaw(requestParameters: PropertymappingsAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPropertyMappingListFromJSON(jsonValue)); + } + + /** + * PropertyMapping Viewset + */ + async propertymappingsAllList(requestParameters: PropertymappingsAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsAllRetrieve without sending the request + */ + async propertymappingsAllRetrieveRequestOpts(requestParameters: PropertymappingsAllRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/all/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PropertyMapping Viewset + */ + async propertymappingsAllRetrieveRaw(requestParameters: PropertymappingsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PropertyMappingFromJSON(jsonValue)); + } + + /** + * PropertyMapping Viewset + */ + async propertymappingsAllRetrieve(requestParameters: PropertymappingsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsAllTestCreate without sending the request + */ + async propertymappingsAllTestCreateRequestOpts(requestParameters: PropertymappingsAllTestCreateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsAllTestCreate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['formatResult'] != null) { + queryParameters['format_result'] = requestParameters['formatResult']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/all/{pm_uuid}/test/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PropertyMappingTestRequestToJSON(requestParameters['propertyMappingTestRequest']), + }; + } + + /** + * Test Property Mapping + */ + async propertymappingsAllTestCreateRaw(requestParameters: PropertymappingsAllTestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsAllTestCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PropertyMappingTestResultFromJSON(jsonValue)); + } + + /** + * Test Property Mapping + */ + async propertymappingsAllTestCreate(requestParameters: PropertymappingsAllTestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsAllTestCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsAllTypesList without sending the request + */ + async propertymappingsAllTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/all/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async propertymappingsAllTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsAllTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async propertymappingsAllTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsAllTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsAllUsedByList without sending the request + */ + async propertymappingsAllUsedByListRequestOpts(requestParameters: PropertymappingsAllUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/all/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsAllUsedByListRaw(requestParameters: PropertymappingsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsAllUsedByList(requestParameters: PropertymappingsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsNotificationCreate without sending the request + */ + async propertymappingsNotificationCreateRequestOpts(requestParameters: PropertymappingsNotificationCreateRequest): Promise { + if (requestParameters['notificationWebhookMappingRequest'] == null) { + throw new runtime.RequiredError( + 'notificationWebhookMappingRequest', + 'Required parameter "notificationWebhookMappingRequest" was null or undefined when calling propertymappingsNotificationCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NotificationWebhookMappingRequestToJSON(requestParameters['notificationWebhookMappingRequest']), + }; + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationCreateRaw(requestParameters: PropertymappingsNotificationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsNotificationCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationWebhookMappingFromJSON(jsonValue)); + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationCreate(requestParameters: PropertymappingsNotificationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsNotificationCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsNotificationDestroy without sending the request + */ + async propertymappingsNotificationDestroyRequestOpts(requestParameters: PropertymappingsNotificationDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsNotificationDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationDestroyRaw(requestParameters: PropertymappingsNotificationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsNotificationDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationDestroy(requestParameters: PropertymappingsNotificationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsNotificationDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsNotificationList without sending the request + */ + async propertymappingsNotificationListRequestOpts(requestParameters: PropertymappingsNotificationListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationListRaw(requestParameters: PropertymappingsNotificationListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsNotificationListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedNotificationWebhookMappingListFromJSON(jsonValue)); + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationList(requestParameters: PropertymappingsNotificationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsNotificationListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsNotificationPartialUpdate without sending the request + */ + async propertymappingsNotificationPartialUpdateRequestOpts(requestParameters: PropertymappingsNotificationPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsNotificationPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedNotificationWebhookMappingRequestToJSON(requestParameters['patchedNotificationWebhookMappingRequest']), + }; + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationPartialUpdateRaw(requestParameters: PropertymappingsNotificationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsNotificationPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationWebhookMappingFromJSON(jsonValue)); + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationPartialUpdate(requestParameters: PropertymappingsNotificationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsNotificationPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsNotificationRetrieve without sending the request + */ + async propertymappingsNotificationRetrieveRequestOpts(requestParameters: PropertymappingsNotificationRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsNotificationRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationRetrieveRaw(requestParameters: PropertymappingsNotificationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsNotificationRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationWebhookMappingFromJSON(jsonValue)); + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationRetrieve(requestParameters: PropertymappingsNotificationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsNotificationRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsNotificationUpdate without sending the request + */ + async propertymappingsNotificationUpdateRequestOpts(requestParameters: PropertymappingsNotificationUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsNotificationUpdate().' + ); + } + + if (requestParameters['notificationWebhookMappingRequest'] == null) { + throw new runtime.RequiredError( + 'notificationWebhookMappingRequest', + 'Required parameter "notificationWebhookMappingRequest" was null or undefined when calling propertymappingsNotificationUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: NotificationWebhookMappingRequestToJSON(requestParameters['notificationWebhookMappingRequest']), + }; + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationUpdateRaw(requestParameters: PropertymappingsNotificationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsNotificationUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NotificationWebhookMappingFromJSON(jsonValue)); + } + + /** + * NotificationWebhookMapping Viewset + */ + async propertymappingsNotificationUpdate(requestParameters: PropertymappingsNotificationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsNotificationUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsNotificationUsedByList without sending the request + */ + async propertymappingsNotificationUsedByListRequestOpts(requestParameters: PropertymappingsNotificationUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsNotificationUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/notification/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsNotificationUsedByListRaw(requestParameters: PropertymappingsNotificationUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsNotificationUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsNotificationUsedByList(requestParameters: PropertymappingsNotificationUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsNotificationUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspaceCreate without sending the request + */ + async propertymappingsProviderGoogleWorkspaceCreateRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspaceCreateRequest): Promise { + if (requestParameters['googleWorkspaceProviderMappingRequest'] == null) { + throw new runtime.RequiredError( + 'googleWorkspaceProviderMappingRequest', + 'Required parameter "googleWorkspaceProviderMappingRequest" was null or undefined when calling propertymappingsProviderGoogleWorkspaceCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GoogleWorkspaceProviderMappingRequestToJSON(requestParameters['googleWorkspaceProviderMappingRequest']), + }; + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceCreateRaw(requestParameters: PropertymappingsProviderGoogleWorkspaceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspaceCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderMappingFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceCreate(requestParameters: PropertymappingsProviderGoogleWorkspaceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderGoogleWorkspaceCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspaceDestroy without sending the request + */ + async propertymappingsProviderGoogleWorkspaceDestroyRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspaceDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderGoogleWorkspaceDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceDestroyRaw(requestParameters: PropertymappingsProviderGoogleWorkspaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspaceDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceDestroy(requestParameters: PropertymappingsProviderGoogleWorkspaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderGoogleWorkspaceDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspaceList without sending the request + */ + async propertymappingsProviderGoogleWorkspaceListRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspaceListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['expression'] != null) { + queryParameters['expression'] = requestParameters['expression']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pmUuid'] != null) { + queryParameters['pm_uuid'] = requestParameters['pmUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceListRaw(requestParameters: PropertymappingsProviderGoogleWorkspaceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspaceListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleWorkspaceProviderMappingListFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceList(requestParameters: PropertymappingsProviderGoogleWorkspaceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderGoogleWorkspaceListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspacePartialUpdate without sending the request + */ + async propertymappingsProviderGoogleWorkspacePartialUpdateRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspacePartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderGoogleWorkspacePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGoogleWorkspaceProviderMappingRequestToJSON(requestParameters['patchedGoogleWorkspaceProviderMappingRequest']), + }; + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspacePartialUpdateRaw(requestParameters: PropertymappingsProviderGoogleWorkspacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspacePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderMappingFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspacePartialUpdate(requestParameters: PropertymappingsProviderGoogleWorkspacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderGoogleWorkspacePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspaceRetrieve without sending the request + */ + async propertymappingsProviderGoogleWorkspaceRetrieveRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspaceRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderGoogleWorkspaceRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceRetrieveRaw(requestParameters: PropertymappingsProviderGoogleWorkspaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspaceRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderMappingFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceRetrieve(requestParameters: PropertymappingsProviderGoogleWorkspaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderGoogleWorkspaceRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspaceUpdate without sending the request + */ + async propertymappingsProviderGoogleWorkspaceUpdateRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspaceUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderGoogleWorkspaceUpdate().' + ); + } + + if (requestParameters['googleWorkspaceProviderMappingRequest'] == null) { + throw new runtime.RequiredError( + 'googleWorkspaceProviderMappingRequest', + 'Required parameter "googleWorkspaceProviderMappingRequest" was null or undefined when calling propertymappingsProviderGoogleWorkspaceUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GoogleWorkspaceProviderMappingRequestToJSON(requestParameters['googleWorkspaceProviderMappingRequest']), + }; + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceUpdateRaw(requestParameters: PropertymappingsProviderGoogleWorkspaceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspaceUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderMappingFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderMapping Viewset + */ + async propertymappingsProviderGoogleWorkspaceUpdate(requestParameters: PropertymappingsProviderGoogleWorkspaceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderGoogleWorkspaceUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderGoogleWorkspaceUsedByList without sending the request + */ + async propertymappingsProviderGoogleWorkspaceUsedByListRequestOpts(requestParameters: PropertymappingsProviderGoogleWorkspaceUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderGoogleWorkspaceUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/google_workspace/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderGoogleWorkspaceUsedByListRaw(requestParameters: PropertymappingsProviderGoogleWorkspaceUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderGoogleWorkspaceUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderGoogleWorkspaceUsedByList(requestParameters: PropertymappingsProviderGoogleWorkspaceUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderGoogleWorkspaceUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraCreate without sending the request + */ + async propertymappingsProviderMicrosoftEntraCreateRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraCreateRequest): Promise { + if (requestParameters['microsoftEntraProviderMappingRequest'] == null) { + throw new runtime.RequiredError( + 'microsoftEntraProviderMappingRequest', + 'Required parameter "microsoftEntraProviderMappingRequest" was null or undefined when calling propertymappingsProviderMicrosoftEntraCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MicrosoftEntraProviderMappingRequestToJSON(requestParameters['microsoftEntraProviderMappingRequest']), + }; + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraCreateRaw(requestParameters: PropertymappingsProviderMicrosoftEntraCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderMappingFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraCreate(requestParameters: PropertymappingsProviderMicrosoftEntraCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderMicrosoftEntraCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraDestroy without sending the request + */ + async propertymappingsProviderMicrosoftEntraDestroyRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderMicrosoftEntraDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraDestroyRaw(requestParameters: PropertymappingsProviderMicrosoftEntraDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraDestroy(requestParameters: PropertymappingsProviderMicrosoftEntraDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderMicrosoftEntraDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraList without sending the request + */ + async propertymappingsProviderMicrosoftEntraListRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['expression'] != null) { + queryParameters['expression'] = requestParameters['expression']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pmUuid'] != null) { + queryParameters['pm_uuid'] = requestParameters['pmUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraListRaw(requestParameters: PropertymappingsProviderMicrosoftEntraListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMicrosoftEntraProviderMappingListFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraList(requestParameters: PropertymappingsProviderMicrosoftEntraListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderMicrosoftEntraListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraPartialUpdate without sending the request + */ + async propertymappingsProviderMicrosoftEntraPartialUpdateRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderMicrosoftEntraPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedMicrosoftEntraProviderMappingRequestToJSON(requestParameters['patchedMicrosoftEntraProviderMappingRequest']), + }; + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraPartialUpdateRaw(requestParameters: PropertymappingsProviderMicrosoftEntraPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderMappingFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraPartialUpdate(requestParameters: PropertymappingsProviderMicrosoftEntraPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderMicrosoftEntraPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraRetrieve without sending the request + */ + async propertymappingsProviderMicrosoftEntraRetrieveRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderMicrosoftEntraRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraRetrieveRaw(requestParameters: PropertymappingsProviderMicrosoftEntraRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderMappingFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraRetrieve(requestParameters: PropertymappingsProviderMicrosoftEntraRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderMicrosoftEntraRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraUpdate without sending the request + */ + async propertymappingsProviderMicrosoftEntraUpdateRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderMicrosoftEntraUpdate().' + ); + } + + if (requestParameters['microsoftEntraProviderMappingRequest'] == null) { + throw new runtime.RequiredError( + 'microsoftEntraProviderMappingRequest', + 'Required parameter "microsoftEntraProviderMappingRequest" was null or undefined when calling propertymappingsProviderMicrosoftEntraUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: MicrosoftEntraProviderMappingRequestToJSON(requestParameters['microsoftEntraProviderMappingRequest']), + }; + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraUpdateRaw(requestParameters: PropertymappingsProviderMicrosoftEntraUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderMappingFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderMapping Viewset + */ + async propertymappingsProviderMicrosoftEntraUpdate(requestParameters: PropertymappingsProviderMicrosoftEntraUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderMicrosoftEntraUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderMicrosoftEntraUsedByList without sending the request + */ + async propertymappingsProviderMicrosoftEntraUsedByListRequestOpts(requestParameters: PropertymappingsProviderMicrosoftEntraUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderMicrosoftEntraUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/microsoft_entra/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderMicrosoftEntraUsedByListRaw(requestParameters: PropertymappingsProviderMicrosoftEntraUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderMicrosoftEntraUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderMicrosoftEntraUsedByList(requestParameters: PropertymappingsProviderMicrosoftEntraUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderMicrosoftEntraUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRacCreate without sending the request + */ + async propertymappingsProviderRacCreateRequestOpts(requestParameters: PropertymappingsProviderRacCreateRequest): Promise { + if (requestParameters['rACPropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'rACPropertyMappingRequest', + 'Required parameter "rACPropertyMappingRequest" was null or undefined when calling propertymappingsProviderRacCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RACPropertyMappingRequestToJSON(requestParameters['rACPropertyMappingRequest']), + }; + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacCreateRaw(requestParameters: PropertymappingsProviderRacCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRacCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACPropertyMappingFromJSON(jsonValue)); + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacCreate(requestParameters: PropertymappingsProviderRacCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRacCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRacDestroy without sending the request + */ + async propertymappingsProviderRacDestroyRequestOpts(requestParameters: PropertymappingsProviderRacDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRacDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacDestroyRaw(requestParameters: PropertymappingsProviderRacDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRacDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacDestroy(requestParameters: PropertymappingsProviderRacDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderRacDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderRacList without sending the request + */ + async propertymappingsProviderRacListRequestOpts(requestParameters: PropertymappingsProviderRacListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacListRaw(requestParameters: PropertymappingsProviderRacListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRacListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRACPropertyMappingListFromJSON(jsonValue)); + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacList(requestParameters: PropertymappingsProviderRacListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRacListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRacPartialUpdate without sending the request + */ + async propertymappingsProviderRacPartialUpdateRequestOpts(requestParameters: PropertymappingsProviderRacPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRacPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedRACPropertyMappingRequestToJSON(requestParameters['patchedRACPropertyMappingRequest']), + }; + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacPartialUpdateRaw(requestParameters: PropertymappingsProviderRacPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRacPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACPropertyMappingFromJSON(jsonValue)); + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacPartialUpdate(requestParameters: PropertymappingsProviderRacPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRacPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRacRetrieve without sending the request + */ + async propertymappingsProviderRacRetrieveRequestOpts(requestParameters: PropertymappingsProviderRacRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRacRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacRetrieveRaw(requestParameters: PropertymappingsProviderRacRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRacRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACPropertyMappingFromJSON(jsonValue)); + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacRetrieve(requestParameters: PropertymappingsProviderRacRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRacRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRacUpdate without sending the request + */ + async propertymappingsProviderRacUpdateRequestOpts(requestParameters: PropertymappingsProviderRacUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRacUpdate().' + ); + } + + if (requestParameters['rACPropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'rACPropertyMappingRequest', + 'Required parameter "rACPropertyMappingRequest" was null or undefined when calling propertymappingsProviderRacUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RACPropertyMappingRequestToJSON(requestParameters['rACPropertyMappingRequest']), + }; + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacUpdateRaw(requestParameters: PropertymappingsProviderRacUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRacUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACPropertyMappingFromJSON(jsonValue)); + } + + /** + * RACPropertyMapping Viewset + */ + async propertymappingsProviderRacUpdate(requestParameters: PropertymappingsProviderRacUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRacUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRacUsedByList without sending the request + */ + async propertymappingsProviderRacUsedByListRequestOpts(requestParameters: PropertymappingsProviderRacUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRacUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/rac/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderRacUsedByListRaw(requestParameters: PropertymappingsProviderRacUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderRacUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderRacUsedByList(requestParameters: PropertymappingsProviderRacUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderRacUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRadiusCreate without sending the request + */ + async propertymappingsProviderRadiusCreateRequestOpts(requestParameters: PropertymappingsProviderRadiusCreateRequest): Promise { + if (requestParameters['radiusProviderPropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'radiusProviderPropertyMappingRequest', + 'Required parameter "radiusProviderPropertyMappingRequest" was null or undefined when calling propertymappingsProviderRadiusCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RadiusProviderPropertyMappingRequestToJSON(requestParameters['radiusProviderPropertyMappingRequest']), + }; + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusCreateRaw(requestParameters: PropertymappingsProviderRadiusCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRadiusCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderPropertyMappingFromJSON(jsonValue)); + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusCreate(requestParameters: PropertymappingsProviderRadiusCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRadiusCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRadiusDestroy without sending the request + */ + async propertymappingsProviderRadiusDestroyRequestOpts(requestParameters: PropertymappingsProviderRadiusDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRadiusDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusDestroyRaw(requestParameters: PropertymappingsProviderRadiusDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRadiusDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusDestroy(requestParameters: PropertymappingsProviderRadiusDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderRadiusDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderRadiusList without sending the request + */ + async propertymappingsProviderRadiusListRequestOpts(requestParameters: PropertymappingsProviderRadiusListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusListRaw(requestParameters: PropertymappingsProviderRadiusListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRadiusListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRadiusProviderPropertyMappingListFromJSON(jsonValue)); + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusList(requestParameters: PropertymappingsProviderRadiusListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRadiusListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRadiusPartialUpdate without sending the request + */ + async propertymappingsProviderRadiusPartialUpdateRequestOpts(requestParameters: PropertymappingsProviderRadiusPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRadiusPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedRadiusProviderPropertyMappingRequestToJSON(requestParameters['patchedRadiusProviderPropertyMappingRequest']), + }; + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusPartialUpdateRaw(requestParameters: PropertymappingsProviderRadiusPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRadiusPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderPropertyMappingFromJSON(jsonValue)); + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusPartialUpdate(requestParameters: PropertymappingsProviderRadiusPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRadiusPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRadiusRetrieve without sending the request + */ + async propertymappingsProviderRadiusRetrieveRequestOpts(requestParameters: PropertymappingsProviderRadiusRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRadiusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusRetrieveRaw(requestParameters: PropertymappingsProviderRadiusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRadiusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderPropertyMappingFromJSON(jsonValue)); + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusRetrieve(requestParameters: PropertymappingsProviderRadiusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRadiusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRadiusUpdate without sending the request + */ + async propertymappingsProviderRadiusUpdateRequestOpts(requestParameters: PropertymappingsProviderRadiusUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRadiusUpdate().' + ); + } + + if (requestParameters['radiusProviderPropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'radiusProviderPropertyMappingRequest', + 'Required parameter "radiusProviderPropertyMappingRequest" was null or undefined when calling propertymappingsProviderRadiusUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RadiusProviderPropertyMappingRequestToJSON(requestParameters['radiusProviderPropertyMappingRequest']), + }; + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusUpdateRaw(requestParameters: PropertymappingsProviderRadiusUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderRadiusUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderPropertyMappingFromJSON(jsonValue)); + } + + /** + * RadiusProviderPropertyMapping Viewset + */ + async propertymappingsProviderRadiusUpdate(requestParameters: PropertymappingsProviderRadiusUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderRadiusUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderRadiusUsedByList without sending the request + */ + async propertymappingsProviderRadiusUsedByListRequestOpts(requestParameters: PropertymappingsProviderRadiusUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderRadiusUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/radius/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderRadiusUsedByListRaw(requestParameters: PropertymappingsProviderRadiusUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderRadiusUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderRadiusUsedByList(requestParameters: PropertymappingsProviderRadiusUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderRadiusUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderSamlCreate without sending the request + */ + async propertymappingsProviderSamlCreateRequestOpts(requestParameters: PropertymappingsProviderSamlCreateRequest): Promise { + if (requestParameters['sAMLPropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLPropertyMappingRequest', + 'Required parameter "sAMLPropertyMappingRequest" was null or undefined when calling propertymappingsProviderSamlCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SAMLPropertyMappingRequestToJSON(requestParameters['sAMLPropertyMappingRequest']), + }; + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlCreateRaw(requestParameters: PropertymappingsProviderSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderSamlCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLPropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlCreate(requestParameters: PropertymappingsProviderSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderSamlCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderSamlDestroy without sending the request + */ + async propertymappingsProviderSamlDestroyRequestOpts(requestParameters: PropertymappingsProviderSamlDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderSamlDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlDestroyRaw(requestParameters: PropertymappingsProviderSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderSamlDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlDestroy(requestParameters: PropertymappingsProviderSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderSamlDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderSamlList without sending the request + */ + async propertymappingsProviderSamlListRequestOpts(requestParameters: PropertymappingsProviderSamlListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['friendlyName'] != null) { + queryParameters['friendly_name'] = requestParameters['friendlyName']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['samlName'] != null) { + queryParameters['saml_name'] = requestParameters['samlName']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlListRaw(requestParameters: PropertymappingsProviderSamlListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderSamlListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSAMLPropertyMappingListFromJSON(jsonValue)); + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlList(requestParameters: PropertymappingsProviderSamlListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderSamlListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderSamlPartialUpdate without sending the request + */ + async propertymappingsProviderSamlPartialUpdateRequestOpts(requestParameters: PropertymappingsProviderSamlPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderSamlPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSAMLPropertyMappingRequestToJSON(requestParameters['patchedSAMLPropertyMappingRequest']), + }; + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlPartialUpdateRaw(requestParameters: PropertymappingsProviderSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderSamlPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLPropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlPartialUpdate(requestParameters: PropertymappingsProviderSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderSamlPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderSamlRetrieve without sending the request + */ + async propertymappingsProviderSamlRetrieveRequestOpts(requestParameters: PropertymappingsProviderSamlRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderSamlRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlRetrieveRaw(requestParameters: PropertymappingsProviderSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderSamlRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLPropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlRetrieve(requestParameters: PropertymappingsProviderSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderSamlRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderSamlUpdate without sending the request + */ + async propertymappingsProviderSamlUpdateRequestOpts(requestParameters: PropertymappingsProviderSamlUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderSamlUpdate().' + ); + } + + if (requestParameters['sAMLPropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLPropertyMappingRequest', + 'Required parameter "sAMLPropertyMappingRequest" was null or undefined when calling propertymappingsProviderSamlUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SAMLPropertyMappingRequestToJSON(requestParameters['sAMLPropertyMappingRequest']), + }; + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlUpdateRaw(requestParameters: PropertymappingsProviderSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderSamlUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLPropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLPropertyMapping Viewset + */ + async propertymappingsProviderSamlUpdate(requestParameters: PropertymappingsProviderSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderSamlUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderSamlUsedByList without sending the request + */ + async propertymappingsProviderSamlUsedByListRequestOpts(requestParameters: PropertymappingsProviderSamlUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderSamlUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/saml/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderSamlUsedByListRaw(requestParameters: PropertymappingsProviderSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderSamlUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderSamlUsedByList(requestParameters: PropertymappingsProviderSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderSamlUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScimCreate without sending the request + */ + async propertymappingsProviderScimCreateRequestOpts(requestParameters: PropertymappingsProviderScimCreateRequest): Promise { + if (requestParameters['sCIMMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMMappingRequest', + 'Required parameter "sCIMMappingRequest" was null or undefined when calling propertymappingsProviderScimCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMMappingRequestToJSON(requestParameters['sCIMMappingRequest']), + }; + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimCreateRaw(requestParameters: PropertymappingsProviderScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScimCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMMappingFromJSON(jsonValue)); + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimCreate(requestParameters: PropertymappingsProviderScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScimCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScimDestroy without sending the request + */ + async propertymappingsProviderScimDestroyRequestOpts(requestParameters: PropertymappingsProviderScimDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScimDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimDestroyRaw(requestParameters: PropertymappingsProviderScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScimDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimDestroy(requestParameters: PropertymappingsProviderScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderScimDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderScimList without sending the request + */ + async propertymappingsProviderScimListRequestOpts(requestParameters: PropertymappingsProviderScimListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimListRaw(requestParameters: PropertymappingsProviderScimListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScimListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMMappingListFromJSON(jsonValue)); + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimList(requestParameters: PropertymappingsProviderScimListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScimListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScimPartialUpdate without sending the request + */ + async propertymappingsProviderScimPartialUpdateRequestOpts(requestParameters: PropertymappingsProviderScimPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScimPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSCIMMappingRequestToJSON(requestParameters['patchedSCIMMappingRequest']), + }; + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimPartialUpdateRaw(requestParameters: PropertymappingsProviderScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScimPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMMappingFromJSON(jsonValue)); + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimPartialUpdate(requestParameters: PropertymappingsProviderScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScimPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScimRetrieve without sending the request + */ + async propertymappingsProviderScimRetrieveRequestOpts(requestParameters: PropertymappingsProviderScimRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScimRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimRetrieveRaw(requestParameters: PropertymappingsProviderScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScimRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMMappingFromJSON(jsonValue)); + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimRetrieve(requestParameters: PropertymappingsProviderScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScimRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScimUpdate without sending the request + */ + async propertymappingsProviderScimUpdateRequestOpts(requestParameters: PropertymappingsProviderScimUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScimUpdate().' + ); + } + + if (requestParameters['sCIMMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMMappingRequest', + 'Required parameter "sCIMMappingRequest" was null or undefined when calling propertymappingsProviderScimUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SCIMMappingRequestToJSON(requestParameters['sCIMMappingRequest']), + }; + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimUpdateRaw(requestParameters: PropertymappingsProviderScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScimUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMMappingFromJSON(jsonValue)); + } + + /** + * SCIMMapping Viewset + */ + async propertymappingsProviderScimUpdate(requestParameters: PropertymappingsProviderScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScimUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScimUsedByList without sending the request + */ + async propertymappingsProviderScimUsedByListRequestOpts(requestParameters: PropertymappingsProviderScimUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScimUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scim/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderScimUsedByListRaw(requestParameters: PropertymappingsProviderScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderScimUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderScimUsedByList(requestParameters: PropertymappingsProviderScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderScimUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScopeCreate without sending the request + */ + async propertymappingsProviderScopeCreateRequestOpts(requestParameters: PropertymappingsProviderScopeCreateRequest): Promise { + if (requestParameters['scopeMappingRequest'] == null) { + throw new runtime.RequiredError( + 'scopeMappingRequest', + 'Required parameter "scopeMappingRequest" was null or undefined when calling propertymappingsProviderScopeCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ScopeMappingRequestToJSON(requestParameters['scopeMappingRequest']), + }; + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeCreateRaw(requestParameters: PropertymappingsProviderScopeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScopeCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScopeMappingFromJSON(jsonValue)); + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeCreate(requestParameters: PropertymappingsProviderScopeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScopeCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScopeDestroy without sending the request + */ + async propertymappingsProviderScopeDestroyRequestOpts(requestParameters: PropertymappingsProviderScopeDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScopeDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeDestroyRaw(requestParameters: PropertymappingsProviderScopeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScopeDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeDestroy(requestParameters: PropertymappingsProviderScopeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsProviderScopeDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsProviderScopeList without sending the request + */ + async propertymappingsProviderScopeListRequestOpts(requestParameters: PropertymappingsProviderScopeListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['scopeName'] != null) { + queryParameters['scope_name'] = requestParameters['scopeName']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeListRaw(requestParameters: PropertymappingsProviderScopeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScopeListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedScopeMappingListFromJSON(jsonValue)); + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeList(requestParameters: PropertymappingsProviderScopeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScopeListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScopePartialUpdate without sending the request + */ + async propertymappingsProviderScopePartialUpdateRequestOpts(requestParameters: PropertymappingsProviderScopePartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScopePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedScopeMappingRequestToJSON(requestParameters['patchedScopeMappingRequest']), + }; + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopePartialUpdateRaw(requestParameters: PropertymappingsProviderScopePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScopePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScopeMappingFromJSON(jsonValue)); + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopePartialUpdate(requestParameters: PropertymappingsProviderScopePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScopePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScopeRetrieve without sending the request + */ + async propertymappingsProviderScopeRetrieveRequestOpts(requestParameters: PropertymappingsProviderScopeRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScopeRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeRetrieveRaw(requestParameters: PropertymappingsProviderScopeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScopeRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScopeMappingFromJSON(jsonValue)); + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeRetrieve(requestParameters: PropertymappingsProviderScopeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScopeRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScopeUpdate without sending the request + */ + async propertymappingsProviderScopeUpdateRequestOpts(requestParameters: PropertymappingsProviderScopeUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScopeUpdate().' + ); + } + + if (requestParameters['scopeMappingRequest'] == null) { + throw new runtime.RequiredError( + 'scopeMappingRequest', + 'Required parameter "scopeMappingRequest" was null or undefined when calling propertymappingsProviderScopeUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ScopeMappingRequestToJSON(requestParameters['scopeMappingRequest']), + }; + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeUpdateRaw(requestParameters: PropertymappingsProviderScopeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsProviderScopeUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScopeMappingFromJSON(jsonValue)); + } + + /** + * ScopeMapping Viewset + */ + async propertymappingsProviderScopeUpdate(requestParameters: PropertymappingsProviderScopeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsProviderScopeUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsProviderScopeUsedByList without sending the request + */ + async propertymappingsProviderScopeUsedByListRequestOpts(requestParameters: PropertymappingsProviderScopeUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsProviderScopeUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/provider/scope/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderScopeUsedByListRaw(requestParameters: PropertymappingsProviderScopeUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsProviderScopeUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsProviderScopeUsedByList(requestParameters: PropertymappingsProviderScopeUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsProviderScopeUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceKerberosCreate without sending the request + */ + async propertymappingsSourceKerberosCreateRequestOpts(requestParameters: PropertymappingsSourceKerberosCreateRequest): Promise { + if (requestParameters['kerberosSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'kerberosSourcePropertyMappingRequest', + 'Required parameter "kerberosSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceKerberosCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: KerberosSourcePropertyMappingRequestToJSON(requestParameters['kerberosSourcePropertyMappingRequest']), + }; + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosCreateRaw(requestParameters: PropertymappingsSourceKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceKerberosCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosCreate(requestParameters: PropertymappingsSourceKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceKerberosCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceKerberosDestroy without sending the request + */ + async propertymappingsSourceKerberosDestroyRequestOpts(requestParameters: PropertymappingsSourceKerberosDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceKerberosDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosDestroyRaw(requestParameters: PropertymappingsSourceKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceKerberosDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosDestroy(requestParameters: PropertymappingsSourceKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourceKerberosDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourceKerberosList without sending the request + */ + async propertymappingsSourceKerberosListRequestOpts(requestParameters: PropertymappingsSourceKerberosListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosListRaw(requestParameters: PropertymappingsSourceKerberosListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceKerberosListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedKerberosSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosList(requestParameters: PropertymappingsSourceKerberosListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceKerberosListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceKerberosPartialUpdate without sending the request + */ + async propertymappingsSourceKerberosPartialUpdateRequestOpts(requestParameters: PropertymappingsSourceKerberosPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceKerberosPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedKerberosSourcePropertyMappingRequestToJSON(requestParameters['patchedKerberosSourcePropertyMappingRequest']), + }; + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosPartialUpdateRaw(requestParameters: PropertymappingsSourceKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceKerberosPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosPartialUpdate(requestParameters: PropertymappingsSourceKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceKerberosPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceKerberosRetrieve without sending the request + */ + async propertymappingsSourceKerberosRetrieveRequestOpts(requestParameters: PropertymappingsSourceKerberosRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceKerberosRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosRetrieveRaw(requestParameters: PropertymappingsSourceKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceKerberosRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosRetrieve(requestParameters: PropertymappingsSourceKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceKerberosRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceKerberosUpdate without sending the request + */ + async propertymappingsSourceKerberosUpdateRequestOpts(requestParameters: PropertymappingsSourceKerberosUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceKerberosUpdate().' + ); + } + + if (requestParameters['kerberosSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'kerberosSourcePropertyMappingRequest', + 'Required parameter "kerberosSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceKerberosUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: KerberosSourcePropertyMappingRequestToJSON(requestParameters['kerberosSourcePropertyMappingRequest']), + }; + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosUpdateRaw(requestParameters: PropertymappingsSourceKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceKerberosUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * KerberosSource PropertyMapping Viewset + */ + async propertymappingsSourceKerberosUpdate(requestParameters: PropertymappingsSourceKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceKerberosUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceKerberosUsedByList without sending the request + */ + async propertymappingsSourceKerberosUsedByListRequestOpts(requestParameters: PropertymappingsSourceKerberosUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceKerberosUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/kerberos/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceKerberosUsedByListRaw(requestParameters: PropertymappingsSourceKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourceKerberosUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceKerberosUsedByList(requestParameters: PropertymappingsSourceKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourceKerberosUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceLdapCreate without sending the request + */ + async propertymappingsSourceLdapCreateRequestOpts(requestParameters: PropertymappingsSourceLdapCreateRequest): Promise { + if (requestParameters['lDAPSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'lDAPSourcePropertyMappingRequest', + 'Required parameter "lDAPSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceLdapCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LDAPSourcePropertyMappingRequestToJSON(requestParameters['lDAPSourcePropertyMappingRequest']), + }; + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapCreateRaw(requestParameters: PropertymappingsSourceLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceLdapCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapCreate(requestParameters: PropertymappingsSourceLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceLdapCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceLdapDestroy without sending the request + */ + async propertymappingsSourceLdapDestroyRequestOpts(requestParameters: PropertymappingsSourceLdapDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceLdapDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapDestroyRaw(requestParameters: PropertymappingsSourceLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceLdapDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapDestroy(requestParameters: PropertymappingsSourceLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourceLdapDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourceLdapList without sending the request + */ + async propertymappingsSourceLdapListRequestOpts(requestParameters: PropertymappingsSourceLdapListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapListRaw(requestParameters: PropertymappingsSourceLdapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceLdapListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLDAPSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapList(requestParameters: PropertymappingsSourceLdapListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceLdapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceLdapPartialUpdate without sending the request + */ + async propertymappingsSourceLdapPartialUpdateRequestOpts(requestParameters: PropertymappingsSourceLdapPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceLdapPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedLDAPSourcePropertyMappingRequestToJSON(requestParameters['patchedLDAPSourcePropertyMappingRequest']), + }; + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapPartialUpdateRaw(requestParameters: PropertymappingsSourceLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceLdapPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapPartialUpdate(requestParameters: PropertymappingsSourceLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceLdapPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceLdapRetrieve without sending the request + */ + async propertymappingsSourceLdapRetrieveRequestOpts(requestParameters: PropertymappingsSourceLdapRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceLdapRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapRetrieveRaw(requestParameters: PropertymappingsSourceLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceLdapRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapRetrieve(requestParameters: PropertymappingsSourceLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceLdapRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceLdapUpdate without sending the request + */ + async propertymappingsSourceLdapUpdateRequestOpts(requestParameters: PropertymappingsSourceLdapUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceLdapUpdate().' + ); + } + + if (requestParameters['lDAPSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'lDAPSourcePropertyMappingRequest', + 'Required parameter "lDAPSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceLdapUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: LDAPSourcePropertyMappingRequestToJSON(requestParameters['lDAPSourcePropertyMappingRequest']), + }; + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapUpdateRaw(requestParameters: PropertymappingsSourceLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceLdapUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * LDAP PropertyMapping Viewset + */ + async propertymappingsSourceLdapUpdate(requestParameters: PropertymappingsSourceLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceLdapUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceLdapUsedByList without sending the request + */ + async propertymappingsSourceLdapUsedByListRequestOpts(requestParameters: PropertymappingsSourceLdapUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceLdapUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/ldap/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceLdapUsedByListRaw(requestParameters: PropertymappingsSourceLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourceLdapUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceLdapUsedByList(requestParameters: PropertymappingsSourceLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourceLdapUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceOauthCreate without sending the request + */ + async propertymappingsSourceOauthCreateRequestOpts(requestParameters: PropertymappingsSourceOauthCreateRequest): Promise { + if (requestParameters['oAuthSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'oAuthSourcePropertyMappingRequest', + 'Required parameter "oAuthSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceOauthCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OAuthSourcePropertyMappingRequestToJSON(requestParameters['oAuthSourcePropertyMappingRequest']), + }; + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthCreateRaw(requestParameters: PropertymappingsSourceOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceOauthCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthCreate(requestParameters: PropertymappingsSourceOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceOauthCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceOauthDestroy without sending the request + */ + async propertymappingsSourceOauthDestroyRequestOpts(requestParameters: PropertymappingsSourceOauthDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceOauthDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthDestroyRaw(requestParameters: PropertymappingsSourceOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceOauthDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthDestroy(requestParameters: PropertymappingsSourceOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourceOauthDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourceOauthList without sending the request + */ + async propertymappingsSourceOauthListRequestOpts(requestParameters: PropertymappingsSourceOauthListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthListRaw(requestParameters: PropertymappingsSourceOauthListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceOauthListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOAuthSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthList(requestParameters: PropertymappingsSourceOauthListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceOauthListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceOauthPartialUpdate without sending the request + */ + async propertymappingsSourceOauthPartialUpdateRequestOpts(requestParameters: PropertymappingsSourceOauthPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceOauthPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedOAuthSourcePropertyMappingRequestToJSON(requestParameters['patchedOAuthSourcePropertyMappingRequest']), + }; + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthPartialUpdateRaw(requestParameters: PropertymappingsSourceOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceOauthPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthPartialUpdate(requestParameters: PropertymappingsSourceOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceOauthPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceOauthRetrieve without sending the request + */ + async propertymappingsSourceOauthRetrieveRequestOpts(requestParameters: PropertymappingsSourceOauthRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceOauthRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthRetrieveRaw(requestParameters: PropertymappingsSourceOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceOauthRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthRetrieve(requestParameters: PropertymappingsSourceOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceOauthRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceOauthUpdate without sending the request + */ + async propertymappingsSourceOauthUpdateRequestOpts(requestParameters: PropertymappingsSourceOauthUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceOauthUpdate().' + ); + } + + if (requestParameters['oAuthSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'oAuthSourcePropertyMappingRequest', + 'Required parameter "oAuthSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceOauthUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OAuthSourcePropertyMappingRequestToJSON(requestParameters['oAuthSourcePropertyMappingRequest']), + }; + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthUpdateRaw(requestParameters: PropertymappingsSourceOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceOauthUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * OAuthSourcePropertyMapping Viewset + */ + async propertymappingsSourceOauthUpdate(requestParameters: PropertymappingsSourceOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceOauthUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceOauthUsedByList without sending the request + */ + async propertymappingsSourceOauthUsedByListRequestOpts(requestParameters: PropertymappingsSourceOauthUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceOauthUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/oauth/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceOauthUsedByListRaw(requestParameters: PropertymappingsSourceOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourceOauthUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceOauthUsedByList(requestParameters: PropertymappingsSourceOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourceOauthUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourcePlexCreate without sending the request + */ + async propertymappingsSourcePlexCreateRequestOpts(requestParameters: PropertymappingsSourcePlexCreateRequest): Promise { + if (requestParameters['plexSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'plexSourcePropertyMappingRequest', + 'Required parameter "plexSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourcePlexCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PlexSourcePropertyMappingRequestToJSON(requestParameters['plexSourcePropertyMappingRequest']), + }; + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexCreateRaw(requestParameters: PropertymappingsSourcePlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourcePlexCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexCreate(requestParameters: PropertymappingsSourcePlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourcePlexCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourcePlexDestroy without sending the request + */ + async propertymappingsSourcePlexDestroyRequestOpts(requestParameters: PropertymappingsSourcePlexDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourcePlexDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexDestroyRaw(requestParameters: PropertymappingsSourcePlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourcePlexDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexDestroy(requestParameters: PropertymappingsSourcePlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourcePlexDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourcePlexList without sending the request + */ + async propertymappingsSourcePlexListRequestOpts(requestParameters: PropertymappingsSourcePlexListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexListRaw(requestParameters: PropertymappingsSourcePlexListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourcePlexListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPlexSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexList(requestParameters: PropertymappingsSourcePlexListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourcePlexListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourcePlexPartialUpdate without sending the request + */ + async propertymappingsSourcePlexPartialUpdateRequestOpts(requestParameters: PropertymappingsSourcePlexPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourcePlexPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPlexSourcePropertyMappingRequestToJSON(requestParameters['patchedPlexSourcePropertyMappingRequest']), + }; + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexPartialUpdateRaw(requestParameters: PropertymappingsSourcePlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourcePlexPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexPartialUpdate(requestParameters: PropertymappingsSourcePlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourcePlexPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourcePlexRetrieve without sending the request + */ + async propertymappingsSourcePlexRetrieveRequestOpts(requestParameters: PropertymappingsSourcePlexRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourcePlexRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexRetrieveRaw(requestParameters: PropertymappingsSourcePlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourcePlexRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexRetrieve(requestParameters: PropertymappingsSourcePlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourcePlexRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourcePlexUpdate without sending the request + */ + async propertymappingsSourcePlexUpdateRequestOpts(requestParameters: PropertymappingsSourcePlexUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourcePlexUpdate().' + ); + } + + if (requestParameters['plexSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'plexSourcePropertyMappingRequest', + 'Required parameter "plexSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourcePlexUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PlexSourcePropertyMappingRequestToJSON(requestParameters['plexSourcePropertyMappingRequest']), + }; + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexUpdateRaw(requestParameters: PropertymappingsSourcePlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourcePlexUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * PlexSourcePropertyMapping Viewset + */ + async propertymappingsSourcePlexUpdate(requestParameters: PropertymappingsSourcePlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourcePlexUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourcePlexUsedByList without sending the request + */ + async propertymappingsSourcePlexUsedByListRequestOpts(requestParameters: PropertymappingsSourcePlexUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourcePlexUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/plex/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourcePlexUsedByListRaw(requestParameters: PropertymappingsSourcePlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourcePlexUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourcePlexUsedByList(requestParameters: PropertymappingsSourcePlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourcePlexUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceSamlCreate without sending the request + */ + async propertymappingsSourceSamlCreateRequestOpts(requestParameters: PropertymappingsSourceSamlCreateRequest): Promise { + if (requestParameters['sAMLSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLSourcePropertyMappingRequest', + 'Required parameter "sAMLSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceSamlCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SAMLSourcePropertyMappingRequestToJSON(requestParameters['sAMLSourcePropertyMappingRequest']), + }; + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlCreateRaw(requestParameters: PropertymappingsSourceSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceSamlCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlCreate(requestParameters: PropertymappingsSourceSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceSamlCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceSamlDestroy without sending the request + */ + async propertymappingsSourceSamlDestroyRequestOpts(requestParameters: PropertymappingsSourceSamlDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceSamlDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlDestroyRaw(requestParameters: PropertymappingsSourceSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceSamlDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlDestroy(requestParameters: PropertymappingsSourceSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourceSamlDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourceSamlList without sending the request + */ + async propertymappingsSourceSamlListRequestOpts(requestParameters: PropertymappingsSourceSamlListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlListRaw(requestParameters: PropertymappingsSourceSamlListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceSamlListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSAMLSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlList(requestParameters: PropertymappingsSourceSamlListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceSamlListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceSamlPartialUpdate without sending the request + */ + async propertymappingsSourceSamlPartialUpdateRequestOpts(requestParameters: PropertymappingsSourceSamlPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceSamlPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSAMLSourcePropertyMappingRequestToJSON(requestParameters['patchedSAMLSourcePropertyMappingRequest']), + }; + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlPartialUpdateRaw(requestParameters: PropertymappingsSourceSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceSamlPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlPartialUpdate(requestParameters: PropertymappingsSourceSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceSamlPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceSamlRetrieve without sending the request + */ + async propertymappingsSourceSamlRetrieveRequestOpts(requestParameters: PropertymappingsSourceSamlRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceSamlRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlRetrieveRaw(requestParameters: PropertymappingsSourceSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceSamlRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlRetrieve(requestParameters: PropertymappingsSourceSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceSamlRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceSamlUpdate without sending the request + */ + async propertymappingsSourceSamlUpdateRequestOpts(requestParameters: PropertymappingsSourceSamlUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceSamlUpdate().' + ); + } + + if (requestParameters['sAMLSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLSourcePropertyMappingRequest', + 'Required parameter "sAMLSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceSamlUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SAMLSourcePropertyMappingRequestToJSON(requestParameters['sAMLSourcePropertyMappingRequest']), + }; + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlUpdateRaw(requestParameters: PropertymappingsSourceSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceSamlUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SAMLSourcePropertyMapping Viewset + */ + async propertymappingsSourceSamlUpdate(requestParameters: PropertymappingsSourceSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceSamlUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceSamlUsedByList without sending the request + */ + async propertymappingsSourceSamlUsedByListRequestOpts(requestParameters: PropertymappingsSourceSamlUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceSamlUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/saml/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceSamlUsedByListRaw(requestParameters: PropertymappingsSourceSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourceSamlUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceSamlUsedByList(requestParameters: PropertymappingsSourceSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourceSamlUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceScimCreate without sending the request + */ + async propertymappingsSourceScimCreateRequestOpts(requestParameters: PropertymappingsSourceScimCreateRequest): Promise { + if (requestParameters['sCIMSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourcePropertyMappingRequest', + 'Required parameter "sCIMSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceScimCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMSourcePropertyMappingRequestToJSON(requestParameters['sCIMSourcePropertyMappingRequest']), + }; + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimCreateRaw(requestParameters: PropertymappingsSourceScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceScimCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimCreate(requestParameters: PropertymappingsSourceScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceScimCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceScimDestroy without sending the request + */ + async propertymappingsSourceScimDestroyRequestOpts(requestParameters: PropertymappingsSourceScimDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceScimDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimDestroyRaw(requestParameters: PropertymappingsSourceScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceScimDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimDestroy(requestParameters: PropertymappingsSourceScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourceScimDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourceScimList without sending the request + */ + async propertymappingsSourceScimListRequestOpts(requestParameters: PropertymappingsSourceScimListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimListRaw(requestParameters: PropertymappingsSourceScimListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceScimListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimList(requestParameters: PropertymappingsSourceScimListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceScimListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceScimPartialUpdate without sending the request + */ + async propertymappingsSourceScimPartialUpdateRequestOpts(requestParameters: PropertymappingsSourceScimPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceScimPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSCIMSourcePropertyMappingRequestToJSON(requestParameters['patchedSCIMSourcePropertyMappingRequest']), + }; + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimPartialUpdateRaw(requestParameters: PropertymappingsSourceScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceScimPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimPartialUpdate(requestParameters: PropertymappingsSourceScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceScimPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceScimRetrieve without sending the request + */ + async propertymappingsSourceScimRetrieveRequestOpts(requestParameters: PropertymappingsSourceScimRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceScimRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimRetrieveRaw(requestParameters: PropertymappingsSourceScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceScimRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimRetrieve(requestParameters: PropertymappingsSourceScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceScimRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceScimUpdate without sending the request + */ + async propertymappingsSourceScimUpdateRequestOpts(requestParameters: PropertymappingsSourceScimUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceScimUpdate().' + ); + } + + if (requestParameters['sCIMSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourcePropertyMappingRequest', + 'Required parameter "sCIMSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceScimUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SCIMSourcePropertyMappingRequestToJSON(requestParameters['sCIMSourcePropertyMappingRequest']), + }; + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimUpdateRaw(requestParameters: PropertymappingsSourceScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceScimUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * SCIMSourcePropertyMapping Viewset + */ + async propertymappingsSourceScimUpdate(requestParameters: PropertymappingsSourceScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceScimUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceScimUsedByList without sending the request + */ + async propertymappingsSourceScimUsedByListRequestOpts(requestParameters: PropertymappingsSourceScimUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceScimUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/scim/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceScimUsedByListRaw(requestParameters: PropertymappingsSourceScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourceScimUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceScimUsedByList(requestParameters: PropertymappingsSourceScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourceScimUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceTelegramCreate without sending the request + */ + async propertymappingsSourceTelegramCreateRequestOpts(requestParameters: PropertymappingsSourceTelegramCreateRequest): Promise { + if (requestParameters['telegramSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'telegramSourcePropertyMappingRequest', + 'Required parameter "telegramSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceTelegramCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TelegramSourcePropertyMappingRequestToJSON(requestParameters['telegramSourcePropertyMappingRequest']), + }; + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramCreateRaw(requestParameters: PropertymappingsSourceTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceTelegramCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramCreate(requestParameters: PropertymappingsSourceTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceTelegramCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceTelegramDestroy without sending the request + */ + async propertymappingsSourceTelegramDestroyRequestOpts(requestParameters: PropertymappingsSourceTelegramDestroyRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceTelegramDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramDestroyRaw(requestParameters: PropertymappingsSourceTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceTelegramDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramDestroy(requestParameters: PropertymappingsSourceTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.propertymappingsSourceTelegramDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for propertymappingsSourceTelegramList without sending the request + */ + async propertymappingsSourceTelegramListRequestOpts(requestParameters: PropertymappingsSourceTelegramListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramListRaw(requestParameters: PropertymappingsSourceTelegramListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceTelegramListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTelegramSourcePropertyMappingListFromJSON(jsonValue)); + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramList(requestParameters: PropertymappingsSourceTelegramListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceTelegramListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceTelegramPartialUpdate without sending the request + */ + async propertymappingsSourceTelegramPartialUpdateRequestOpts(requestParameters: PropertymappingsSourceTelegramPartialUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceTelegramPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTelegramSourcePropertyMappingRequestToJSON(requestParameters['patchedTelegramSourcePropertyMappingRequest']), + }; + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramPartialUpdateRaw(requestParameters: PropertymappingsSourceTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceTelegramPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramPartialUpdate(requestParameters: PropertymappingsSourceTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceTelegramPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceTelegramRetrieve without sending the request + */ + async propertymappingsSourceTelegramRetrieveRequestOpts(requestParameters: PropertymappingsSourceTelegramRetrieveRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceTelegramRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramRetrieveRaw(requestParameters: PropertymappingsSourceTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceTelegramRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramRetrieve(requestParameters: PropertymappingsSourceTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceTelegramRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceTelegramUpdate without sending the request + */ + async propertymappingsSourceTelegramUpdateRequestOpts(requestParameters: PropertymappingsSourceTelegramUpdateRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceTelegramUpdate().' + ); + } + + if (requestParameters['telegramSourcePropertyMappingRequest'] == null) { + throw new runtime.RequiredError( + 'telegramSourcePropertyMappingRequest', + 'Required parameter "telegramSourcePropertyMappingRequest" was null or undefined when calling propertymappingsSourceTelegramUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/{pm_uuid}/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TelegramSourcePropertyMappingRequestToJSON(requestParameters['telegramSourcePropertyMappingRequest']), + }; + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramUpdateRaw(requestParameters: PropertymappingsSourceTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.propertymappingsSourceTelegramUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourcePropertyMappingFromJSON(jsonValue)); + } + + /** + * TelegramSourcePropertyMapping Viewset + */ + async propertymappingsSourceTelegramUpdate(requestParameters: PropertymappingsSourceTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.propertymappingsSourceTelegramUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for propertymappingsSourceTelegramUsedByList without sending the request + */ + async propertymappingsSourceTelegramUsedByListRequestOpts(requestParameters: PropertymappingsSourceTelegramUsedByListRequest): Promise { + if (requestParameters['pmUuid'] == null) { + throw new runtime.RequiredError( + 'pmUuid', + 'Required parameter "pmUuid" was null or undefined when calling propertymappingsSourceTelegramUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/propertymappings/source/telegram/{pm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pm_uuid"}}`, encodeURIComponent(String(requestParameters['pmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceTelegramUsedByListRaw(requestParameters: PropertymappingsSourceTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.propertymappingsSourceTelegramUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async propertymappingsSourceTelegramUsedByList(requestParameters: PropertymappingsSourceTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.propertymappingsSourceTelegramUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/ProvidersApi.ts b/packages/client-ts/src/apis/ProvidersApi.ts new file mode 100644 index 0000000000..fe6b652feb --- /dev/null +++ b/packages/client-ts/src/apis/ProvidersApi.ts @@ -0,0 +1,8731 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + GoogleWorkspaceProvider, + GoogleWorkspaceProviderGroup, + GoogleWorkspaceProviderGroupRequest, + GoogleWorkspaceProviderRequest, + GoogleWorkspaceProviderUser, + GoogleWorkspaceProviderUserRequest, + LDAPProvider, + LDAPProviderRequest, + MicrosoftEntraProvider, + MicrosoftEntraProviderGroup, + MicrosoftEntraProviderGroupRequest, + MicrosoftEntraProviderRequest, + MicrosoftEntraProviderUser, + MicrosoftEntraProviderUserRequest, + OAuth2Provider, + OAuth2ProviderRequest, + OAuth2ProviderSetupURLs, + PaginatedGoogleWorkspaceProviderGroupList, + PaginatedGoogleWorkspaceProviderList, + PaginatedGoogleWorkspaceProviderUserList, + PaginatedLDAPProviderList, + PaginatedMicrosoftEntraProviderGroupList, + PaginatedMicrosoftEntraProviderList, + PaginatedMicrosoftEntraProviderUserList, + PaginatedOAuth2ProviderList, + PaginatedProviderList, + PaginatedProxyProviderList, + PaginatedRACProviderList, + PaginatedRadiusProviderList, + PaginatedSAMLProviderList, + PaginatedSCIMProviderGroupList, + PaginatedSCIMProviderList, + PaginatedSCIMProviderUserList, + PaginatedSSFProviderList, + PaginatedWSFederationProviderList, + PatchedGoogleWorkspaceProviderRequest, + PatchedLDAPProviderRequest, + PatchedMicrosoftEntraProviderRequest, + PatchedOAuth2ProviderRequest, + PatchedProxyProviderRequest, + PatchedRACProviderRequest, + PatchedRadiusProviderRequest, + PatchedSAMLProviderRequest, + PatchedSCIMProviderRequest, + PatchedSSFProviderRequest, + PatchedWSFederationProviderRequest, + PropertyMappingPreview, + Provider, + ProxyProvider, + ProxyProviderRequest, + RACProvider, + RACProviderRequest, + RadiusProvider, + RadiusProviderRequest, + SAMLMetadata, + SAMLProvider, + SAMLProviderRequest, + SCIMProvider, + SCIMProviderGroup, + SCIMProviderGroupRequest, + SCIMProviderRequest, + SCIMProviderUser, + SCIMProviderUserRequest, + SSFProvider, + SSFProviderRequest, + SyncObjectRequest, + SyncObjectResult, + SyncStatus, + TypeCreate, + UsedBy, + ValidationError, + WSFederationProvider, + WSFederationProviderRequest, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + GoogleWorkspaceProviderFromJSON, + GoogleWorkspaceProviderToJSON, + GoogleWorkspaceProviderGroupFromJSON, + GoogleWorkspaceProviderGroupToJSON, + GoogleWorkspaceProviderGroupRequestFromJSON, + GoogleWorkspaceProviderGroupRequestToJSON, + GoogleWorkspaceProviderRequestFromJSON, + GoogleWorkspaceProviderRequestToJSON, + GoogleWorkspaceProviderUserFromJSON, + GoogleWorkspaceProviderUserToJSON, + GoogleWorkspaceProviderUserRequestFromJSON, + GoogleWorkspaceProviderUserRequestToJSON, + LDAPProviderFromJSON, + LDAPProviderToJSON, + LDAPProviderRequestFromJSON, + LDAPProviderRequestToJSON, + MicrosoftEntraProviderFromJSON, + MicrosoftEntraProviderToJSON, + MicrosoftEntraProviderGroupFromJSON, + MicrosoftEntraProviderGroupToJSON, + MicrosoftEntraProviderGroupRequestFromJSON, + MicrosoftEntraProviderGroupRequestToJSON, + MicrosoftEntraProviderRequestFromJSON, + MicrosoftEntraProviderRequestToJSON, + MicrosoftEntraProviderUserFromJSON, + MicrosoftEntraProviderUserToJSON, + MicrosoftEntraProviderUserRequestFromJSON, + MicrosoftEntraProviderUserRequestToJSON, + OAuth2ProviderFromJSON, + OAuth2ProviderToJSON, + OAuth2ProviderRequestFromJSON, + OAuth2ProviderRequestToJSON, + OAuth2ProviderSetupURLsFromJSON, + OAuth2ProviderSetupURLsToJSON, + PaginatedGoogleWorkspaceProviderGroupListFromJSON, + PaginatedGoogleWorkspaceProviderGroupListToJSON, + PaginatedGoogleWorkspaceProviderListFromJSON, + PaginatedGoogleWorkspaceProviderListToJSON, + PaginatedGoogleWorkspaceProviderUserListFromJSON, + PaginatedGoogleWorkspaceProviderUserListToJSON, + PaginatedLDAPProviderListFromJSON, + PaginatedLDAPProviderListToJSON, + PaginatedMicrosoftEntraProviderGroupListFromJSON, + PaginatedMicrosoftEntraProviderGroupListToJSON, + PaginatedMicrosoftEntraProviderListFromJSON, + PaginatedMicrosoftEntraProviderListToJSON, + PaginatedMicrosoftEntraProviderUserListFromJSON, + PaginatedMicrosoftEntraProviderUserListToJSON, + PaginatedOAuth2ProviderListFromJSON, + PaginatedOAuth2ProviderListToJSON, + PaginatedProviderListFromJSON, + PaginatedProviderListToJSON, + PaginatedProxyProviderListFromJSON, + PaginatedProxyProviderListToJSON, + PaginatedRACProviderListFromJSON, + PaginatedRACProviderListToJSON, + PaginatedRadiusProviderListFromJSON, + PaginatedRadiusProviderListToJSON, + PaginatedSAMLProviderListFromJSON, + PaginatedSAMLProviderListToJSON, + PaginatedSCIMProviderGroupListFromJSON, + PaginatedSCIMProviderGroupListToJSON, + PaginatedSCIMProviderListFromJSON, + PaginatedSCIMProviderListToJSON, + PaginatedSCIMProviderUserListFromJSON, + PaginatedSCIMProviderUserListToJSON, + PaginatedSSFProviderListFromJSON, + PaginatedSSFProviderListToJSON, + PaginatedWSFederationProviderListFromJSON, + PaginatedWSFederationProviderListToJSON, + PatchedGoogleWorkspaceProviderRequestFromJSON, + PatchedGoogleWorkspaceProviderRequestToJSON, + PatchedLDAPProviderRequestFromJSON, + PatchedLDAPProviderRequestToJSON, + PatchedMicrosoftEntraProviderRequestFromJSON, + PatchedMicrosoftEntraProviderRequestToJSON, + PatchedOAuth2ProviderRequestFromJSON, + PatchedOAuth2ProviderRequestToJSON, + PatchedProxyProviderRequestFromJSON, + PatchedProxyProviderRequestToJSON, + PatchedRACProviderRequestFromJSON, + PatchedRACProviderRequestToJSON, + PatchedRadiusProviderRequestFromJSON, + PatchedRadiusProviderRequestToJSON, + PatchedSAMLProviderRequestFromJSON, + PatchedSAMLProviderRequestToJSON, + PatchedSCIMProviderRequestFromJSON, + PatchedSCIMProviderRequestToJSON, + PatchedSSFProviderRequestFromJSON, + PatchedSSFProviderRequestToJSON, + PatchedWSFederationProviderRequestFromJSON, + PatchedWSFederationProviderRequestToJSON, + PropertyMappingPreviewFromJSON, + PropertyMappingPreviewToJSON, + ProviderFromJSON, + ProviderToJSON, + ProxyProviderFromJSON, + ProxyProviderToJSON, + ProxyProviderRequestFromJSON, + ProxyProviderRequestToJSON, + RACProviderFromJSON, + RACProviderToJSON, + RACProviderRequestFromJSON, + RACProviderRequestToJSON, + RadiusProviderFromJSON, + RadiusProviderToJSON, + RadiusProviderRequestFromJSON, + RadiusProviderRequestToJSON, + SAMLMetadataFromJSON, + SAMLMetadataToJSON, + SAMLProviderFromJSON, + SAMLProviderToJSON, + SAMLProviderRequestFromJSON, + SAMLProviderRequestToJSON, + SCIMProviderFromJSON, + SCIMProviderToJSON, + SCIMProviderGroupFromJSON, + SCIMProviderGroupToJSON, + SCIMProviderGroupRequestFromJSON, + SCIMProviderGroupRequestToJSON, + SCIMProviderRequestFromJSON, + SCIMProviderRequestToJSON, + SCIMProviderUserFromJSON, + SCIMProviderUserToJSON, + SCIMProviderUserRequestFromJSON, + SCIMProviderUserRequestToJSON, + SSFProviderFromJSON, + SSFProviderToJSON, + SSFProviderRequestFromJSON, + SSFProviderRequestToJSON, + SyncObjectRequestFromJSON, + SyncObjectRequestToJSON, + SyncObjectResultFromJSON, + SyncObjectResultToJSON, + SyncStatusFromJSON, + SyncStatusToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, + WSFederationProviderFromJSON, + WSFederationProviderToJSON, + WSFederationProviderRequestFromJSON, + WSFederationProviderRequestToJSON, +} from '../models/index'; + +export interface ProvidersAllDestroyRequest { + id: number; +} + +export interface ProvidersAllListRequest { + applicationIsnull?: boolean; + backchannel?: boolean; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ProvidersAllRetrieveRequest { + id: number; +} + +export interface ProvidersAllUsedByListRequest { + id: number; +} + +export interface ProvidersGoogleWorkspaceCreateRequest { + googleWorkspaceProviderRequest: GoogleWorkspaceProviderRequest; +} + +export interface ProvidersGoogleWorkspaceDestroyRequest { + id: number; +} + +export interface ProvidersGoogleWorkspaceGroupsCreateRequest { + googleWorkspaceProviderGroupRequest: GoogleWorkspaceProviderGroupRequest; +} + +export interface ProvidersGoogleWorkspaceGroupsDestroyRequest { + id: string; +} + +export interface ProvidersGoogleWorkspaceGroupsListRequest { + groupGroupUuid?: string; + groupName?: string; + ordering?: string; + page?: number; + pageSize?: number; + providerId?: number; + search?: string; +} + +export interface ProvidersGoogleWorkspaceGroupsRetrieveRequest { + id: string; +} + +export interface ProvidersGoogleWorkspaceGroupsUsedByListRequest { + id: string; +} + +export interface ProvidersGoogleWorkspaceListRequest { + delegatedSubject?: string; + excludeUsersServiceAccount?: boolean; + filterGroup?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ProvidersGoogleWorkspacePartialUpdateRequest { + id: number; + patchedGoogleWorkspaceProviderRequest?: PatchedGoogleWorkspaceProviderRequest; +} + +export interface ProvidersGoogleWorkspaceRetrieveRequest { + id: number; +} + +export interface ProvidersGoogleWorkspaceSyncObjectCreateRequest { + id: number; + syncObjectRequest: SyncObjectRequest; +} + +export interface ProvidersGoogleWorkspaceSyncStatusRetrieveRequest { + id: number; +} + +export interface ProvidersGoogleWorkspaceUpdateRequest { + id: number; + googleWorkspaceProviderRequest: GoogleWorkspaceProviderRequest; +} + +export interface ProvidersGoogleWorkspaceUsedByListRequest { + id: number; +} + +export interface ProvidersGoogleWorkspaceUsersCreateRequest { + googleWorkspaceProviderUserRequest: GoogleWorkspaceProviderUserRequest; +} + +export interface ProvidersGoogleWorkspaceUsersDestroyRequest { + id: string; +} + +export interface ProvidersGoogleWorkspaceUsersListRequest { + ordering?: string; + page?: number; + pageSize?: number; + providerId?: number; + search?: string; + userId?: number; + userUsername?: string; +} + +export interface ProvidersGoogleWorkspaceUsersRetrieveRequest { + id: string; +} + +export interface ProvidersGoogleWorkspaceUsersUsedByListRequest { + id: string; +} + +export interface ProvidersLdapCreateRequest { + lDAPProviderRequest: LDAPProviderRequest; +} + +export interface ProvidersLdapDestroyRequest { + id: number; +} + +export interface ProvidersLdapListRequest { + applicationIsnull?: boolean; + authorizationFlowSlugIexact?: string; + baseDnIexact?: string; + certificateKpUuidIexact?: string; + certificateNameIexact?: string; + gidStartNumberIexact?: number; + nameIexact?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + tlsServerNameIexact?: string; + uidStartNumberIexact?: number; +} + +export interface ProvidersLdapPartialUpdateRequest { + id: number; + patchedLDAPProviderRequest?: PatchedLDAPProviderRequest; +} + +export interface ProvidersLdapRetrieveRequest { + id: number; +} + +export interface ProvidersLdapUpdateRequest { + id: number; + lDAPProviderRequest: LDAPProviderRequest; +} + +export interface ProvidersLdapUsedByListRequest { + id: number; +} + +export interface ProvidersMicrosoftEntraCreateRequest { + microsoftEntraProviderRequest: MicrosoftEntraProviderRequest; +} + +export interface ProvidersMicrosoftEntraDestroyRequest { + id: number; +} + +export interface ProvidersMicrosoftEntraGroupsCreateRequest { + microsoftEntraProviderGroupRequest: MicrosoftEntraProviderGroupRequest; +} + +export interface ProvidersMicrosoftEntraGroupsDestroyRequest { + id: string; +} + +export interface ProvidersMicrosoftEntraGroupsListRequest { + groupGroupUuid?: string; + groupName?: string; + ordering?: string; + page?: number; + pageSize?: number; + providerId?: number; + search?: string; +} + +export interface ProvidersMicrosoftEntraGroupsRetrieveRequest { + id: string; +} + +export interface ProvidersMicrosoftEntraGroupsUsedByListRequest { + id: string; +} + +export interface ProvidersMicrosoftEntraListRequest { + excludeUsersServiceAccount?: boolean; + filterGroup?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ProvidersMicrosoftEntraPartialUpdateRequest { + id: number; + patchedMicrosoftEntraProviderRequest?: PatchedMicrosoftEntraProviderRequest; +} + +export interface ProvidersMicrosoftEntraRetrieveRequest { + id: number; +} + +export interface ProvidersMicrosoftEntraSyncObjectCreateRequest { + id: number; + syncObjectRequest: SyncObjectRequest; +} + +export interface ProvidersMicrosoftEntraSyncStatusRetrieveRequest { + id: number; +} + +export interface ProvidersMicrosoftEntraUpdateRequest { + id: number; + microsoftEntraProviderRequest: MicrosoftEntraProviderRequest; +} + +export interface ProvidersMicrosoftEntraUsedByListRequest { + id: number; +} + +export interface ProvidersMicrosoftEntraUsersCreateRequest { + microsoftEntraProviderUserRequest: MicrosoftEntraProviderUserRequest; +} + +export interface ProvidersMicrosoftEntraUsersDestroyRequest { + id: string; +} + +export interface ProvidersMicrosoftEntraUsersListRequest { + ordering?: string; + page?: number; + pageSize?: number; + providerId?: number; + search?: string; + userId?: number; + userUsername?: string; +} + +export interface ProvidersMicrosoftEntraUsersRetrieveRequest { + id: string; +} + +export interface ProvidersMicrosoftEntraUsersUsedByListRequest { + id: string; +} + +export interface ProvidersOauth2CreateRequest { + oAuth2ProviderRequest: OAuth2ProviderRequest; +} + +export interface ProvidersOauth2DestroyRequest { + id: number; +} + +export interface ProvidersOauth2ListRequest { + accessCodeValidity?: string; + accessTokenValidity?: string; + application?: string; + authorizationFlow?: string; + clientId?: string; + clientType?: ProvidersOauth2ListClientTypeEnum; + includeClaimsInIdToken?: boolean; + issuerMode?: ProvidersOauth2ListIssuerModeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + propertyMappings?: Array; + refreshTokenValidity?: string; + search?: string; + signingKey?: string; + subMode?: ProvidersOauth2ListSubModeEnum; +} + +export interface ProvidersOauth2PartialUpdateRequest { + id: number; + patchedOAuth2ProviderRequest?: PatchedOAuth2ProviderRequest; +} + +export interface ProvidersOauth2PreviewUserRetrieveRequest { + id: number; + forUser?: number; +} + +export interface ProvidersOauth2RetrieveRequest { + id: number; +} + +export interface ProvidersOauth2SetupUrlsRetrieveRequest { + id: number; +} + +export interface ProvidersOauth2UpdateRequest { + id: number; + oAuth2ProviderRequest: OAuth2ProviderRequest; +} + +export interface ProvidersOauth2UsedByListRequest { + id: number; +} + +export interface ProvidersProxyCreateRequest { + proxyProviderRequest: ProxyProviderRequest; +} + +export interface ProvidersProxyDestroyRequest { + id: number; +} + +export interface ProvidersProxyListRequest { + applicationIsnull?: boolean; + authorizationFlowSlugIexact?: string; + basicAuthEnabledIexact?: boolean; + basicAuthPasswordAttributeIexact?: string; + basicAuthUserAttributeIexact?: string; + certificateKpUuidIexact?: string; + certificateNameIexact?: string; + cookieDomainIexact?: string; + externalHostIexact?: string; + internalHostIexact?: string; + internalHostSslValidationIexact?: boolean; + modeIexact?: string; + nameIexact?: string; + ordering?: string; + page?: number; + pageSize?: number; + propertyMappingsIexact?: Array; + search?: string; + skipPathRegexIexact?: string; +} + +export interface ProvidersProxyPartialUpdateRequest { + id: number; + patchedProxyProviderRequest?: PatchedProxyProviderRequest; +} + +export interface ProvidersProxyRetrieveRequest { + id: number; +} + +export interface ProvidersProxyUpdateRequest { + id: number; + proxyProviderRequest: ProxyProviderRequest; +} + +export interface ProvidersProxyUsedByListRequest { + id: number; +} + +export interface ProvidersRacCreateRequest { + rACProviderRequest: RACProviderRequest; +} + +export interface ProvidersRacDestroyRequest { + id: number; +} + +export interface ProvidersRacListRequest { + applicationIsnull?: boolean; + nameIexact?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ProvidersRacPartialUpdateRequest { + id: number; + patchedRACProviderRequest?: PatchedRACProviderRequest; +} + +export interface ProvidersRacRetrieveRequest { + id: number; +} + +export interface ProvidersRacUpdateRequest { + id: number; + rACProviderRequest: RACProviderRequest; +} + +export interface ProvidersRacUsedByListRequest { + id: number; +} + +export interface ProvidersRadiusCreateRequest { + radiusProviderRequest: RadiusProviderRequest; +} + +export interface ProvidersRadiusDestroyRequest { + id: number; +} + +export interface ProvidersRadiusListRequest { + applicationIsnull?: boolean; + authorizationFlowSlugIexact?: string; + clientNetworksIexact?: string; + nameIexact?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ProvidersRadiusPartialUpdateRequest { + id: number; + patchedRadiusProviderRequest?: PatchedRadiusProviderRequest; +} + +export interface ProvidersRadiusRetrieveRequest { + id: number; +} + +export interface ProvidersRadiusUpdateRequest { + id: number; + radiusProviderRequest: RadiusProviderRequest; +} + +export interface ProvidersRadiusUsedByListRequest { + id: number; +} + +export interface ProvidersSamlCreateRequest { + sAMLProviderRequest: SAMLProviderRequest; +} + +export interface ProvidersSamlDestroyRequest { + id: number; +} + +export interface ProvidersSamlImportMetadataCreateRequest { + name: string; + authorizationFlow: string; + invalidationFlow: string; + file: Blob; +} + +export interface ProvidersSamlListRequest { + acsUrl?: string; + assertionValidNotBefore?: string; + assertionValidNotOnOrAfter?: string; + audience?: string; + authenticationFlow?: string; + authnContextClassRefMapping?: string; + authorizationFlow?: string; + backchannelApplication?: string; + defaultNameIdPolicy?: ProvidersSamlListDefaultNameIdPolicyEnum; + defaultRelayState?: string; + digestAlgorithm?: ProvidersSamlListDigestAlgorithmEnum; + encryptionKp?: string; + invalidationFlow?: string; + isBackchannel?: boolean; + issuer?: string; + logoutMethod?: ProvidersSamlListLogoutMethodEnum; + name?: string; + nameIdMapping?: string; + ordering?: string; + page?: number; + pageSize?: number; + propertyMappings?: Array; + search?: string; + sessionValidNotOnOrAfter?: string; + signAssertion?: boolean; + signLogoutRequest?: boolean; + signLogoutResponse?: boolean; + signResponse?: boolean; + signatureAlgorithm?: ProvidersSamlListSignatureAlgorithmEnum; + signingKp?: string; + slsBinding?: ProvidersSamlListSlsBindingEnum; + slsUrl?: string; + spBinding?: ProvidersSamlListSpBindingEnum; + verificationKp?: string; +} + +export interface ProvidersSamlMetadataRetrieveRequest { + id: number; + download?: boolean; + forceBinding?: ProvidersSamlMetadataRetrieveForceBindingEnum; +} + +export interface ProvidersSamlPartialUpdateRequest { + id: number; + patchedSAMLProviderRequest?: PatchedSAMLProviderRequest; +} + +export interface ProvidersSamlPreviewUserRetrieveRequest { + id: number; + forUser?: number; +} + +export interface ProvidersSamlRetrieveRequest { + id: number; +} + +export interface ProvidersSamlUpdateRequest { + id: number; + sAMLProviderRequest: SAMLProviderRequest; +} + +export interface ProvidersSamlUsedByListRequest { + id: number; +} + +export interface ProvidersScimCreateRequest { + sCIMProviderRequest: SCIMProviderRequest; +} + +export interface ProvidersScimDestroyRequest { + id: number; +} + +export interface ProvidersScimGroupsCreateRequest { + sCIMProviderGroupRequest: SCIMProviderGroupRequest; +} + +export interface ProvidersScimGroupsDestroyRequest { + id: string; +} + +export interface ProvidersScimGroupsListRequest { + groupGroupUuid?: string; + groupName?: string; + ordering?: string; + page?: number; + pageSize?: number; + providerId?: number; + search?: string; +} + +export interface ProvidersScimGroupsRetrieveRequest { + id: string; +} + +export interface ProvidersScimGroupsUsedByListRequest { + id: string; +} + +export interface ProvidersScimListRequest { + excludeUsersServiceAccount?: boolean; + groupFilters?: Array; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + url?: string; +} + +export interface ProvidersScimPartialUpdateRequest { + id: number; + patchedSCIMProviderRequest?: PatchedSCIMProviderRequest; +} + +export interface ProvidersScimRetrieveRequest { + id: number; +} + +export interface ProvidersScimSyncObjectCreateRequest { + id: number; + syncObjectRequest: SyncObjectRequest; +} + +export interface ProvidersScimSyncStatusRetrieveRequest { + id: number; +} + +export interface ProvidersScimUpdateRequest { + id: number; + sCIMProviderRequest: SCIMProviderRequest; +} + +export interface ProvidersScimUsedByListRequest { + id: number; +} + +export interface ProvidersScimUsersCreateRequest { + sCIMProviderUserRequest: SCIMProviderUserRequest; +} + +export interface ProvidersScimUsersDestroyRequest { + id: string; +} + +export interface ProvidersScimUsersListRequest { + ordering?: string; + page?: number; + pageSize?: number; + providerId?: number; + search?: string; + userId?: number; + userUsername?: string; +} + +export interface ProvidersScimUsersRetrieveRequest { + id: string; +} + +export interface ProvidersScimUsersUsedByListRequest { + id: string; +} + +export interface ProvidersSsfCreateRequest { + sSFProviderRequest: SSFProviderRequest; +} + +export interface ProvidersSsfDestroyRequest { + id: number; +} + +export interface ProvidersSsfListRequest { + applicationIsnull?: boolean; + nameIexact?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ProvidersSsfPartialUpdateRequest { + id: number; + patchedSSFProviderRequest?: PatchedSSFProviderRequest; +} + +export interface ProvidersSsfRetrieveRequest { + id: number; +} + +export interface ProvidersSsfUpdateRequest { + id: number; + sSFProviderRequest: SSFProviderRequest; +} + +export interface ProvidersSsfUsedByListRequest { + id: number; +} + +export interface ProvidersWsfedCreateRequest { + wSFederationProviderRequest: WSFederationProviderRequest; +} + +export interface ProvidersWsfedDestroyRequest { + id: number; +} + +export interface ProvidersWsfedListRequest { + acsUrl?: string; + assertionValidNotBefore?: string; + assertionValidNotOnOrAfter?: string; + audience?: string; + authenticationFlow?: string; + authnContextClassRefMapping?: string; + authorizationFlow?: string; + backchannelApplication?: string; + defaultNameIdPolicy?: ProvidersWsfedListDefaultNameIdPolicyEnum; + defaultRelayState?: string; + digestAlgorithm?: ProvidersWsfedListDigestAlgorithmEnum; + encryptionKp?: string; + invalidationFlow?: string; + isBackchannel?: boolean; + issuer?: string; + logoutMethod?: ProvidersWsfedListLogoutMethodEnum; + name?: string; + nameIdMapping?: string; + ordering?: string; + page?: number; + pageSize?: number; + propertyMappings?: Array; + search?: string; + sessionValidNotOnOrAfter?: string; + signAssertion?: boolean; + signLogoutRequest?: boolean; + signLogoutResponse?: boolean; + signResponse?: boolean; + signatureAlgorithm?: ProvidersWsfedListSignatureAlgorithmEnum; + signingKp?: string; + slsBinding?: ProvidersWsfedListSlsBindingEnum; + slsUrl?: string; + spBinding?: ProvidersWsfedListSpBindingEnum; + verificationKp?: string; +} + +export interface ProvidersWsfedMetadataRetrieveRequest { + id: number; + download?: boolean; + forceBinding?: ProvidersWsfedMetadataRetrieveForceBindingEnum; +} + +export interface ProvidersWsfedPartialUpdateRequest { + id: number; + patchedWSFederationProviderRequest?: PatchedWSFederationProviderRequest; +} + +export interface ProvidersWsfedPreviewUserRetrieveRequest { + id: number; + forUser?: number; +} + +export interface ProvidersWsfedRetrieveRequest { + id: number; +} + +export interface ProvidersWsfedUpdateRequest { + id: number; + wSFederationProviderRequest: WSFederationProviderRequest; +} + +export interface ProvidersWsfedUsedByListRequest { + id: number; +} + +/** + * + */ +export class ProvidersApi extends runtime.BaseAPI { + + /** + * Creates request options for providersAllDestroy without sending the request + */ + async providersAllDestroyRequestOpts(requestParameters: ProvidersAllDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Provider Viewset + */ + async providersAllDestroyRaw(requestParameters: ProvidersAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Provider Viewset + */ + async providersAllDestroy(requestParameters: ProvidersAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersAllList without sending the request + */ + async providersAllListRequestOpts(requestParameters: ProvidersAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['applicationIsnull'] != null) { + queryParameters['application__isnull'] = requestParameters['applicationIsnull']; + } + + if (requestParameters['backchannel'] != null) { + queryParameters['backchannel'] = requestParameters['backchannel']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Provider Viewset + */ + async providersAllListRaw(requestParameters: ProvidersAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProviderListFromJSON(jsonValue)); + } + + /** + * Provider Viewset + */ + async providersAllList(requestParameters: ProvidersAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersAllRetrieve without sending the request + */ + async providersAllRetrieveRequestOpts(requestParameters: ProvidersAllRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Provider Viewset + */ + async providersAllRetrieveRaw(requestParameters: ProvidersAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProviderFromJSON(jsonValue)); + } + + /** + * Provider Viewset + */ + async providersAllRetrieve(requestParameters: ProvidersAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersAllTypesList without sending the request + */ + async providersAllTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/all/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async providersAllTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersAllTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async providersAllTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersAllTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersAllUsedByList without sending the request + */ + async providersAllUsedByListRequestOpts(requestParameters: ProvidersAllUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/all/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersAllUsedByListRaw(requestParameters: ProvidersAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersAllUsedByList(requestParameters: ProvidersAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceCreate without sending the request + */ + async providersGoogleWorkspaceCreateRequestOpts(requestParameters: ProvidersGoogleWorkspaceCreateRequest): Promise { + if (requestParameters['googleWorkspaceProviderRequest'] == null) { + throw new runtime.RequiredError( + 'googleWorkspaceProviderRequest', + 'Required parameter "googleWorkspaceProviderRequest" was null or undefined when calling providersGoogleWorkspaceCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GoogleWorkspaceProviderRequestToJSON(requestParameters['googleWorkspaceProviderRequest']), + }; + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceCreateRaw(requestParameters: ProvidersGoogleWorkspaceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceCreate(requestParameters: ProvidersGoogleWorkspaceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceDestroy without sending the request + */ + async providersGoogleWorkspaceDestroyRequestOpts(requestParameters: ProvidersGoogleWorkspaceDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceDestroyRaw(requestParameters: ProvidersGoogleWorkspaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceDestroy(requestParameters: ProvidersGoogleWorkspaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersGoogleWorkspaceDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersGoogleWorkspaceGroupsCreate without sending the request + */ + async providersGoogleWorkspaceGroupsCreateRequestOpts(requestParameters: ProvidersGoogleWorkspaceGroupsCreateRequest): Promise { + if (requestParameters['googleWorkspaceProviderGroupRequest'] == null) { + throw new runtime.RequiredError( + 'googleWorkspaceProviderGroupRequest', + 'Required parameter "googleWorkspaceProviderGroupRequest" was null or undefined when calling providersGoogleWorkspaceGroupsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_groups/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GoogleWorkspaceProviderGroupRequestToJSON(requestParameters['googleWorkspaceProviderGroupRequest']), + }; + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsCreateRaw(requestParameters: ProvidersGoogleWorkspaceGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceGroupsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderGroupFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsCreate(requestParameters: ProvidersGoogleWorkspaceGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceGroupsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceGroupsDestroy without sending the request + */ + async providersGoogleWorkspaceGroupsDestroyRequestOpts(requestParameters: ProvidersGoogleWorkspaceGroupsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceGroupsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsDestroyRaw(requestParameters: ProvidersGoogleWorkspaceGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceGroupsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsDestroy(requestParameters: ProvidersGoogleWorkspaceGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersGoogleWorkspaceGroupsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersGoogleWorkspaceGroupsList without sending the request + */ + async providersGoogleWorkspaceGroupsListRequestOpts(requestParameters: ProvidersGoogleWorkspaceGroupsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['groupGroupUuid'] != null) { + queryParameters['group__group_uuid'] = requestParameters['groupGroupUuid']; + } + + if (requestParameters['groupName'] != null) { + queryParameters['group__name'] = requestParameters['groupName']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providerId'] != null) { + queryParameters['provider__id'] = requestParameters['providerId']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_groups/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsListRaw(requestParameters: ProvidersGoogleWorkspaceGroupsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceGroupsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleWorkspaceProviderGroupListFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsList(requestParameters: ProvidersGoogleWorkspaceGroupsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceGroupsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceGroupsRetrieve without sending the request + */ + async providersGoogleWorkspaceGroupsRetrieveRequestOpts(requestParameters: ProvidersGoogleWorkspaceGroupsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceGroupsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsRetrieveRaw(requestParameters: ProvidersGoogleWorkspaceGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceGroupsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderGroupFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderGroup Viewset + */ + async providersGoogleWorkspaceGroupsRetrieve(requestParameters: ProvidersGoogleWorkspaceGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceGroupsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceGroupsUsedByList without sending the request + */ + async providersGoogleWorkspaceGroupsUsedByListRequestOpts(requestParameters: ProvidersGoogleWorkspaceGroupsUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceGroupsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_groups/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersGoogleWorkspaceGroupsUsedByListRaw(requestParameters: ProvidersGoogleWorkspaceGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersGoogleWorkspaceGroupsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersGoogleWorkspaceGroupsUsedByList(requestParameters: ProvidersGoogleWorkspaceGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersGoogleWorkspaceGroupsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceList without sending the request + */ + async providersGoogleWorkspaceListRequestOpts(requestParameters: ProvidersGoogleWorkspaceListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['delegatedSubject'] != null) { + queryParameters['delegated_subject'] = requestParameters['delegatedSubject']; + } + + if (requestParameters['excludeUsersServiceAccount'] != null) { + queryParameters['exclude_users_service_account'] = requestParameters['excludeUsersServiceAccount']; + } + + if (requestParameters['filterGroup'] != null) { + queryParameters['filter_group'] = requestParameters['filterGroup']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceListRaw(requestParameters: ProvidersGoogleWorkspaceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleWorkspaceProviderListFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceList(requestParameters: ProvidersGoogleWorkspaceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspacePartialUpdate without sending the request + */ + async providersGoogleWorkspacePartialUpdateRequestOpts(requestParameters: ProvidersGoogleWorkspacePartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspacePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGoogleWorkspaceProviderRequestToJSON(requestParameters['patchedGoogleWorkspaceProviderRequest']), + }; + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspacePartialUpdateRaw(requestParameters: ProvidersGoogleWorkspacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspacePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspacePartialUpdate(requestParameters: ProvidersGoogleWorkspacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspacePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceRetrieve without sending the request + */ + async providersGoogleWorkspaceRetrieveRequestOpts(requestParameters: ProvidersGoogleWorkspaceRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceRetrieveRaw(requestParameters: ProvidersGoogleWorkspaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceRetrieve(requestParameters: ProvidersGoogleWorkspaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceSyncObjectCreate without sending the request + */ + async providersGoogleWorkspaceSyncObjectCreateRequestOpts(requestParameters: ProvidersGoogleWorkspaceSyncObjectCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceSyncObjectCreate().' + ); + } + + if (requestParameters['syncObjectRequest'] == null) { + throw new runtime.RequiredError( + 'syncObjectRequest', + 'Required parameter "syncObjectRequest" was null or undefined when calling providersGoogleWorkspaceSyncObjectCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/sync/object/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SyncObjectRequestToJSON(requestParameters['syncObjectRequest']), + }; + } + + /** + * Sync/Re-sync a single user/group object + */ + async providersGoogleWorkspaceSyncObjectCreateRaw(requestParameters: ProvidersGoogleWorkspaceSyncObjectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceSyncObjectCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncObjectResultFromJSON(jsonValue)); + } + + /** + * Sync/Re-sync a single user/group object + */ + async providersGoogleWorkspaceSyncObjectCreate(requestParameters: ProvidersGoogleWorkspaceSyncObjectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceSyncObjectCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceSyncStatusRetrieve without sending the request + */ + async providersGoogleWorkspaceSyncStatusRetrieveRequestOpts(requestParameters: ProvidersGoogleWorkspaceSyncStatusRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceSyncStatusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/sync/status/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get provider\'s sync status + */ + async providersGoogleWorkspaceSyncStatusRetrieveRaw(requestParameters: ProvidersGoogleWorkspaceSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceSyncStatusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncStatusFromJSON(jsonValue)); + } + + /** + * Get provider\'s sync status + */ + async providersGoogleWorkspaceSyncStatusRetrieve(requestParameters: ProvidersGoogleWorkspaceSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceSyncStatusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceUpdate without sending the request + */ + async providersGoogleWorkspaceUpdateRequestOpts(requestParameters: ProvidersGoogleWorkspaceUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceUpdate().' + ); + } + + if (requestParameters['googleWorkspaceProviderRequest'] == null) { + throw new runtime.RequiredError( + 'googleWorkspaceProviderRequest', + 'Required parameter "googleWorkspaceProviderRequest" was null or undefined when calling providersGoogleWorkspaceUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GoogleWorkspaceProviderRequestToJSON(requestParameters['googleWorkspaceProviderRequest']), + }; + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceUpdateRaw(requestParameters: ProvidersGoogleWorkspaceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProvider Viewset + */ + async providersGoogleWorkspaceUpdate(requestParameters: ProvidersGoogleWorkspaceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceUsedByList without sending the request + */ + async providersGoogleWorkspaceUsedByListRequestOpts(requestParameters: ProvidersGoogleWorkspaceUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersGoogleWorkspaceUsedByListRaw(requestParameters: ProvidersGoogleWorkspaceUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersGoogleWorkspaceUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersGoogleWorkspaceUsedByList(requestParameters: ProvidersGoogleWorkspaceUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersGoogleWorkspaceUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceUsersCreate without sending the request + */ + async providersGoogleWorkspaceUsersCreateRequestOpts(requestParameters: ProvidersGoogleWorkspaceUsersCreateRequest): Promise { + if (requestParameters['googleWorkspaceProviderUserRequest'] == null) { + throw new runtime.RequiredError( + 'googleWorkspaceProviderUserRequest', + 'Required parameter "googleWorkspaceProviderUserRequest" was null or undefined when calling providersGoogleWorkspaceUsersCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_users/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GoogleWorkspaceProviderUserRequestToJSON(requestParameters['googleWorkspaceProviderUserRequest']), + }; + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersCreateRaw(requestParameters: ProvidersGoogleWorkspaceUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceUsersCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderUserFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersCreate(requestParameters: ProvidersGoogleWorkspaceUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceUsersCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceUsersDestroy without sending the request + */ + async providersGoogleWorkspaceUsersDestroyRequestOpts(requestParameters: ProvidersGoogleWorkspaceUsersDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceUsersDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersDestroyRaw(requestParameters: ProvidersGoogleWorkspaceUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceUsersDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersDestroy(requestParameters: ProvidersGoogleWorkspaceUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersGoogleWorkspaceUsersDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersGoogleWorkspaceUsersList without sending the request + */ + async providersGoogleWorkspaceUsersListRequestOpts(requestParameters: ProvidersGoogleWorkspaceUsersListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providerId'] != null) { + queryParameters['provider__id'] = requestParameters['providerId']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['userId'] != null) { + queryParameters['user__id'] = requestParameters['userId']; + } + + if (requestParameters['userUsername'] != null) { + queryParameters['user__username'] = requestParameters['userUsername']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_users/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersListRaw(requestParameters: ProvidersGoogleWorkspaceUsersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceUsersListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGoogleWorkspaceProviderUserListFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersList(requestParameters: ProvidersGoogleWorkspaceUsersListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceUsersListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceUsersRetrieve without sending the request + */ + async providersGoogleWorkspaceUsersRetrieveRequestOpts(requestParameters: ProvidersGoogleWorkspaceUsersRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceUsersRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersRetrieveRaw(requestParameters: ProvidersGoogleWorkspaceUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersGoogleWorkspaceUsersRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GoogleWorkspaceProviderUserFromJSON(jsonValue)); + } + + /** + * GoogleWorkspaceProviderUser Viewset + */ + async providersGoogleWorkspaceUsersRetrieve(requestParameters: ProvidersGoogleWorkspaceUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersGoogleWorkspaceUsersRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersGoogleWorkspaceUsersUsedByList without sending the request + */ + async providersGoogleWorkspaceUsersUsedByListRequestOpts(requestParameters: ProvidersGoogleWorkspaceUsersUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersGoogleWorkspaceUsersUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/google_workspace_users/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersGoogleWorkspaceUsersUsedByListRaw(requestParameters: ProvidersGoogleWorkspaceUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersGoogleWorkspaceUsersUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersGoogleWorkspaceUsersUsedByList(requestParameters: ProvidersGoogleWorkspaceUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersGoogleWorkspaceUsersUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersLdapCreate without sending the request + */ + async providersLdapCreateRequestOpts(requestParameters: ProvidersLdapCreateRequest): Promise { + if (requestParameters['lDAPProviderRequest'] == null) { + throw new runtime.RequiredError( + 'lDAPProviderRequest', + 'Required parameter "lDAPProviderRequest" was null or undefined when calling providersLdapCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LDAPProviderRequestToJSON(requestParameters['lDAPProviderRequest']), + }; + } + + /** + * LDAPProvider Viewset + */ + async providersLdapCreateRaw(requestParameters: ProvidersLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersLdapCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPProviderFromJSON(jsonValue)); + } + + /** + * LDAPProvider Viewset + */ + async providersLdapCreate(requestParameters: ProvidersLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersLdapCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersLdapDestroy without sending the request + */ + async providersLdapDestroyRequestOpts(requestParameters: ProvidersLdapDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersLdapDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAPProvider Viewset + */ + async providersLdapDestroyRaw(requestParameters: ProvidersLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersLdapDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * LDAPProvider Viewset + */ + async providersLdapDestroy(requestParameters: ProvidersLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersLdapDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersLdapList without sending the request + */ + async providersLdapListRequestOpts(requestParameters: ProvidersLdapListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['applicationIsnull'] != null) { + queryParameters['application__isnull'] = requestParameters['applicationIsnull']; + } + + if (requestParameters['authorizationFlowSlugIexact'] != null) { + queryParameters['authorization_flow__slug__iexact'] = requestParameters['authorizationFlowSlugIexact']; + } + + if (requestParameters['baseDnIexact'] != null) { + queryParameters['base_dn__iexact'] = requestParameters['baseDnIexact']; + } + + if (requestParameters['certificateKpUuidIexact'] != null) { + queryParameters['certificate__kp_uuid__iexact'] = requestParameters['certificateKpUuidIexact']; + } + + if (requestParameters['certificateNameIexact'] != null) { + queryParameters['certificate__name__iexact'] = requestParameters['certificateNameIexact']; + } + + if (requestParameters['gidStartNumberIexact'] != null) { + queryParameters['gid_start_number__iexact'] = requestParameters['gidStartNumberIexact']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['tlsServerNameIexact'] != null) { + queryParameters['tls_server_name__iexact'] = requestParameters['tlsServerNameIexact']; + } + + if (requestParameters['uidStartNumberIexact'] != null) { + queryParameters['uid_start_number__iexact'] = requestParameters['uidStartNumberIexact']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAPProvider Viewset + */ + async providersLdapListRaw(requestParameters: ProvidersLdapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersLdapListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLDAPProviderListFromJSON(jsonValue)); + } + + /** + * LDAPProvider Viewset + */ + async providersLdapList(requestParameters: ProvidersLdapListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersLdapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersLdapPartialUpdate without sending the request + */ + async providersLdapPartialUpdateRequestOpts(requestParameters: ProvidersLdapPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersLdapPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedLDAPProviderRequestToJSON(requestParameters['patchedLDAPProviderRequest']), + }; + } + + /** + * LDAPProvider Viewset + */ + async providersLdapPartialUpdateRaw(requestParameters: ProvidersLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersLdapPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPProviderFromJSON(jsonValue)); + } + + /** + * LDAPProvider Viewset + */ + async providersLdapPartialUpdate(requestParameters: ProvidersLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersLdapPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersLdapRetrieve without sending the request + */ + async providersLdapRetrieveRequestOpts(requestParameters: ProvidersLdapRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersLdapRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAPProvider Viewset + */ + async providersLdapRetrieveRaw(requestParameters: ProvidersLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersLdapRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPProviderFromJSON(jsonValue)); + } + + /** + * LDAPProvider Viewset + */ + async providersLdapRetrieve(requestParameters: ProvidersLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersLdapRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersLdapUpdate without sending the request + */ + async providersLdapUpdateRequestOpts(requestParameters: ProvidersLdapUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersLdapUpdate().' + ); + } + + if (requestParameters['lDAPProviderRequest'] == null) { + throw new runtime.RequiredError( + 'lDAPProviderRequest', + 'Required parameter "lDAPProviderRequest" was null or undefined when calling providersLdapUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: LDAPProviderRequestToJSON(requestParameters['lDAPProviderRequest']), + }; + } + + /** + * LDAPProvider Viewset + */ + async providersLdapUpdateRaw(requestParameters: ProvidersLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersLdapUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPProviderFromJSON(jsonValue)); + } + + /** + * LDAPProvider Viewset + */ + async providersLdapUpdate(requestParameters: ProvidersLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersLdapUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersLdapUsedByList without sending the request + */ + async providersLdapUsedByListRequestOpts(requestParameters: ProvidersLdapUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersLdapUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ldap/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersLdapUsedByListRaw(requestParameters: ProvidersLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersLdapUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersLdapUsedByList(requestParameters: ProvidersLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersLdapUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraCreate without sending the request + */ + async providersMicrosoftEntraCreateRequestOpts(requestParameters: ProvidersMicrosoftEntraCreateRequest): Promise { + if (requestParameters['microsoftEntraProviderRequest'] == null) { + throw new runtime.RequiredError( + 'microsoftEntraProviderRequest', + 'Required parameter "microsoftEntraProviderRequest" was null or undefined when calling providersMicrosoftEntraCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MicrosoftEntraProviderRequestToJSON(requestParameters['microsoftEntraProviderRequest']), + }; + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraCreateRaw(requestParameters: ProvidersMicrosoftEntraCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraCreate(requestParameters: ProvidersMicrosoftEntraCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraDestroy without sending the request + */ + async providersMicrosoftEntraDestroyRequestOpts(requestParameters: ProvidersMicrosoftEntraDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraDestroyRaw(requestParameters: ProvidersMicrosoftEntraDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraDestroy(requestParameters: ProvidersMicrosoftEntraDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersMicrosoftEntraDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersMicrosoftEntraGroupsCreate without sending the request + */ + async providersMicrosoftEntraGroupsCreateRequestOpts(requestParameters: ProvidersMicrosoftEntraGroupsCreateRequest): Promise { + if (requestParameters['microsoftEntraProviderGroupRequest'] == null) { + throw new runtime.RequiredError( + 'microsoftEntraProviderGroupRequest', + 'Required parameter "microsoftEntraProviderGroupRequest" was null or undefined when calling providersMicrosoftEntraGroupsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_groups/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MicrosoftEntraProviderGroupRequestToJSON(requestParameters['microsoftEntraProviderGroupRequest']), + }; + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsCreateRaw(requestParameters: ProvidersMicrosoftEntraGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraGroupsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderGroupFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsCreate(requestParameters: ProvidersMicrosoftEntraGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraGroupsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraGroupsDestroy without sending the request + */ + async providersMicrosoftEntraGroupsDestroyRequestOpts(requestParameters: ProvidersMicrosoftEntraGroupsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraGroupsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsDestroyRaw(requestParameters: ProvidersMicrosoftEntraGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraGroupsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsDestroy(requestParameters: ProvidersMicrosoftEntraGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersMicrosoftEntraGroupsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersMicrosoftEntraGroupsList without sending the request + */ + async providersMicrosoftEntraGroupsListRequestOpts(requestParameters: ProvidersMicrosoftEntraGroupsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['groupGroupUuid'] != null) { + queryParameters['group__group_uuid'] = requestParameters['groupGroupUuid']; + } + + if (requestParameters['groupName'] != null) { + queryParameters['group__name'] = requestParameters['groupName']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providerId'] != null) { + queryParameters['provider__id'] = requestParameters['providerId']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_groups/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsListRaw(requestParameters: ProvidersMicrosoftEntraGroupsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraGroupsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMicrosoftEntraProviderGroupListFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsList(requestParameters: ProvidersMicrosoftEntraGroupsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraGroupsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraGroupsRetrieve without sending the request + */ + async providersMicrosoftEntraGroupsRetrieveRequestOpts(requestParameters: ProvidersMicrosoftEntraGroupsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraGroupsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsRetrieveRaw(requestParameters: ProvidersMicrosoftEntraGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraGroupsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderGroupFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderGroup Viewset + */ + async providersMicrosoftEntraGroupsRetrieve(requestParameters: ProvidersMicrosoftEntraGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraGroupsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraGroupsUsedByList without sending the request + */ + async providersMicrosoftEntraGroupsUsedByListRequestOpts(requestParameters: ProvidersMicrosoftEntraGroupsUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraGroupsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_groups/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersMicrosoftEntraGroupsUsedByListRaw(requestParameters: ProvidersMicrosoftEntraGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersMicrosoftEntraGroupsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersMicrosoftEntraGroupsUsedByList(requestParameters: ProvidersMicrosoftEntraGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersMicrosoftEntraGroupsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraList without sending the request + */ + async providersMicrosoftEntraListRequestOpts(requestParameters: ProvidersMicrosoftEntraListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['excludeUsersServiceAccount'] != null) { + queryParameters['exclude_users_service_account'] = requestParameters['excludeUsersServiceAccount']; + } + + if (requestParameters['filterGroup'] != null) { + queryParameters['filter_group'] = requestParameters['filterGroup']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraListRaw(requestParameters: ProvidersMicrosoftEntraListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMicrosoftEntraProviderListFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraList(requestParameters: ProvidersMicrosoftEntraListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraPartialUpdate without sending the request + */ + async providersMicrosoftEntraPartialUpdateRequestOpts(requestParameters: ProvidersMicrosoftEntraPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedMicrosoftEntraProviderRequestToJSON(requestParameters['patchedMicrosoftEntraProviderRequest']), + }; + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraPartialUpdateRaw(requestParameters: ProvidersMicrosoftEntraPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraPartialUpdate(requestParameters: ProvidersMicrosoftEntraPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraRetrieve without sending the request + */ + async providersMicrosoftEntraRetrieveRequestOpts(requestParameters: ProvidersMicrosoftEntraRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraRetrieveRaw(requestParameters: ProvidersMicrosoftEntraRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraRetrieve(requestParameters: ProvidersMicrosoftEntraRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraSyncObjectCreate without sending the request + */ + async providersMicrosoftEntraSyncObjectCreateRequestOpts(requestParameters: ProvidersMicrosoftEntraSyncObjectCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraSyncObjectCreate().' + ); + } + + if (requestParameters['syncObjectRequest'] == null) { + throw new runtime.RequiredError( + 'syncObjectRequest', + 'Required parameter "syncObjectRequest" was null or undefined when calling providersMicrosoftEntraSyncObjectCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/sync/object/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SyncObjectRequestToJSON(requestParameters['syncObjectRequest']), + }; + } + + /** + * Sync/Re-sync a single user/group object + */ + async providersMicrosoftEntraSyncObjectCreateRaw(requestParameters: ProvidersMicrosoftEntraSyncObjectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraSyncObjectCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncObjectResultFromJSON(jsonValue)); + } + + /** + * Sync/Re-sync a single user/group object + */ + async providersMicrosoftEntraSyncObjectCreate(requestParameters: ProvidersMicrosoftEntraSyncObjectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraSyncObjectCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraSyncStatusRetrieve without sending the request + */ + async providersMicrosoftEntraSyncStatusRetrieveRequestOpts(requestParameters: ProvidersMicrosoftEntraSyncStatusRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraSyncStatusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/sync/status/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get provider\'s sync status + */ + async providersMicrosoftEntraSyncStatusRetrieveRaw(requestParameters: ProvidersMicrosoftEntraSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraSyncStatusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncStatusFromJSON(jsonValue)); + } + + /** + * Get provider\'s sync status + */ + async providersMicrosoftEntraSyncStatusRetrieve(requestParameters: ProvidersMicrosoftEntraSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraSyncStatusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraUpdate without sending the request + */ + async providersMicrosoftEntraUpdateRequestOpts(requestParameters: ProvidersMicrosoftEntraUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraUpdate().' + ); + } + + if (requestParameters['microsoftEntraProviderRequest'] == null) { + throw new runtime.RequiredError( + 'microsoftEntraProviderRequest', + 'Required parameter "microsoftEntraProviderRequest" was null or undefined when calling providersMicrosoftEntraUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: MicrosoftEntraProviderRequestToJSON(requestParameters['microsoftEntraProviderRequest']), + }; + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraUpdateRaw(requestParameters: ProvidersMicrosoftEntraUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProvider Viewset + */ + async providersMicrosoftEntraUpdate(requestParameters: ProvidersMicrosoftEntraUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraUsedByList without sending the request + */ + async providersMicrosoftEntraUsedByListRequestOpts(requestParameters: ProvidersMicrosoftEntraUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersMicrosoftEntraUsedByListRaw(requestParameters: ProvidersMicrosoftEntraUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersMicrosoftEntraUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersMicrosoftEntraUsedByList(requestParameters: ProvidersMicrosoftEntraUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersMicrosoftEntraUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraUsersCreate without sending the request + */ + async providersMicrosoftEntraUsersCreateRequestOpts(requestParameters: ProvidersMicrosoftEntraUsersCreateRequest): Promise { + if (requestParameters['microsoftEntraProviderUserRequest'] == null) { + throw new runtime.RequiredError( + 'microsoftEntraProviderUserRequest', + 'Required parameter "microsoftEntraProviderUserRequest" was null or undefined when calling providersMicrosoftEntraUsersCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_users/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MicrosoftEntraProviderUserRequestToJSON(requestParameters['microsoftEntraProviderUserRequest']), + }; + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersCreateRaw(requestParameters: ProvidersMicrosoftEntraUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraUsersCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderUserFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersCreate(requestParameters: ProvidersMicrosoftEntraUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraUsersCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraUsersDestroy without sending the request + */ + async providersMicrosoftEntraUsersDestroyRequestOpts(requestParameters: ProvidersMicrosoftEntraUsersDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraUsersDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersDestroyRaw(requestParameters: ProvidersMicrosoftEntraUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraUsersDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersDestroy(requestParameters: ProvidersMicrosoftEntraUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersMicrosoftEntraUsersDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersMicrosoftEntraUsersList without sending the request + */ + async providersMicrosoftEntraUsersListRequestOpts(requestParameters: ProvidersMicrosoftEntraUsersListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providerId'] != null) { + queryParameters['provider__id'] = requestParameters['providerId']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['userId'] != null) { + queryParameters['user__id'] = requestParameters['userId']; + } + + if (requestParameters['userUsername'] != null) { + queryParameters['user__username'] = requestParameters['userUsername']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_users/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersListRaw(requestParameters: ProvidersMicrosoftEntraUsersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraUsersListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMicrosoftEntraProviderUserListFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersList(requestParameters: ProvidersMicrosoftEntraUsersListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraUsersListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraUsersRetrieve without sending the request + */ + async providersMicrosoftEntraUsersRetrieveRequestOpts(requestParameters: ProvidersMicrosoftEntraUsersRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraUsersRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersRetrieveRaw(requestParameters: ProvidersMicrosoftEntraUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersMicrosoftEntraUsersRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MicrosoftEntraProviderUserFromJSON(jsonValue)); + } + + /** + * MicrosoftEntraProviderUser Viewset + */ + async providersMicrosoftEntraUsersRetrieve(requestParameters: ProvidersMicrosoftEntraUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersMicrosoftEntraUsersRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersMicrosoftEntraUsersUsedByList without sending the request + */ + async providersMicrosoftEntraUsersUsedByListRequestOpts(requestParameters: ProvidersMicrosoftEntraUsersUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersMicrosoftEntraUsersUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/microsoft_entra_users/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersMicrosoftEntraUsersUsedByListRaw(requestParameters: ProvidersMicrosoftEntraUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersMicrosoftEntraUsersUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersMicrosoftEntraUsersUsedByList(requestParameters: ProvidersMicrosoftEntraUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersMicrosoftEntraUsersUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2Create without sending the request + */ + async providersOauth2CreateRequestOpts(requestParameters: ProvidersOauth2CreateRequest): Promise { + if (requestParameters['oAuth2ProviderRequest'] == null) { + throw new runtime.RequiredError( + 'oAuth2ProviderRequest', + 'Required parameter "oAuth2ProviderRequest" was null or undefined when calling providersOauth2Create().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OAuth2ProviderRequestToJSON(requestParameters['oAuth2ProviderRequest']), + }; + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2CreateRaw(requestParameters: ProvidersOauth2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2CreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ProviderFromJSON(jsonValue)); + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2Create(requestParameters: ProvidersOauth2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2CreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2Destroy without sending the request + */ + async providersOauth2DestroyRequestOpts(requestParameters: ProvidersOauth2DestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2Destroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2DestroyRaw(requestParameters: ProvidersOauth2DestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2DestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2Destroy(requestParameters: ProvidersOauth2DestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersOauth2DestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersOauth2List without sending the request + */ + async providersOauth2ListRequestOpts(requestParameters: ProvidersOauth2ListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['accessCodeValidity'] != null) { + queryParameters['access_code_validity'] = requestParameters['accessCodeValidity']; + } + + if (requestParameters['accessTokenValidity'] != null) { + queryParameters['access_token_validity'] = requestParameters['accessTokenValidity']; + } + + if (requestParameters['application'] != null) { + queryParameters['application'] = requestParameters['application']; + } + + if (requestParameters['authorizationFlow'] != null) { + queryParameters['authorization_flow'] = requestParameters['authorizationFlow']; + } + + if (requestParameters['clientId'] != null) { + queryParameters['client_id'] = requestParameters['clientId']; + } + + if (requestParameters['clientType'] != null) { + queryParameters['client_type'] = requestParameters['clientType']; + } + + if (requestParameters['includeClaimsInIdToken'] != null) { + queryParameters['include_claims_in_id_token'] = requestParameters['includeClaimsInIdToken']; + } + + if (requestParameters['issuerMode'] != null) { + queryParameters['issuer_mode'] = requestParameters['issuerMode']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['propertyMappings'] != null) { + queryParameters['property_mappings'] = requestParameters['propertyMappings']; + } + + if (requestParameters['refreshTokenValidity'] != null) { + queryParameters['refresh_token_validity'] = requestParameters['refreshTokenValidity']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['signingKey'] != null) { + queryParameters['signing_key'] = requestParameters['signingKey']; + } + + if (requestParameters['subMode'] != null) { + queryParameters['sub_mode'] = requestParameters['subMode']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2ListRaw(requestParameters: ProvidersOauth2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2ListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOAuth2ProviderListFromJSON(jsonValue)); + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2List(requestParameters: ProvidersOauth2ListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2ListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2PartialUpdate without sending the request + */ + async providersOauth2PartialUpdateRequestOpts(requestParameters: ProvidersOauth2PartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2PartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedOAuth2ProviderRequestToJSON(requestParameters['patchedOAuth2ProviderRequest']), + }; + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2PartialUpdateRaw(requestParameters: ProvidersOauth2PartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2PartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ProviderFromJSON(jsonValue)); + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2PartialUpdate(requestParameters: ProvidersOauth2PartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2PartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2PreviewUserRetrieve without sending the request + */ + async providersOauth2PreviewUserRetrieveRequestOpts(requestParameters: ProvidersOauth2PreviewUserRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2PreviewUserRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['forUser'] != null) { + queryParameters['for_user'] = requestParameters['forUser']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/preview_user/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Preview user data for provider + */ + async providersOauth2PreviewUserRetrieveRaw(requestParameters: ProvidersOauth2PreviewUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2PreviewUserRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PropertyMappingPreviewFromJSON(jsonValue)); + } + + /** + * Preview user data for provider + */ + async providersOauth2PreviewUserRetrieve(requestParameters: ProvidersOauth2PreviewUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2PreviewUserRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2Retrieve without sending the request + */ + async providersOauth2RetrieveRequestOpts(requestParameters: ProvidersOauth2RetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2Retrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2RetrieveRaw(requestParameters: ProvidersOauth2RetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2RetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ProviderFromJSON(jsonValue)); + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2Retrieve(requestParameters: ProvidersOauth2RetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2RetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2SetupUrlsRetrieve without sending the request + */ + async providersOauth2SetupUrlsRetrieveRequestOpts(requestParameters: ProvidersOauth2SetupUrlsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2SetupUrlsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/setup_urls/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get Providers setup URLs + */ + async providersOauth2SetupUrlsRetrieveRaw(requestParameters: ProvidersOauth2SetupUrlsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2SetupUrlsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ProviderSetupURLsFromJSON(jsonValue)); + } + + /** + * Get Providers setup URLs + */ + async providersOauth2SetupUrlsRetrieve(requestParameters: ProvidersOauth2SetupUrlsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2SetupUrlsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2Update without sending the request + */ + async providersOauth2UpdateRequestOpts(requestParameters: ProvidersOauth2UpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2Update().' + ); + } + + if (requestParameters['oAuth2ProviderRequest'] == null) { + throw new runtime.RequiredError( + 'oAuth2ProviderRequest', + 'Required parameter "oAuth2ProviderRequest" was null or undefined when calling providersOauth2Update().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OAuth2ProviderRequestToJSON(requestParameters['oAuth2ProviderRequest']), + }; + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2UpdateRaw(requestParameters: ProvidersOauth2UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersOauth2UpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2ProviderFromJSON(jsonValue)); + } + + /** + * OAuth2Provider Viewset + */ + async providersOauth2Update(requestParameters: ProvidersOauth2UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersOauth2UpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersOauth2UsedByList without sending the request + */ + async providersOauth2UsedByListRequestOpts(requestParameters: ProvidersOauth2UsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersOauth2UsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/oauth2/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersOauth2UsedByListRaw(requestParameters: ProvidersOauth2UsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersOauth2UsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersOauth2UsedByList(requestParameters: ProvidersOauth2UsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersOauth2UsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersProxyCreate without sending the request + */ + async providersProxyCreateRequestOpts(requestParameters: ProvidersProxyCreateRequest): Promise { + if (requestParameters['proxyProviderRequest'] == null) { + throw new runtime.RequiredError( + 'proxyProviderRequest', + 'Required parameter "proxyProviderRequest" was null or undefined when calling providersProxyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProxyProviderRequestToJSON(requestParameters['proxyProviderRequest']), + }; + } + + /** + * ProxyProvider Viewset + */ + async providersProxyCreateRaw(requestParameters: ProvidersProxyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersProxyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProxyProviderFromJSON(jsonValue)); + } + + /** + * ProxyProvider Viewset + */ + async providersProxyCreate(requestParameters: ProvidersProxyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersProxyCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersProxyDestroy without sending the request + */ + async providersProxyDestroyRequestOpts(requestParameters: ProvidersProxyDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersProxyDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ProxyProvider Viewset + */ + async providersProxyDestroyRaw(requestParameters: ProvidersProxyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersProxyDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ProxyProvider Viewset + */ + async providersProxyDestroy(requestParameters: ProvidersProxyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersProxyDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersProxyList without sending the request + */ + async providersProxyListRequestOpts(requestParameters: ProvidersProxyListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['applicationIsnull'] != null) { + queryParameters['application__isnull'] = requestParameters['applicationIsnull']; + } + + if (requestParameters['authorizationFlowSlugIexact'] != null) { + queryParameters['authorization_flow__slug__iexact'] = requestParameters['authorizationFlowSlugIexact']; + } + + if (requestParameters['basicAuthEnabledIexact'] != null) { + queryParameters['basic_auth_enabled__iexact'] = requestParameters['basicAuthEnabledIexact']; + } + + if (requestParameters['basicAuthPasswordAttributeIexact'] != null) { + queryParameters['basic_auth_password_attribute__iexact'] = requestParameters['basicAuthPasswordAttributeIexact']; + } + + if (requestParameters['basicAuthUserAttributeIexact'] != null) { + queryParameters['basic_auth_user_attribute__iexact'] = requestParameters['basicAuthUserAttributeIexact']; + } + + if (requestParameters['certificateKpUuidIexact'] != null) { + queryParameters['certificate__kp_uuid__iexact'] = requestParameters['certificateKpUuidIexact']; + } + + if (requestParameters['certificateNameIexact'] != null) { + queryParameters['certificate__name__iexact'] = requestParameters['certificateNameIexact']; + } + + if (requestParameters['cookieDomainIexact'] != null) { + queryParameters['cookie_domain__iexact'] = requestParameters['cookieDomainIexact']; + } + + if (requestParameters['externalHostIexact'] != null) { + queryParameters['external_host__iexact'] = requestParameters['externalHostIexact']; + } + + if (requestParameters['internalHostIexact'] != null) { + queryParameters['internal_host__iexact'] = requestParameters['internalHostIexact']; + } + + if (requestParameters['internalHostSslValidationIexact'] != null) { + queryParameters['internal_host_ssl_validation__iexact'] = requestParameters['internalHostSslValidationIexact']; + } + + if (requestParameters['modeIexact'] != null) { + queryParameters['mode__iexact'] = requestParameters['modeIexact']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['propertyMappingsIexact'] != null) { + queryParameters['property_mappings__iexact'] = requestParameters['propertyMappingsIexact']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['skipPathRegexIexact'] != null) { + queryParameters['skip_path_regex__iexact'] = requestParameters['skipPathRegexIexact']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ProxyProvider Viewset + */ + async providersProxyListRaw(requestParameters: ProvidersProxyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersProxyListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProxyProviderListFromJSON(jsonValue)); + } + + /** + * ProxyProvider Viewset + */ + async providersProxyList(requestParameters: ProvidersProxyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersProxyListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersProxyPartialUpdate without sending the request + */ + async providersProxyPartialUpdateRequestOpts(requestParameters: ProvidersProxyPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersProxyPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedProxyProviderRequestToJSON(requestParameters['patchedProxyProviderRequest']), + }; + } + + /** + * ProxyProvider Viewset + */ + async providersProxyPartialUpdateRaw(requestParameters: ProvidersProxyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersProxyPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProxyProviderFromJSON(jsonValue)); + } + + /** + * ProxyProvider Viewset + */ + async providersProxyPartialUpdate(requestParameters: ProvidersProxyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersProxyPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersProxyRetrieve without sending the request + */ + async providersProxyRetrieveRequestOpts(requestParameters: ProvidersProxyRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersProxyRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ProxyProvider Viewset + */ + async providersProxyRetrieveRaw(requestParameters: ProvidersProxyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersProxyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProxyProviderFromJSON(jsonValue)); + } + + /** + * ProxyProvider Viewset + */ + async providersProxyRetrieve(requestParameters: ProvidersProxyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersProxyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersProxyUpdate without sending the request + */ + async providersProxyUpdateRequestOpts(requestParameters: ProvidersProxyUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersProxyUpdate().' + ); + } + + if (requestParameters['proxyProviderRequest'] == null) { + throw new runtime.RequiredError( + 'proxyProviderRequest', + 'Required parameter "proxyProviderRequest" was null or undefined when calling providersProxyUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ProxyProviderRequestToJSON(requestParameters['proxyProviderRequest']), + }; + } + + /** + * ProxyProvider Viewset + */ + async providersProxyUpdateRaw(requestParameters: ProvidersProxyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersProxyUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProxyProviderFromJSON(jsonValue)); + } + + /** + * ProxyProvider Viewset + */ + async providersProxyUpdate(requestParameters: ProvidersProxyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersProxyUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersProxyUsedByList without sending the request + */ + async providersProxyUsedByListRequestOpts(requestParameters: ProvidersProxyUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersProxyUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/proxy/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersProxyUsedByListRaw(requestParameters: ProvidersProxyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersProxyUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersProxyUsedByList(requestParameters: ProvidersProxyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersProxyUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRacCreate without sending the request + */ + async providersRacCreateRequestOpts(requestParameters: ProvidersRacCreateRequest): Promise { + if (requestParameters['rACProviderRequest'] == null) { + throw new runtime.RequiredError( + 'rACProviderRequest', + 'Required parameter "rACProviderRequest" was null or undefined when calling providersRacCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RACProviderRequestToJSON(requestParameters['rACProviderRequest']), + }; + } + + /** + * RACProvider Viewset + */ + async providersRacCreateRaw(requestParameters: ProvidersRacCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRacCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACProviderFromJSON(jsonValue)); + } + + /** + * RACProvider Viewset + */ + async providersRacCreate(requestParameters: ProvidersRacCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRacCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRacDestroy without sending the request + */ + async providersRacDestroyRequestOpts(requestParameters: ProvidersRacDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRacDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RACProvider Viewset + */ + async providersRacDestroyRaw(requestParameters: ProvidersRacDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRacDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * RACProvider Viewset + */ + async providersRacDestroy(requestParameters: ProvidersRacDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersRacDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersRacList without sending the request + */ + async providersRacListRequestOpts(requestParameters: ProvidersRacListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['applicationIsnull'] != null) { + queryParameters['application__isnull'] = requestParameters['applicationIsnull']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RACProvider Viewset + */ + async providersRacListRaw(requestParameters: ProvidersRacListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRacListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRACProviderListFromJSON(jsonValue)); + } + + /** + * RACProvider Viewset + */ + async providersRacList(requestParameters: ProvidersRacListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRacListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRacPartialUpdate without sending the request + */ + async providersRacPartialUpdateRequestOpts(requestParameters: ProvidersRacPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRacPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedRACProviderRequestToJSON(requestParameters['patchedRACProviderRequest']), + }; + } + + /** + * RACProvider Viewset + */ + async providersRacPartialUpdateRaw(requestParameters: ProvidersRacPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRacPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACProviderFromJSON(jsonValue)); + } + + /** + * RACProvider Viewset + */ + async providersRacPartialUpdate(requestParameters: ProvidersRacPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRacPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRacRetrieve without sending the request + */ + async providersRacRetrieveRequestOpts(requestParameters: ProvidersRacRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRacRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RACProvider Viewset + */ + async providersRacRetrieveRaw(requestParameters: ProvidersRacRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRacRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACProviderFromJSON(jsonValue)); + } + + /** + * RACProvider Viewset + */ + async providersRacRetrieve(requestParameters: ProvidersRacRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRacRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRacUpdate without sending the request + */ + async providersRacUpdateRequestOpts(requestParameters: ProvidersRacUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRacUpdate().' + ); + } + + if (requestParameters['rACProviderRequest'] == null) { + throw new runtime.RequiredError( + 'rACProviderRequest', + 'Required parameter "rACProviderRequest" was null or undefined when calling providersRacUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RACProviderRequestToJSON(requestParameters['rACProviderRequest']), + }; + } + + /** + * RACProvider Viewset + */ + async providersRacUpdateRaw(requestParameters: ProvidersRacUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRacUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RACProviderFromJSON(jsonValue)); + } + + /** + * RACProvider Viewset + */ + async providersRacUpdate(requestParameters: ProvidersRacUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRacUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRacUsedByList without sending the request + */ + async providersRacUsedByListRequestOpts(requestParameters: ProvidersRacUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRacUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/rac/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersRacUsedByListRaw(requestParameters: ProvidersRacUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersRacUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersRacUsedByList(requestParameters: ProvidersRacUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersRacUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRadiusCreate without sending the request + */ + async providersRadiusCreateRequestOpts(requestParameters: ProvidersRadiusCreateRequest): Promise { + if (requestParameters['radiusProviderRequest'] == null) { + throw new runtime.RequiredError( + 'radiusProviderRequest', + 'Required parameter "radiusProviderRequest" was null or undefined when calling providersRadiusCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RadiusProviderRequestToJSON(requestParameters['radiusProviderRequest']), + }; + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusCreateRaw(requestParameters: ProvidersRadiusCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRadiusCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderFromJSON(jsonValue)); + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusCreate(requestParameters: ProvidersRadiusCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRadiusCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRadiusDestroy without sending the request + */ + async providersRadiusDestroyRequestOpts(requestParameters: ProvidersRadiusDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRadiusDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusDestroyRaw(requestParameters: ProvidersRadiusDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRadiusDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusDestroy(requestParameters: ProvidersRadiusDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersRadiusDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersRadiusList without sending the request + */ + async providersRadiusListRequestOpts(requestParameters: ProvidersRadiusListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['applicationIsnull'] != null) { + queryParameters['application__isnull'] = requestParameters['applicationIsnull']; + } + + if (requestParameters['authorizationFlowSlugIexact'] != null) { + queryParameters['authorization_flow__slug__iexact'] = requestParameters['authorizationFlowSlugIexact']; + } + + if (requestParameters['clientNetworksIexact'] != null) { + queryParameters['client_networks__iexact'] = requestParameters['clientNetworksIexact']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusListRaw(requestParameters: ProvidersRadiusListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRadiusListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRadiusProviderListFromJSON(jsonValue)); + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusList(requestParameters: ProvidersRadiusListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRadiusListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRadiusPartialUpdate without sending the request + */ + async providersRadiusPartialUpdateRequestOpts(requestParameters: ProvidersRadiusPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRadiusPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedRadiusProviderRequestToJSON(requestParameters['patchedRadiusProviderRequest']), + }; + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusPartialUpdateRaw(requestParameters: ProvidersRadiusPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRadiusPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderFromJSON(jsonValue)); + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusPartialUpdate(requestParameters: ProvidersRadiusPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRadiusPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRadiusRetrieve without sending the request + */ + async providersRadiusRetrieveRequestOpts(requestParameters: ProvidersRadiusRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRadiusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusRetrieveRaw(requestParameters: ProvidersRadiusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRadiusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderFromJSON(jsonValue)); + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusRetrieve(requestParameters: ProvidersRadiusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRadiusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRadiusUpdate without sending the request + */ + async providersRadiusUpdateRequestOpts(requestParameters: ProvidersRadiusUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRadiusUpdate().' + ); + } + + if (requestParameters['radiusProviderRequest'] == null) { + throw new runtime.RequiredError( + 'radiusProviderRequest', + 'Required parameter "radiusProviderRequest" was null or undefined when calling providersRadiusUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RadiusProviderRequestToJSON(requestParameters['radiusProviderRequest']), + }; + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusUpdateRaw(requestParameters: ProvidersRadiusUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersRadiusUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RadiusProviderFromJSON(jsonValue)); + } + + /** + * RadiusProvider Viewset + */ + async providersRadiusUpdate(requestParameters: ProvidersRadiusUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersRadiusUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersRadiusUsedByList without sending the request + */ + async providersRadiusUsedByListRequestOpts(requestParameters: ProvidersRadiusUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersRadiusUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/radius/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersRadiusUsedByListRaw(requestParameters: ProvidersRadiusUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersRadiusUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersRadiusUsedByList(requestParameters: ProvidersRadiusUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersRadiusUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlCreate without sending the request + */ + async providersSamlCreateRequestOpts(requestParameters: ProvidersSamlCreateRequest): Promise { + if (requestParameters['sAMLProviderRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLProviderRequest', + 'Required parameter "sAMLProviderRequest" was null or undefined when calling providersSamlCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SAMLProviderRequestToJSON(requestParameters['sAMLProviderRequest']), + }; + } + + /** + * SAMLProvider Viewset + */ + async providersSamlCreateRaw(requestParameters: ProvidersSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLProviderFromJSON(jsonValue)); + } + + /** + * SAMLProvider Viewset + */ + async providersSamlCreate(requestParameters: ProvidersSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlDestroy without sending the request + */ + async providersSamlDestroyRequestOpts(requestParameters: ProvidersSamlDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLProvider Viewset + */ + async providersSamlDestroyRaw(requestParameters: ProvidersSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SAMLProvider Viewset + */ + async providersSamlDestroy(requestParameters: ProvidersSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersSamlDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersSamlImportMetadataCreate without sending the request + */ + async providersSamlImportMetadataCreateRequestOpts(requestParameters: ProvidersSamlImportMetadataCreateRequest): Promise { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling providersSamlImportMetadataCreate().' + ); + } + + if (requestParameters['authorizationFlow'] == null) { + throw new runtime.RequiredError( + 'authorizationFlow', + 'Required parameter "authorizationFlow" was null or undefined when calling providersSamlImportMetadataCreate().' + ); + } + + if (requestParameters['invalidationFlow'] == null) { + throw new runtime.RequiredError( + 'invalidationFlow', + 'Required parameter "invalidationFlow" was null or undefined when calling providersSamlImportMetadataCreate().' + ); + } + + if (requestParameters['file'] == null) { + throw new runtime.RequiredError( + 'file', + 'Required parameter "file" was null or undefined when calling providersSamlImportMetadataCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['name'] != null) { + formParams.append('name', requestParameters['name'] as any); + } + + if (requestParameters['authorizationFlow'] != null) { + formParams.append('authorization_flow', requestParameters['authorizationFlow'] as any); + } + + if (requestParameters['invalidationFlow'] != null) { + formParams.append('invalidation_flow', requestParameters['invalidationFlow'] as any); + } + + if (requestParameters['file'] != null) { + formParams.append('file', requestParameters['file'] as any); + } + + + let urlPath = `/providers/saml/import_metadata/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Create provider from SAML Metadata + */ + async providersSamlImportMetadataCreateRaw(requestParameters: ProvidersSamlImportMetadataCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlImportMetadataCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLProviderFromJSON(jsonValue)); + } + + /** + * Create provider from SAML Metadata + */ + async providersSamlImportMetadataCreate(requestParameters: ProvidersSamlImportMetadataCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlImportMetadataCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlList without sending the request + */ + async providersSamlListRequestOpts(requestParameters: ProvidersSamlListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['acsUrl'] != null) { + queryParameters['acs_url'] = requestParameters['acsUrl']; + } + + if (requestParameters['assertionValidNotBefore'] != null) { + queryParameters['assertion_valid_not_before'] = requestParameters['assertionValidNotBefore']; + } + + if (requestParameters['assertionValidNotOnOrAfter'] != null) { + queryParameters['assertion_valid_not_on_or_after'] = requestParameters['assertionValidNotOnOrAfter']; + } + + if (requestParameters['audience'] != null) { + queryParameters['audience'] = requestParameters['audience']; + } + + if (requestParameters['authenticationFlow'] != null) { + queryParameters['authentication_flow'] = requestParameters['authenticationFlow']; + } + + if (requestParameters['authnContextClassRefMapping'] != null) { + queryParameters['authn_context_class_ref_mapping'] = requestParameters['authnContextClassRefMapping']; + } + + if (requestParameters['authorizationFlow'] != null) { + queryParameters['authorization_flow'] = requestParameters['authorizationFlow']; + } + + if (requestParameters['backchannelApplication'] != null) { + queryParameters['backchannel_application'] = requestParameters['backchannelApplication']; + } + + if (requestParameters['defaultNameIdPolicy'] != null) { + queryParameters['default_name_id_policy'] = requestParameters['defaultNameIdPolicy']; + } + + if (requestParameters['defaultRelayState'] != null) { + queryParameters['default_relay_state'] = requestParameters['defaultRelayState']; + } + + if (requestParameters['digestAlgorithm'] != null) { + queryParameters['digest_algorithm'] = requestParameters['digestAlgorithm']; + } + + if (requestParameters['encryptionKp'] != null) { + queryParameters['encryption_kp'] = requestParameters['encryptionKp']; + } + + if (requestParameters['invalidationFlow'] != null) { + queryParameters['invalidation_flow'] = requestParameters['invalidationFlow']; + } + + if (requestParameters['isBackchannel'] != null) { + queryParameters['is_backchannel'] = requestParameters['isBackchannel']; + } + + if (requestParameters['issuer'] != null) { + queryParameters['issuer'] = requestParameters['issuer']; + } + + if (requestParameters['logoutMethod'] != null) { + queryParameters['logout_method'] = requestParameters['logoutMethod']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['nameIdMapping'] != null) { + queryParameters['name_id_mapping'] = requestParameters['nameIdMapping']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['propertyMappings'] != null) { + queryParameters['property_mappings'] = requestParameters['propertyMappings']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sessionValidNotOnOrAfter'] != null) { + queryParameters['session_valid_not_on_or_after'] = requestParameters['sessionValidNotOnOrAfter']; + } + + if (requestParameters['signAssertion'] != null) { + queryParameters['sign_assertion'] = requestParameters['signAssertion']; + } + + if (requestParameters['signLogoutRequest'] != null) { + queryParameters['sign_logout_request'] = requestParameters['signLogoutRequest']; + } + + if (requestParameters['signLogoutResponse'] != null) { + queryParameters['sign_logout_response'] = requestParameters['signLogoutResponse']; + } + + if (requestParameters['signResponse'] != null) { + queryParameters['sign_response'] = requestParameters['signResponse']; + } + + if (requestParameters['signatureAlgorithm'] != null) { + queryParameters['signature_algorithm'] = requestParameters['signatureAlgorithm']; + } + + if (requestParameters['signingKp'] != null) { + queryParameters['signing_kp'] = requestParameters['signingKp']; + } + + if (requestParameters['slsBinding'] != null) { + queryParameters['sls_binding'] = requestParameters['slsBinding']; + } + + if (requestParameters['slsUrl'] != null) { + queryParameters['sls_url'] = requestParameters['slsUrl']; + } + + if (requestParameters['spBinding'] != null) { + queryParameters['sp_binding'] = requestParameters['spBinding']; + } + + if (requestParameters['verificationKp'] != null) { + queryParameters['verification_kp'] = requestParameters['verificationKp']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLProvider Viewset + */ + async providersSamlListRaw(requestParameters: ProvidersSamlListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSAMLProviderListFromJSON(jsonValue)); + } + + /** + * SAMLProvider Viewset + */ + async providersSamlList(requestParameters: ProvidersSamlListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlMetadataRetrieve without sending the request + */ + async providersSamlMetadataRetrieveRequestOpts(requestParameters: ProvidersSamlMetadataRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlMetadataRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['download'] != null) { + queryParameters['download'] = requestParameters['download']; + } + + if (requestParameters['forceBinding'] != null) { + queryParameters['force_binding'] = requestParameters['forceBinding']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/metadata/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return metadata as XML string + */ + async providersSamlMetadataRetrieveRaw(requestParameters: ProvidersSamlMetadataRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlMetadataRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLMetadataFromJSON(jsonValue)); + } + + /** + * Return metadata as XML string + */ + async providersSamlMetadataRetrieve(requestParameters: ProvidersSamlMetadataRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlMetadataRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlPartialUpdate without sending the request + */ + async providersSamlPartialUpdateRequestOpts(requestParameters: ProvidersSamlPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSAMLProviderRequestToJSON(requestParameters['patchedSAMLProviderRequest']), + }; + } + + /** + * SAMLProvider Viewset + */ + async providersSamlPartialUpdateRaw(requestParameters: ProvidersSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLProviderFromJSON(jsonValue)); + } + + /** + * SAMLProvider Viewset + */ + async providersSamlPartialUpdate(requestParameters: ProvidersSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlPreviewUserRetrieve without sending the request + */ + async providersSamlPreviewUserRetrieveRequestOpts(requestParameters: ProvidersSamlPreviewUserRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlPreviewUserRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['forUser'] != null) { + queryParameters['for_user'] = requestParameters['forUser']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/preview_user/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Preview user data for provider + */ + async providersSamlPreviewUserRetrieveRaw(requestParameters: ProvidersSamlPreviewUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlPreviewUserRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PropertyMappingPreviewFromJSON(jsonValue)); + } + + /** + * Preview user data for provider + */ + async providersSamlPreviewUserRetrieve(requestParameters: ProvidersSamlPreviewUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlPreviewUserRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlRetrieve without sending the request + */ + async providersSamlRetrieveRequestOpts(requestParameters: ProvidersSamlRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLProvider Viewset + */ + async providersSamlRetrieveRaw(requestParameters: ProvidersSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLProviderFromJSON(jsonValue)); + } + + /** + * SAMLProvider Viewset + */ + async providersSamlRetrieve(requestParameters: ProvidersSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlUpdate without sending the request + */ + async providersSamlUpdateRequestOpts(requestParameters: ProvidersSamlUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlUpdate().' + ); + } + + if (requestParameters['sAMLProviderRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLProviderRequest', + 'Required parameter "sAMLProviderRequest" was null or undefined when calling providersSamlUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SAMLProviderRequestToJSON(requestParameters['sAMLProviderRequest']), + }; + } + + /** + * SAMLProvider Viewset + */ + async providersSamlUpdateRaw(requestParameters: ProvidersSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSamlUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLProviderFromJSON(jsonValue)); + } + + /** + * SAMLProvider Viewset + */ + async providersSamlUpdate(requestParameters: ProvidersSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSamlUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSamlUsedByList without sending the request + */ + async providersSamlUsedByListRequestOpts(requestParameters: ProvidersSamlUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSamlUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/saml/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersSamlUsedByListRaw(requestParameters: ProvidersSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersSamlUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersSamlUsedByList(requestParameters: ProvidersSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersSamlUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimCreate without sending the request + */ + async providersScimCreateRequestOpts(requestParameters: ProvidersScimCreateRequest): Promise { + if (requestParameters['sCIMProviderRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMProviderRequest', + 'Required parameter "sCIMProviderRequest" was null or undefined when calling providersScimCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMProviderRequestToJSON(requestParameters['sCIMProviderRequest']), + }; + } + + /** + * SCIMProvider Viewset + */ + async providersScimCreateRaw(requestParameters: ProvidersScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderFromJSON(jsonValue)); + } + + /** + * SCIMProvider Viewset + */ + async providersScimCreate(requestParameters: ProvidersScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimDestroy without sending the request + */ + async providersScimDestroyRequestOpts(requestParameters: ProvidersScimDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProvider Viewset + */ + async providersScimDestroyRaw(requestParameters: ProvidersScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMProvider Viewset + */ + async providersScimDestroy(requestParameters: ProvidersScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersScimDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersScimGroupsCreate without sending the request + */ + async providersScimGroupsCreateRequestOpts(requestParameters: ProvidersScimGroupsCreateRequest): Promise { + if (requestParameters['sCIMProviderGroupRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMProviderGroupRequest', + 'Required parameter "sCIMProviderGroupRequest" was null or undefined when calling providersScimGroupsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_groups/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMProviderGroupRequestToJSON(requestParameters['sCIMProviderGroupRequest']), + }; + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsCreateRaw(requestParameters: ProvidersScimGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimGroupsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderGroupFromJSON(jsonValue)); + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsCreate(requestParameters: ProvidersScimGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimGroupsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimGroupsDestroy without sending the request + */ + async providersScimGroupsDestroyRequestOpts(requestParameters: ProvidersScimGroupsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimGroupsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsDestroyRaw(requestParameters: ProvidersScimGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimGroupsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsDestroy(requestParameters: ProvidersScimGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersScimGroupsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersScimGroupsList without sending the request + */ + async providersScimGroupsListRequestOpts(requestParameters: ProvidersScimGroupsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['groupGroupUuid'] != null) { + queryParameters['group__group_uuid'] = requestParameters['groupGroupUuid']; + } + + if (requestParameters['groupName'] != null) { + queryParameters['group__name'] = requestParameters['groupName']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providerId'] != null) { + queryParameters['provider__id'] = requestParameters['providerId']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_groups/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsListRaw(requestParameters: ProvidersScimGroupsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimGroupsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMProviderGroupListFromJSON(jsonValue)); + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsList(requestParameters: ProvidersScimGroupsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimGroupsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimGroupsRetrieve without sending the request + */ + async providersScimGroupsRetrieveRequestOpts(requestParameters: ProvidersScimGroupsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimGroupsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsRetrieveRaw(requestParameters: ProvidersScimGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimGroupsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderGroupFromJSON(jsonValue)); + } + + /** + * SCIMProviderGroup Viewset + */ + async providersScimGroupsRetrieve(requestParameters: ProvidersScimGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimGroupsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimGroupsUsedByList without sending the request + */ + async providersScimGroupsUsedByListRequestOpts(requestParameters: ProvidersScimGroupsUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimGroupsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_groups/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersScimGroupsUsedByListRaw(requestParameters: ProvidersScimGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersScimGroupsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersScimGroupsUsedByList(requestParameters: ProvidersScimGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersScimGroupsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimList without sending the request + */ + async providersScimListRequestOpts(requestParameters: ProvidersScimListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['excludeUsersServiceAccount'] != null) { + queryParameters['exclude_users_service_account'] = requestParameters['excludeUsersServiceAccount']; + } + + if (requestParameters['groupFilters'] != null) { + queryParameters['group_filters'] = requestParameters['groupFilters']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['url'] != null) { + queryParameters['url'] = requestParameters['url']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProvider Viewset + */ + async providersScimListRaw(requestParameters: ProvidersScimListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMProviderListFromJSON(jsonValue)); + } + + /** + * SCIMProvider Viewset + */ + async providersScimList(requestParameters: ProvidersScimListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimPartialUpdate without sending the request + */ + async providersScimPartialUpdateRequestOpts(requestParameters: ProvidersScimPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSCIMProviderRequestToJSON(requestParameters['patchedSCIMProviderRequest']), + }; + } + + /** + * SCIMProvider Viewset + */ + async providersScimPartialUpdateRaw(requestParameters: ProvidersScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderFromJSON(jsonValue)); + } + + /** + * SCIMProvider Viewset + */ + async providersScimPartialUpdate(requestParameters: ProvidersScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimRetrieve without sending the request + */ + async providersScimRetrieveRequestOpts(requestParameters: ProvidersScimRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProvider Viewset + */ + async providersScimRetrieveRaw(requestParameters: ProvidersScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderFromJSON(jsonValue)); + } + + /** + * SCIMProvider Viewset + */ + async providersScimRetrieve(requestParameters: ProvidersScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimSyncObjectCreate without sending the request + */ + async providersScimSyncObjectCreateRequestOpts(requestParameters: ProvidersScimSyncObjectCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimSyncObjectCreate().' + ); + } + + if (requestParameters['syncObjectRequest'] == null) { + throw new runtime.RequiredError( + 'syncObjectRequest', + 'Required parameter "syncObjectRequest" was null or undefined when calling providersScimSyncObjectCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/sync/object/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SyncObjectRequestToJSON(requestParameters['syncObjectRequest']), + }; + } + + /** + * Sync/Re-sync a single user/group object + */ + async providersScimSyncObjectCreateRaw(requestParameters: ProvidersScimSyncObjectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimSyncObjectCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncObjectResultFromJSON(jsonValue)); + } + + /** + * Sync/Re-sync a single user/group object + */ + async providersScimSyncObjectCreate(requestParameters: ProvidersScimSyncObjectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimSyncObjectCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimSyncStatusRetrieve without sending the request + */ + async providersScimSyncStatusRetrieveRequestOpts(requestParameters: ProvidersScimSyncStatusRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimSyncStatusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/sync/status/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get provider\'s sync status + */ + async providersScimSyncStatusRetrieveRaw(requestParameters: ProvidersScimSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimSyncStatusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncStatusFromJSON(jsonValue)); + } + + /** + * Get provider\'s sync status + */ + async providersScimSyncStatusRetrieve(requestParameters: ProvidersScimSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimSyncStatusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimUpdate without sending the request + */ + async providersScimUpdateRequestOpts(requestParameters: ProvidersScimUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimUpdate().' + ); + } + + if (requestParameters['sCIMProviderRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMProviderRequest', + 'Required parameter "sCIMProviderRequest" was null or undefined when calling providersScimUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SCIMProviderRequestToJSON(requestParameters['sCIMProviderRequest']), + }; + } + + /** + * SCIMProvider Viewset + */ + async providersScimUpdateRaw(requestParameters: ProvidersScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderFromJSON(jsonValue)); + } + + /** + * SCIMProvider Viewset + */ + async providersScimUpdate(requestParameters: ProvidersScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimUsedByList without sending the request + */ + async providersScimUsedByListRequestOpts(requestParameters: ProvidersScimUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersScimUsedByListRaw(requestParameters: ProvidersScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersScimUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersScimUsedByList(requestParameters: ProvidersScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersScimUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimUsersCreate without sending the request + */ + async providersScimUsersCreateRequestOpts(requestParameters: ProvidersScimUsersCreateRequest): Promise { + if (requestParameters['sCIMProviderUserRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMProviderUserRequest', + 'Required parameter "sCIMProviderUserRequest" was null or undefined when calling providersScimUsersCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_users/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMProviderUserRequestToJSON(requestParameters['sCIMProviderUserRequest']), + }; + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersCreateRaw(requestParameters: ProvidersScimUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimUsersCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderUserFromJSON(jsonValue)); + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersCreate(requestParameters: ProvidersScimUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimUsersCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimUsersDestroy without sending the request + */ + async providersScimUsersDestroyRequestOpts(requestParameters: ProvidersScimUsersDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimUsersDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersDestroyRaw(requestParameters: ProvidersScimUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimUsersDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersDestroy(requestParameters: ProvidersScimUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersScimUsersDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersScimUsersList without sending the request + */ + async providersScimUsersListRequestOpts(requestParameters: ProvidersScimUsersListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['providerId'] != null) { + queryParameters['provider__id'] = requestParameters['providerId']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['userId'] != null) { + queryParameters['user__id'] = requestParameters['userId']; + } + + if (requestParameters['userUsername'] != null) { + queryParameters['user__username'] = requestParameters['userUsername']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_users/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersListRaw(requestParameters: ProvidersScimUsersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimUsersListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMProviderUserListFromJSON(jsonValue)); + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersList(requestParameters: ProvidersScimUsersListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimUsersListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimUsersRetrieve without sending the request + */ + async providersScimUsersRetrieveRequestOpts(requestParameters: ProvidersScimUsersRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimUsersRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersRetrieveRaw(requestParameters: ProvidersScimUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersScimUsersRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMProviderUserFromJSON(jsonValue)); + } + + /** + * SCIMProviderUser Viewset + */ + async providersScimUsersRetrieve(requestParameters: ProvidersScimUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersScimUsersRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersScimUsersUsedByList without sending the request + */ + async providersScimUsersUsedByListRequestOpts(requestParameters: ProvidersScimUsersUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersScimUsersUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/scim_users/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersScimUsersUsedByListRaw(requestParameters: ProvidersScimUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersScimUsersUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersScimUsersUsedByList(requestParameters: ProvidersScimUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersScimUsersUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSsfCreate without sending the request + */ + async providersSsfCreateRequestOpts(requestParameters: ProvidersSsfCreateRequest): Promise { + if (requestParameters['sSFProviderRequest'] == null) { + throw new runtime.RequiredError( + 'sSFProviderRequest', + 'Required parameter "sSFProviderRequest" was null or undefined when calling providersSsfCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SSFProviderRequestToJSON(requestParameters['sSFProviderRequest']), + }; + } + + /** + * SSFProvider Viewset + */ + async providersSsfCreateRaw(requestParameters: ProvidersSsfCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSsfCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SSFProviderFromJSON(jsonValue)); + } + + /** + * SSFProvider Viewset + */ + async providersSsfCreate(requestParameters: ProvidersSsfCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSsfCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSsfDestroy without sending the request + */ + async providersSsfDestroyRequestOpts(requestParameters: ProvidersSsfDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSsfDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SSFProvider Viewset + */ + async providersSsfDestroyRaw(requestParameters: ProvidersSsfDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSsfDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SSFProvider Viewset + */ + async providersSsfDestroy(requestParameters: ProvidersSsfDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersSsfDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersSsfList without sending the request + */ + async providersSsfListRequestOpts(requestParameters: ProvidersSsfListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['applicationIsnull'] != null) { + queryParameters['application__isnull'] = requestParameters['applicationIsnull']; + } + + if (requestParameters['nameIexact'] != null) { + queryParameters['name__iexact'] = requestParameters['nameIexact']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SSFProvider Viewset + */ + async providersSsfListRaw(requestParameters: ProvidersSsfListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSsfListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSSFProviderListFromJSON(jsonValue)); + } + + /** + * SSFProvider Viewset + */ + async providersSsfList(requestParameters: ProvidersSsfListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSsfListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSsfPartialUpdate without sending the request + */ + async providersSsfPartialUpdateRequestOpts(requestParameters: ProvidersSsfPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSsfPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSSFProviderRequestToJSON(requestParameters['patchedSSFProviderRequest']), + }; + } + + /** + * SSFProvider Viewset + */ + async providersSsfPartialUpdateRaw(requestParameters: ProvidersSsfPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSsfPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SSFProviderFromJSON(jsonValue)); + } + + /** + * SSFProvider Viewset + */ + async providersSsfPartialUpdate(requestParameters: ProvidersSsfPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSsfPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSsfRetrieve without sending the request + */ + async providersSsfRetrieveRequestOpts(requestParameters: ProvidersSsfRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSsfRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SSFProvider Viewset + */ + async providersSsfRetrieveRaw(requestParameters: ProvidersSsfRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSsfRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SSFProviderFromJSON(jsonValue)); + } + + /** + * SSFProvider Viewset + */ + async providersSsfRetrieve(requestParameters: ProvidersSsfRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSsfRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSsfUpdate without sending the request + */ + async providersSsfUpdateRequestOpts(requestParameters: ProvidersSsfUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSsfUpdate().' + ); + } + + if (requestParameters['sSFProviderRequest'] == null) { + throw new runtime.RequiredError( + 'sSFProviderRequest', + 'Required parameter "sSFProviderRequest" was null or undefined when calling providersSsfUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SSFProviderRequestToJSON(requestParameters['sSFProviderRequest']), + }; + } + + /** + * SSFProvider Viewset + */ + async providersSsfUpdateRaw(requestParameters: ProvidersSsfUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersSsfUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SSFProviderFromJSON(jsonValue)); + } + + /** + * SSFProvider Viewset + */ + async providersSsfUpdate(requestParameters: ProvidersSsfUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersSsfUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersSsfUsedByList without sending the request + */ + async providersSsfUsedByListRequestOpts(requestParameters: ProvidersSsfUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersSsfUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/ssf/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersSsfUsedByListRaw(requestParameters: ProvidersSsfUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersSsfUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersSsfUsedByList(requestParameters: ProvidersSsfUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersSsfUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedCreate without sending the request + */ + async providersWsfedCreateRequestOpts(requestParameters: ProvidersWsfedCreateRequest): Promise { + if (requestParameters['wSFederationProviderRequest'] == null) { + throw new runtime.RequiredError( + 'wSFederationProviderRequest', + 'Required parameter "wSFederationProviderRequest" was null or undefined when calling providersWsfedCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: WSFederationProviderRequestToJSON(requestParameters['wSFederationProviderRequest']), + }; + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedCreateRaw(requestParameters: ProvidersWsfedCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WSFederationProviderFromJSON(jsonValue)); + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedCreate(requestParameters: ProvidersWsfedCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedDestroy without sending the request + */ + async providersWsfedDestroyRequestOpts(requestParameters: ProvidersWsfedDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedDestroyRaw(requestParameters: ProvidersWsfedDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedDestroy(requestParameters: ProvidersWsfedDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.providersWsfedDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for providersWsfedList without sending the request + */ + async providersWsfedListRequestOpts(requestParameters: ProvidersWsfedListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['acsUrl'] != null) { + queryParameters['acs_url'] = requestParameters['acsUrl']; + } + + if (requestParameters['assertionValidNotBefore'] != null) { + queryParameters['assertion_valid_not_before'] = requestParameters['assertionValidNotBefore']; + } + + if (requestParameters['assertionValidNotOnOrAfter'] != null) { + queryParameters['assertion_valid_not_on_or_after'] = requestParameters['assertionValidNotOnOrAfter']; + } + + if (requestParameters['audience'] != null) { + queryParameters['audience'] = requestParameters['audience']; + } + + if (requestParameters['authenticationFlow'] != null) { + queryParameters['authentication_flow'] = requestParameters['authenticationFlow']; + } + + if (requestParameters['authnContextClassRefMapping'] != null) { + queryParameters['authn_context_class_ref_mapping'] = requestParameters['authnContextClassRefMapping']; + } + + if (requestParameters['authorizationFlow'] != null) { + queryParameters['authorization_flow'] = requestParameters['authorizationFlow']; + } + + if (requestParameters['backchannelApplication'] != null) { + queryParameters['backchannel_application'] = requestParameters['backchannelApplication']; + } + + if (requestParameters['defaultNameIdPolicy'] != null) { + queryParameters['default_name_id_policy'] = requestParameters['defaultNameIdPolicy']; + } + + if (requestParameters['defaultRelayState'] != null) { + queryParameters['default_relay_state'] = requestParameters['defaultRelayState']; + } + + if (requestParameters['digestAlgorithm'] != null) { + queryParameters['digest_algorithm'] = requestParameters['digestAlgorithm']; + } + + if (requestParameters['encryptionKp'] != null) { + queryParameters['encryption_kp'] = requestParameters['encryptionKp']; + } + + if (requestParameters['invalidationFlow'] != null) { + queryParameters['invalidation_flow'] = requestParameters['invalidationFlow']; + } + + if (requestParameters['isBackchannel'] != null) { + queryParameters['is_backchannel'] = requestParameters['isBackchannel']; + } + + if (requestParameters['issuer'] != null) { + queryParameters['issuer'] = requestParameters['issuer']; + } + + if (requestParameters['logoutMethod'] != null) { + queryParameters['logout_method'] = requestParameters['logoutMethod']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['nameIdMapping'] != null) { + queryParameters['name_id_mapping'] = requestParameters['nameIdMapping']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['propertyMappings'] != null) { + queryParameters['property_mappings'] = requestParameters['propertyMappings']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sessionValidNotOnOrAfter'] != null) { + queryParameters['session_valid_not_on_or_after'] = requestParameters['sessionValidNotOnOrAfter']; + } + + if (requestParameters['signAssertion'] != null) { + queryParameters['sign_assertion'] = requestParameters['signAssertion']; + } + + if (requestParameters['signLogoutRequest'] != null) { + queryParameters['sign_logout_request'] = requestParameters['signLogoutRequest']; + } + + if (requestParameters['signLogoutResponse'] != null) { + queryParameters['sign_logout_response'] = requestParameters['signLogoutResponse']; + } + + if (requestParameters['signResponse'] != null) { + queryParameters['sign_response'] = requestParameters['signResponse']; + } + + if (requestParameters['signatureAlgorithm'] != null) { + queryParameters['signature_algorithm'] = requestParameters['signatureAlgorithm']; + } + + if (requestParameters['signingKp'] != null) { + queryParameters['signing_kp'] = requestParameters['signingKp']; + } + + if (requestParameters['slsBinding'] != null) { + queryParameters['sls_binding'] = requestParameters['slsBinding']; + } + + if (requestParameters['slsUrl'] != null) { + queryParameters['sls_url'] = requestParameters['slsUrl']; + } + + if (requestParameters['spBinding'] != null) { + queryParameters['sp_binding'] = requestParameters['spBinding']; + } + + if (requestParameters['verificationKp'] != null) { + queryParameters['verification_kp'] = requestParameters['verificationKp']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedListRaw(requestParameters: ProvidersWsfedListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedWSFederationProviderListFromJSON(jsonValue)); + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedList(requestParameters: ProvidersWsfedListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedMetadataRetrieve without sending the request + */ + async providersWsfedMetadataRetrieveRequestOpts(requestParameters: ProvidersWsfedMetadataRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedMetadataRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['download'] != null) { + queryParameters['download'] = requestParameters['download']; + } + + if (requestParameters['forceBinding'] != null) { + queryParameters['force_binding'] = requestParameters['forceBinding']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/metadata/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return metadata as XML string + */ + async providersWsfedMetadataRetrieveRaw(requestParameters: ProvidersWsfedMetadataRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedMetadataRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLMetadataFromJSON(jsonValue)); + } + + /** + * Return metadata as XML string + */ + async providersWsfedMetadataRetrieve(requestParameters: ProvidersWsfedMetadataRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedMetadataRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedPartialUpdate without sending the request + */ + async providersWsfedPartialUpdateRequestOpts(requestParameters: ProvidersWsfedPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedWSFederationProviderRequestToJSON(requestParameters['patchedWSFederationProviderRequest']), + }; + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedPartialUpdateRaw(requestParameters: ProvidersWsfedPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WSFederationProviderFromJSON(jsonValue)); + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedPartialUpdate(requestParameters: ProvidersWsfedPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedPreviewUserRetrieve without sending the request + */ + async providersWsfedPreviewUserRetrieveRequestOpts(requestParameters: ProvidersWsfedPreviewUserRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedPreviewUserRetrieve().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['forUser'] != null) { + queryParameters['for_user'] = requestParameters['forUser']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/preview_user/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Preview user data for provider + */ + async providersWsfedPreviewUserRetrieveRaw(requestParameters: ProvidersWsfedPreviewUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedPreviewUserRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PropertyMappingPreviewFromJSON(jsonValue)); + } + + /** + * Preview user data for provider + */ + async providersWsfedPreviewUserRetrieve(requestParameters: ProvidersWsfedPreviewUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedPreviewUserRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedRetrieve without sending the request + */ + async providersWsfedRetrieveRequestOpts(requestParameters: ProvidersWsfedRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedRetrieveRaw(requestParameters: ProvidersWsfedRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WSFederationProviderFromJSON(jsonValue)); + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedRetrieve(requestParameters: ProvidersWsfedRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedUpdate without sending the request + */ + async providersWsfedUpdateRequestOpts(requestParameters: ProvidersWsfedUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedUpdate().' + ); + } + + if (requestParameters['wSFederationProviderRequest'] == null) { + throw new runtime.RequiredError( + 'wSFederationProviderRequest', + 'Required parameter "wSFederationProviderRequest" was null or undefined when calling providersWsfedUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: WSFederationProviderRequestToJSON(requestParameters['wSFederationProviderRequest']), + }; + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedUpdateRaw(requestParameters: ProvidersWsfedUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.providersWsfedUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WSFederationProviderFromJSON(jsonValue)); + } + + /** + * WSFederationProvider Viewset + */ + async providersWsfedUpdate(requestParameters: ProvidersWsfedUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.providersWsfedUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for providersWsfedUsedByList without sending the request + */ + async providersWsfedUsedByListRequestOpts(requestParameters: ProvidersWsfedUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling providersWsfedUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/providers/wsfed/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async providersWsfedUsedByListRaw(requestParameters: ProvidersWsfedUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.providersWsfedUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async providersWsfedUsedByList(requestParameters: ProvidersWsfedUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.providersWsfedUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const ProvidersOauth2ListClientTypeEnum = { + Confidential: 'confidential', + Public: 'public', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersOauth2ListClientTypeEnum = typeof ProvidersOauth2ListClientTypeEnum[keyof typeof ProvidersOauth2ListClientTypeEnum]; +/** + * @export + */ +export const ProvidersOauth2ListIssuerModeEnum = { + Global: 'global', + PerProvider: 'per_provider', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersOauth2ListIssuerModeEnum = typeof ProvidersOauth2ListIssuerModeEnum[keyof typeof ProvidersOauth2ListIssuerModeEnum]; +/** + * @export + */ +export const ProvidersOauth2ListSubModeEnum = { + HashedUserId: 'hashed_user_id', + UserEmail: 'user_email', + UserId: 'user_id', + UserUpn: 'user_upn', + UserUsername: 'user_username', + UserUuid: 'user_uuid', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersOauth2ListSubModeEnum = typeof ProvidersOauth2ListSubModeEnum[keyof typeof ProvidersOauth2ListSubModeEnum]; +/** + * @export + */ +export const ProvidersSamlListDefaultNameIdPolicyEnum = { + UrnOasisNamesTcSaml11NameidFormatX509SubjectName: 'urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName', + UrnOasisNamesTcSaml11NameidFormatEmailAddress: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', + UrnOasisNamesTcSaml11NameidFormatUnspecified: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', + UrnOasisNamesTcSaml20NameidFormatWindowsDomainQualifiedName: 'urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName', + UrnOasisNamesTcSaml20NameidFormatPersistent: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', + UrnOasisNamesTcSaml20NameidFormatTransient: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlListDefaultNameIdPolicyEnum = typeof ProvidersSamlListDefaultNameIdPolicyEnum[keyof typeof ProvidersSamlListDefaultNameIdPolicyEnum]; +/** + * @export + */ +export const ProvidersSamlListDigestAlgorithmEnum = { + HttpWwwW3Org200009Xmldsigsha1: 'http://www.w3.org/2000/09/xmldsig#sha1', + HttpWwwW3Org200104XmldsigMoresha384: 'http://www.w3.org/2001/04/xmldsig-more#sha384', + HttpWwwW3Org200104Xmlencsha256: 'http://www.w3.org/2001/04/xmlenc#sha256', + HttpWwwW3Org200104Xmlencsha512: 'http://www.w3.org/2001/04/xmlenc#sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlListDigestAlgorithmEnum = typeof ProvidersSamlListDigestAlgorithmEnum[keyof typeof ProvidersSamlListDigestAlgorithmEnum]; +/** + * @export + */ +export const ProvidersSamlListLogoutMethodEnum = { + Backchannel: 'backchannel', + FrontchannelIframe: 'frontchannel_iframe', + FrontchannelNative: 'frontchannel_native', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlListLogoutMethodEnum = typeof ProvidersSamlListLogoutMethodEnum[keyof typeof ProvidersSamlListLogoutMethodEnum]; +/** + * @export + */ +export const ProvidersSamlListSignatureAlgorithmEnum = { + HttpWwwW3Org200009XmldsigdsaSha1: 'http://www.w3.org/2000/09/xmldsig#dsa-sha1', + HttpWwwW3Org200009XmldsigrsaSha1: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha1: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha256: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256', + HttpWwwW3Org200104XmldsigMoreecdsaSha384: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384', + HttpWwwW3Org200104XmldsigMoreecdsaSha512: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512', + HttpWwwW3Org200104XmldsigMorersaSha256: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', + HttpWwwW3Org200104XmldsigMorersaSha384: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384', + HttpWwwW3Org200104XmldsigMorersaSha512: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlListSignatureAlgorithmEnum = typeof ProvidersSamlListSignatureAlgorithmEnum[keyof typeof ProvidersSamlListSignatureAlgorithmEnum]; +/** + * @export + */ +export const ProvidersSamlListSlsBindingEnum = { + Post: 'post', + Redirect: 'redirect', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlListSlsBindingEnum = typeof ProvidersSamlListSlsBindingEnum[keyof typeof ProvidersSamlListSlsBindingEnum]; +/** + * @export + */ +export const ProvidersSamlListSpBindingEnum = { + Post: 'post', + Redirect: 'redirect', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlListSpBindingEnum = typeof ProvidersSamlListSpBindingEnum[keyof typeof ProvidersSamlListSpBindingEnum]; +/** + * @export + */ +export const ProvidersSamlMetadataRetrieveForceBindingEnum = { + UrnOasisNamesTcSaml20BindingsHttpPost: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', + UrnOasisNamesTcSaml20BindingsHttpRedirect: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersSamlMetadataRetrieveForceBindingEnum = typeof ProvidersSamlMetadataRetrieveForceBindingEnum[keyof typeof ProvidersSamlMetadataRetrieveForceBindingEnum]; +/** + * @export + */ +export const ProvidersWsfedListDefaultNameIdPolicyEnum = { + UrnOasisNamesTcSaml11NameidFormatX509SubjectName: 'urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName', + UrnOasisNamesTcSaml11NameidFormatEmailAddress: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', + UrnOasisNamesTcSaml11NameidFormatUnspecified: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', + UrnOasisNamesTcSaml20NameidFormatWindowsDomainQualifiedName: 'urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName', + UrnOasisNamesTcSaml20NameidFormatPersistent: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', + UrnOasisNamesTcSaml20NameidFormatTransient: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedListDefaultNameIdPolicyEnum = typeof ProvidersWsfedListDefaultNameIdPolicyEnum[keyof typeof ProvidersWsfedListDefaultNameIdPolicyEnum]; +/** + * @export + */ +export const ProvidersWsfedListDigestAlgorithmEnum = { + HttpWwwW3Org200009Xmldsigsha1: 'http://www.w3.org/2000/09/xmldsig#sha1', + HttpWwwW3Org200104XmldsigMoresha384: 'http://www.w3.org/2001/04/xmldsig-more#sha384', + HttpWwwW3Org200104Xmlencsha256: 'http://www.w3.org/2001/04/xmlenc#sha256', + HttpWwwW3Org200104Xmlencsha512: 'http://www.w3.org/2001/04/xmlenc#sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedListDigestAlgorithmEnum = typeof ProvidersWsfedListDigestAlgorithmEnum[keyof typeof ProvidersWsfedListDigestAlgorithmEnum]; +/** + * @export + */ +export const ProvidersWsfedListLogoutMethodEnum = { + Backchannel: 'backchannel', + FrontchannelIframe: 'frontchannel_iframe', + FrontchannelNative: 'frontchannel_native', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedListLogoutMethodEnum = typeof ProvidersWsfedListLogoutMethodEnum[keyof typeof ProvidersWsfedListLogoutMethodEnum]; +/** + * @export + */ +export const ProvidersWsfedListSignatureAlgorithmEnum = { + HttpWwwW3Org200009XmldsigdsaSha1: 'http://www.w3.org/2000/09/xmldsig#dsa-sha1', + HttpWwwW3Org200009XmldsigrsaSha1: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha1: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha256: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256', + HttpWwwW3Org200104XmldsigMoreecdsaSha384: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384', + HttpWwwW3Org200104XmldsigMoreecdsaSha512: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512', + HttpWwwW3Org200104XmldsigMorersaSha256: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', + HttpWwwW3Org200104XmldsigMorersaSha384: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384', + HttpWwwW3Org200104XmldsigMorersaSha512: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedListSignatureAlgorithmEnum = typeof ProvidersWsfedListSignatureAlgorithmEnum[keyof typeof ProvidersWsfedListSignatureAlgorithmEnum]; +/** + * @export + */ +export const ProvidersWsfedListSlsBindingEnum = { + Post: 'post', + Redirect: 'redirect', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedListSlsBindingEnum = typeof ProvidersWsfedListSlsBindingEnum[keyof typeof ProvidersWsfedListSlsBindingEnum]; +/** + * @export + */ +export const ProvidersWsfedListSpBindingEnum = { + Post: 'post', + Redirect: 'redirect', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedListSpBindingEnum = typeof ProvidersWsfedListSpBindingEnum[keyof typeof ProvidersWsfedListSpBindingEnum]; +/** + * @export + */ +export const ProvidersWsfedMetadataRetrieveForceBindingEnum = { + UrnOasisNamesTcSaml20BindingsHttpPost: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', + UrnOasisNamesTcSaml20BindingsHttpRedirect: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProvidersWsfedMetadataRetrieveForceBindingEnum = typeof ProvidersWsfedMetadataRetrieveForceBindingEnum[keyof typeof ProvidersWsfedMetadataRetrieveForceBindingEnum]; diff --git a/packages/client-ts/src/apis/RacApi.ts b/packages/client-ts/src/apis/RacApi.ts new file mode 100644 index 0000000000..2b7b9fa935 --- /dev/null +++ b/packages/client-ts/src/apis/RacApi.ts @@ -0,0 +1,883 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ConnectionToken, + ConnectionTokenRequest, + Endpoint, + EndpointRequest, + GenericError, + PaginatedConnectionTokenList, + PaginatedEndpointList, + PatchedConnectionTokenRequest, + PatchedEndpointRequest, + UsedBy, + ValidationError, +} from '../models/index'; +import { + ConnectionTokenFromJSON, + ConnectionTokenToJSON, + ConnectionTokenRequestFromJSON, + ConnectionTokenRequestToJSON, + EndpointFromJSON, + EndpointToJSON, + EndpointRequestFromJSON, + EndpointRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedConnectionTokenListFromJSON, + PaginatedConnectionTokenListToJSON, + PaginatedEndpointListFromJSON, + PaginatedEndpointListToJSON, + PatchedConnectionTokenRequestFromJSON, + PatchedConnectionTokenRequestToJSON, + PatchedEndpointRequestFromJSON, + PatchedEndpointRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface RacConnectionTokensDestroyRequest { + connectionTokenUuid: string; +} + +export interface RacConnectionTokensListRequest { + endpoint?: string; + ordering?: string; + page?: number; + pageSize?: number; + provider?: number; + search?: string; + sessionUser?: number; +} + +export interface RacConnectionTokensPartialUpdateRequest { + connectionTokenUuid: string; + patchedConnectionTokenRequest?: PatchedConnectionTokenRequest; +} + +export interface RacConnectionTokensRetrieveRequest { + connectionTokenUuid: string; +} + +export interface RacConnectionTokensUpdateRequest { + connectionTokenUuid: string; + connectionTokenRequest: ConnectionTokenRequest; +} + +export interface RacConnectionTokensUsedByListRequest { + connectionTokenUuid: string; +} + +export interface RacEndpointsCreateRequest { + endpointRequest: EndpointRequest; +} + +export interface RacEndpointsDestroyRequest { + pbmUuid: string; +} + +export interface RacEndpointsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + provider?: number; + search?: string; + superuserFullList?: boolean; +} + +export interface RacEndpointsPartialUpdateRequest { + pbmUuid: string; + patchedEndpointRequest?: PatchedEndpointRequest; +} + +export interface RacEndpointsRetrieveRequest { + pbmUuid: string; +} + +export interface RacEndpointsUpdateRequest { + pbmUuid: string; + endpointRequest: EndpointRequest; +} + +export interface RacEndpointsUsedByListRequest { + pbmUuid: string; +} + +/** + * + */ +export class RacApi extends runtime.BaseAPI { + + /** + * Creates request options for racConnectionTokensDestroy without sending the request + */ + async racConnectionTokensDestroyRequestOpts(requestParameters: RacConnectionTokensDestroyRequest): Promise { + if (requestParameters['connectionTokenUuid'] == null) { + throw new runtime.RequiredError( + 'connectionTokenUuid', + 'Required parameter "connectionTokenUuid" was null or undefined when calling racConnectionTokensDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/connection_tokens/{connection_token_uuid}/`; + urlPath = urlPath.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters['connectionTokenUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensDestroyRaw(requestParameters: RacConnectionTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racConnectionTokensDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensDestroy(requestParameters: RacConnectionTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.racConnectionTokensDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for racConnectionTokensList without sending the request + */ + async racConnectionTokensListRequestOpts(requestParameters: RacConnectionTokensListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['endpoint'] != null) { + queryParameters['endpoint'] = requestParameters['endpoint']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sessionUser'] != null) { + queryParameters['session__user'] = requestParameters['sessionUser']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/connection_tokens/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensListRaw(requestParameters: RacConnectionTokensListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racConnectionTokensListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedConnectionTokenListFromJSON(jsonValue)); + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensList(requestParameters: RacConnectionTokensListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racConnectionTokensListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racConnectionTokensPartialUpdate without sending the request + */ + async racConnectionTokensPartialUpdateRequestOpts(requestParameters: RacConnectionTokensPartialUpdateRequest): Promise { + if (requestParameters['connectionTokenUuid'] == null) { + throw new runtime.RequiredError( + 'connectionTokenUuid', + 'Required parameter "connectionTokenUuid" was null or undefined when calling racConnectionTokensPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/connection_tokens/{connection_token_uuid}/`; + urlPath = urlPath.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters['connectionTokenUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedConnectionTokenRequestToJSON(requestParameters['patchedConnectionTokenRequest']), + }; + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensPartialUpdateRaw(requestParameters: RacConnectionTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racConnectionTokensPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionTokenFromJSON(jsonValue)); + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensPartialUpdate(requestParameters: RacConnectionTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racConnectionTokensPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racConnectionTokensRetrieve without sending the request + */ + async racConnectionTokensRetrieveRequestOpts(requestParameters: RacConnectionTokensRetrieveRequest): Promise { + if (requestParameters['connectionTokenUuid'] == null) { + throw new runtime.RequiredError( + 'connectionTokenUuid', + 'Required parameter "connectionTokenUuid" was null or undefined when calling racConnectionTokensRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/connection_tokens/{connection_token_uuid}/`; + urlPath = urlPath.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters['connectionTokenUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensRetrieveRaw(requestParameters: RacConnectionTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racConnectionTokensRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionTokenFromJSON(jsonValue)); + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensRetrieve(requestParameters: RacConnectionTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racConnectionTokensRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racConnectionTokensUpdate without sending the request + */ + async racConnectionTokensUpdateRequestOpts(requestParameters: RacConnectionTokensUpdateRequest): Promise { + if (requestParameters['connectionTokenUuid'] == null) { + throw new runtime.RequiredError( + 'connectionTokenUuid', + 'Required parameter "connectionTokenUuid" was null or undefined when calling racConnectionTokensUpdate().' + ); + } + + if (requestParameters['connectionTokenRequest'] == null) { + throw new runtime.RequiredError( + 'connectionTokenRequest', + 'Required parameter "connectionTokenRequest" was null or undefined when calling racConnectionTokensUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/connection_tokens/{connection_token_uuid}/`; + urlPath = urlPath.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters['connectionTokenUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ConnectionTokenRequestToJSON(requestParameters['connectionTokenRequest']), + }; + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensUpdateRaw(requestParameters: RacConnectionTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racConnectionTokensUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionTokenFromJSON(jsonValue)); + } + + /** + * ConnectionToken Viewset + */ + async racConnectionTokensUpdate(requestParameters: RacConnectionTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racConnectionTokensUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racConnectionTokensUsedByList without sending the request + */ + async racConnectionTokensUsedByListRequestOpts(requestParameters: RacConnectionTokensUsedByListRequest): Promise { + if (requestParameters['connectionTokenUuid'] == null) { + throw new runtime.RequiredError( + 'connectionTokenUuid', + 'Required parameter "connectionTokenUuid" was null or undefined when calling racConnectionTokensUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/connection_tokens/{connection_token_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters['connectionTokenUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async racConnectionTokensUsedByListRaw(requestParameters: RacConnectionTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.racConnectionTokensUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async racConnectionTokensUsedByList(requestParameters: RacConnectionTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.racConnectionTokensUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racEndpointsCreate without sending the request + */ + async racEndpointsCreateRequestOpts(requestParameters: RacEndpointsCreateRequest): Promise { + if (requestParameters['endpointRequest'] == null) { + throw new runtime.RequiredError( + 'endpointRequest', + 'Required parameter "endpointRequest" was null or undefined when calling racEndpointsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EndpointRequestToJSON(requestParameters['endpointRequest']), + }; + } + + /** + * Endpoint Viewset + */ + async racEndpointsCreateRaw(requestParameters: RacEndpointsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racEndpointsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointFromJSON(jsonValue)); + } + + /** + * Endpoint Viewset + */ + async racEndpointsCreate(requestParameters: RacEndpointsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racEndpointsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racEndpointsDestroy without sending the request + */ + async racEndpointsDestroyRequestOpts(requestParameters: RacEndpointsDestroyRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling racEndpointsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Endpoint Viewset + */ + async racEndpointsDestroyRaw(requestParameters: RacEndpointsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racEndpointsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Endpoint Viewset + */ + async racEndpointsDestroy(requestParameters: RacEndpointsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.racEndpointsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for racEndpointsList without sending the request + */ + async racEndpointsListRequestOpts(requestParameters: RacEndpointsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['superuserFullList'] != null) { + queryParameters['superuser_full_list'] = requestParameters['superuserFullList']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List accessible endpoints + */ + async racEndpointsListRaw(requestParameters: RacEndpointsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racEndpointsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEndpointListFromJSON(jsonValue)); + } + + /** + * List accessible endpoints + */ + async racEndpointsList(requestParameters: RacEndpointsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racEndpointsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racEndpointsPartialUpdate without sending the request + */ + async racEndpointsPartialUpdateRequestOpts(requestParameters: RacEndpointsPartialUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling racEndpointsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEndpointRequestToJSON(requestParameters['patchedEndpointRequest']), + }; + } + + /** + * Endpoint Viewset + */ + async racEndpointsPartialUpdateRaw(requestParameters: RacEndpointsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racEndpointsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointFromJSON(jsonValue)); + } + + /** + * Endpoint Viewset + */ + async racEndpointsPartialUpdate(requestParameters: RacEndpointsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racEndpointsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racEndpointsRetrieve without sending the request + */ + async racEndpointsRetrieveRequestOpts(requestParameters: RacEndpointsRetrieveRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling racEndpointsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Endpoint Viewset + */ + async racEndpointsRetrieveRaw(requestParameters: RacEndpointsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racEndpointsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointFromJSON(jsonValue)); + } + + /** + * Endpoint Viewset + */ + async racEndpointsRetrieve(requestParameters: RacEndpointsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racEndpointsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racEndpointsUpdate without sending the request + */ + async racEndpointsUpdateRequestOpts(requestParameters: RacEndpointsUpdateRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling racEndpointsUpdate().' + ); + } + + if (requestParameters['endpointRequest'] == null) { + throw new runtime.RequiredError( + 'endpointRequest', + 'Required parameter "endpointRequest" was null or undefined when calling racEndpointsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/{pbm_uuid}/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EndpointRequestToJSON(requestParameters['endpointRequest']), + }; + } + + /** + * Endpoint Viewset + */ + async racEndpointsUpdateRaw(requestParameters: RacEndpointsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.racEndpointsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointFromJSON(jsonValue)); + } + + /** + * Endpoint Viewset + */ + async racEndpointsUpdate(requestParameters: RacEndpointsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.racEndpointsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for racEndpointsUsedByList without sending the request + */ + async racEndpointsUsedByListRequestOpts(requestParameters: RacEndpointsUsedByListRequest): Promise { + if (requestParameters['pbmUuid'] == null) { + throw new runtime.RequiredError( + 'pbmUuid', + 'Required parameter "pbmUuid" was null or undefined when calling racEndpointsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rac/endpoints/{pbm_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters['pbmUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async racEndpointsUsedByListRaw(requestParameters: RacEndpointsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.racEndpointsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async racEndpointsUsedByList(requestParameters: RacEndpointsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.racEndpointsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/RbacApi.ts b/packages/client-ts/src/apis/RbacApi.ts new file mode 100644 index 0000000000..b00950fed2 --- /dev/null +++ b/packages/client-ts/src/apis/RbacApi.ts @@ -0,0 +1,1665 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + InitialPermissions, + InitialPermissionsRequest, + PaginatedExtraRoleObjectPermissionList, + PaginatedInitialPermissionsList, + PaginatedPermissionList, + PaginatedRoleAssignedObjectPermissionList, + PaginatedRoleList, + PatchedInitialPermissionsRequest, + PatchedPermissionAssignRequest, + PatchedRoleRequest, + Permission, + PermissionAssignRequest, + PermissionAssignResult, + Role, + RoleRequest, + UsedBy, + UserAccountSerializerForRoleRequest, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + InitialPermissionsFromJSON, + InitialPermissionsToJSON, + InitialPermissionsRequestFromJSON, + InitialPermissionsRequestToJSON, + PaginatedExtraRoleObjectPermissionListFromJSON, + PaginatedExtraRoleObjectPermissionListToJSON, + PaginatedInitialPermissionsListFromJSON, + PaginatedInitialPermissionsListToJSON, + PaginatedPermissionListFromJSON, + PaginatedPermissionListToJSON, + PaginatedRoleAssignedObjectPermissionListFromJSON, + PaginatedRoleAssignedObjectPermissionListToJSON, + PaginatedRoleListFromJSON, + PaginatedRoleListToJSON, + PatchedInitialPermissionsRequestFromJSON, + PatchedInitialPermissionsRequestToJSON, + PatchedPermissionAssignRequestFromJSON, + PatchedPermissionAssignRequestToJSON, + PatchedRoleRequestFromJSON, + PatchedRoleRequestToJSON, + PermissionFromJSON, + PermissionToJSON, + PermissionAssignRequestFromJSON, + PermissionAssignRequestToJSON, + PermissionAssignResultFromJSON, + PermissionAssignResultToJSON, + RoleFromJSON, + RoleToJSON, + RoleRequestFromJSON, + RoleRequestToJSON, + UsedByFromJSON, + UsedByToJSON, + UserAccountSerializerForRoleRequestFromJSON, + UserAccountSerializerForRoleRequestToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface RbacInitialPermissionsCreateRequest { + initialPermissionsRequest: InitialPermissionsRequest; +} + +export interface RbacInitialPermissionsDestroyRequest { + id: number; +} + +export interface RbacInitialPermissionsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface RbacInitialPermissionsPartialUpdateRequest { + id: number; + patchedInitialPermissionsRequest?: PatchedInitialPermissionsRequest; +} + +export interface RbacInitialPermissionsRetrieveRequest { + id: number; +} + +export interface RbacInitialPermissionsUpdateRequest { + id: number; + initialPermissionsRequest: InitialPermissionsRequest; +} + +export interface RbacInitialPermissionsUsedByListRequest { + id: number; +} + +export interface RbacPermissionsAssignedByRolesAssignRequest { + uuid: string; + permissionAssignRequest: PermissionAssignRequest; +} + +export interface RbacPermissionsAssignedByRolesListRequest { + model: RbacPermissionsAssignedByRolesListModelEnum; + objectPk?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface RbacPermissionsAssignedByRolesUnassignPartialUpdateRequest { + uuid: string; + patchedPermissionAssignRequest?: PatchedPermissionAssignRequest; +} + +export interface RbacPermissionsListRequest { + codename?: string; + contentTypeAppLabel?: string; + contentTypeModel?: string; + ordering?: string; + page?: number; + pageSize?: number; + role?: string; + search?: string; +} + +export interface RbacPermissionsRetrieveRequest { + id: number; +} + +export interface RbacPermissionsRolesListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + uuid?: string; +} + +export interface RbacRolesAddUserCreateRequest { + uuid: string; + userAccountSerializerForRoleRequest: UserAccountSerializerForRoleRequest; +} + +export interface RbacRolesCreateRequest { + roleRequest: RoleRequest; +} + +export interface RbacRolesDestroyRequest { + uuid: string; +} + +export interface RbacRolesListRequest { + groups?: string; + inherited?: boolean; + managed?: Array; + managedIsnull?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + users?: number; +} + +export interface RbacRolesPartialUpdateRequest { + uuid: string; + patchedRoleRequest?: PatchedRoleRequest; +} + +export interface RbacRolesRemoveUserCreateRequest { + uuid: string; + userAccountSerializerForRoleRequest: UserAccountSerializerForRoleRequest; +} + +export interface RbacRolesRetrieveRequest { + uuid: string; +} + +export interface RbacRolesUpdateRequest { + uuid: string; + roleRequest: RoleRequest; +} + +export interface RbacRolesUsedByListRequest { + uuid: string; +} + +/** + * + */ +export class RbacApi extends runtime.BaseAPI { + + /** + * Creates request options for rbacInitialPermissionsCreate without sending the request + */ + async rbacInitialPermissionsCreateRequestOpts(requestParameters: RbacInitialPermissionsCreateRequest): Promise { + if (requestParameters['initialPermissionsRequest'] == null) { + throw new runtime.RequiredError( + 'initialPermissionsRequest', + 'Required parameter "initialPermissionsRequest" was null or undefined when calling rbacInitialPermissionsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: InitialPermissionsRequestToJSON(requestParameters['initialPermissionsRequest']), + }; + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsCreateRaw(requestParameters: RbacInitialPermissionsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacInitialPermissionsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InitialPermissionsFromJSON(jsonValue)); + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsCreate(requestParameters: RbacInitialPermissionsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacInitialPermissionsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacInitialPermissionsDestroy without sending the request + */ + async rbacInitialPermissionsDestroyRequestOpts(requestParameters: RbacInitialPermissionsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling rbacInitialPermissionsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsDestroyRaw(requestParameters: RbacInitialPermissionsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacInitialPermissionsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsDestroy(requestParameters: RbacInitialPermissionsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rbacInitialPermissionsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for rbacInitialPermissionsList without sending the request + */ + async rbacInitialPermissionsListRequestOpts(requestParameters: RbacInitialPermissionsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsListRaw(requestParameters: RbacInitialPermissionsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacInitialPermissionsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedInitialPermissionsListFromJSON(jsonValue)); + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsList(requestParameters: RbacInitialPermissionsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacInitialPermissionsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacInitialPermissionsPartialUpdate without sending the request + */ + async rbacInitialPermissionsPartialUpdateRequestOpts(requestParameters: RbacInitialPermissionsPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling rbacInitialPermissionsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedInitialPermissionsRequestToJSON(requestParameters['patchedInitialPermissionsRequest']), + }; + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsPartialUpdateRaw(requestParameters: RbacInitialPermissionsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacInitialPermissionsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InitialPermissionsFromJSON(jsonValue)); + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsPartialUpdate(requestParameters: RbacInitialPermissionsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacInitialPermissionsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacInitialPermissionsRetrieve without sending the request + */ + async rbacInitialPermissionsRetrieveRequestOpts(requestParameters: RbacInitialPermissionsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling rbacInitialPermissionsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsRetrieveRaw(requestParameters: RbacInitialPermissionsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacInitialPermissionsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InitialPermissionsFromJSON(jsonValue)); + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsRetrieve(requestParameters: RbacInitialPermissionsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacInitialPermissionsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacInitialPermissionsUpdate without sending the request + */ + async rbacInitialPermissionsUpdateRequestOpts(requestParameters: RbacInitialPermissionsUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling rbacInitialPermissionsUpdate().' + ); + } + + if (requestParameters['initialPermissionsRequest'] == null) { + throw new runtime.RequiredError( + 'initialPermissionsRequest', + 'Required parameter "initialPermissionsRequest" was null or undefined when calling rbacInitialPermissionsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: InitialPermissionsRequestToJSON(requestParameters['initialPermissionsRequest']), + }; + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsUpdateRaw(requestParameters: RbacInitialPermissionsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacInitialPermissionsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InitialPermissionsFromJSON(jsonValue)); + } + + /** + * InitialPermissions viewset + */ + async rbacInitialPermissionsUpdate(requestParameters: RbacInitialPermissionsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacInitialPermissionsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacInitialPermissionsUsedByList without sending the request + */ + async rbacInitialPermissionsUsedByListRequestOpts(requestParameters: RbacInitialPermissionsUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling rbacInitialPermissionsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/initial_permissions/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async rbacInitialPermissionsUsedByListRaw(requestParameters: RbacInitialPermissionsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.rbacInitialPermissionsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async rbacInitialPermissionsUsedByList(requestParameters: RbacInitialPermissionsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.rbacInitialPermissionsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacPermissionsAssignedByRolesAssign without sending the request + */ + async rbacPermissionsAssignedByRolesAssignRequestOpts(requestParameters: RbacPermissionsAssignedByRolesAssignRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacPermissionsAssignedByRolesAssign().' + ); + } + + if (requestParameters['permissionAssignRequest'] == null) { + throw new runtime.RequiredError( + 'permissionAssignRequest', + 'Required parameter "permissionAssignRequest" was null or undefined when calling rbacPermissionsAssignedByRolesAssign().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/permissions/assigned_by_roles/{uuid}/assign/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PermissionAssignRequestToJSON(requestParameters['permissionAssignRequest']), + }; + } + + /** + * Assign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + */ + async rbacPermissionsAssignedByRolesAssignRaw(requestParameters: RbacPermissionsAssignedByRolesAssignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.rbacPermissionsAssignedByRolesAssignRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PermissionAssignResultFromJSON)); + } + + /** + * Assign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + */ + async rbacPermissionsAssignedByRolesAssign(requestParameters: RbacPermissionsAssignedByRolesAssignRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.rbacPermissionsAssignedByRolesAssignRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacPermissionsAssignedByRolesList without sending the request + */ + async rbacPermissionsAssignedByRolesListRequestOpts(requestParameters: RbacPermissionsAssignedByRolesListRequest): Promise { + if (requestParameters['model'] == null) { + throw new runtime.RequiredError( + 'model', + 'Required parameter "model" was null or undefined when calling rbacPermissionsAssignedByRolesList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['model'] != null) { + queryParameters['model'] = requestParameters['model']; + } + + if (requestParameters['objectPk'] != null) { + queryParameters['object_pk'] = requestParameters['objectPk']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/permissions/assigned_by_roles/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get assigned object permissions for a single object + */ + async rbacPermissionsAssignedByRolesListRaw(requestParameters: RbacPermissionsAssignedByRolesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacPermissionsAssignedByRolesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRoleAssignedObjectPermissionListFromJSON(jsonValue)); + } + + /** + * Get assigned object permissions for a single object + */ + async rbacPermissionsAssignedByRolesList(requestParameters: RbacPermissionsAssignedByRolesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacPermissionsAssignedByRolesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacPermissionsAssignedByRolesUnassignPartialUpdate without sending the request + */ + async rbacPermissionsAssignedByRolesUnassignPartialUpdateRequestOpts(requestParameters: RbacPermissionsAssignedByRolesUnassignPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacPermissionsAssignedByRolesUnassignPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/permissions/assigned_by_roles/{uuid}/unassign/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPermissionAssignRequestToJSON(requestParameters['patchedPermissionAssignRequest']), + }; + } + + /** + * Unassign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + */ + async rbacPermissionsAssignedByRolesUnassignPartialUpdateRaw(requestParameters: RbacPermissionsAssignedByRolesUnassignPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacPermissionsAssignedByRolesUnassignPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Unassign permission(s) to role. When `object_pk` is set, the permissions are only assigned to the specific object, otherwise they are assigned globally. + */ + async rbacPermissionsAssignedByRolesUnassignPartialUpdate(requestParameters: RbacPermissionsAssignedByRolesUnassignPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rbacPermissionsAssignedByRolesUnassignPartialUpdateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for rbacPermissionsList without sending the request + */ + async rbacPermissionsListRequestOpts(requestParameters: RbacPermissionsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['codename'] != null) { + queryParameters['codename'] = requestParameters['codename']; + } + + if (requestParameters['contentTypeAppLabel'] != null) { + queryParameters['content_type__app_label'] = requestParameters['contentTypeAppLabel']; + } + + if (requestParameters['contentTypeModel'] != null) { + queryParameters['content_type__model'] = requestParameters['contentTypeModel']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['role'] != null) { + queryParameters['role'] = requestParameters['role']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/permissions/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read-only list of all permissions, filterable by model and app + */ + async rbacPermissionsListRaw(requestParameters: RbacPermissionsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacPermissionsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPermissionListFromJSON(jsonValue)); + } + + /** + * Read-only list of all permissions, filterable by model and app + */ + async rbacPermissionsList(requestParameters: RbacPermissionsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacPermissionsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacPermissionsRetrieve without sending the request + */ + async rbacPermissionsRetrieveRequestOpts(requestParameters: RbacPermissionsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling rbacPermissionsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/permissions/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read-only list of all permissions, filterable by model and app + */ + async rbacPermissionsRetrieveRaw(requestParameters: RbacPermissionsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacPermissionsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PermissionFromJSON(jsonValue)); + } + + /** + * Read-only list of all permissions, filterable by model and app + */ + async rbacPermissionsRetrieve(requestParameters: RbacPermissionsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacPermissionsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacPermissionsRolesList without sending the request + */ + async rbacPermissionsRolesListRequestOpts(requestParameters: RbacPermissionsRolesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['uuid'] != null) { + queryParameters['uuid'] = requestParameters['uuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/permissions/roles/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a role\'s assigned object permissions + */ + async rbacPermissionsRolesListRaw(requestParameters: RbacPermissionsRolesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacPermissionsRolesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedExtraRoleObjectPermissionListFromJSON(jsonValue)); + } + + /** + * Get a role\'s assigned object permissions + */ + async rbacPermissionsRolesList(requestParameters: RbacPermissionsRolesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacPermissionsRolesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacRolesAddUserCreate without sending the request + */ + async rbacRolesAddUserCreateRequestOpts(requestParameters: RbacRolesAddUserCreateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesAddUserCreate().' + ); + } + + if (requestParameters['userAccountSerializerForRoleRequest'] == null) { + throw new runtime.RequiredError( + 'userAccountSerializerForRoleRequest', + 'Required parameter "userAccountSerializerForRoleRequest" was null or undefined when calling rbacRolesAddUserCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/add_user/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserAccountSerializerForRoleRequestToJSON(requestParameters['userAccountSerializerForRoleRequest']), + }; + } + + /** + * Add user to role + */ + async rbacRolesAddUserCreateRaw(requestParameters: RbacRolesAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesAddUserCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Add user to role + */ + async rbacRolesAddUserCreate(requestParameters: RbacRolesAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rbacRolesAddUserCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for rbacRolesCreate without sending the request + */ + async rbacRolesCreateRequestOpts(requestParameters: RbacRolesCreateRequest): Promise { + if (requestParameters['roleRequest'] == null) { + throw new runtime.RequiredError( + 'roleRequest', + 'Required parameter "roleRequest" was null or undefined when calling rbacRolesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RoleRequestToJSON(requestParameters['roleRequest']), + }; + } + + /** + * Role viewset + */ + async rbacRolesCreateRaw(requestParameters: RbacRolesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue)); + } + + /** + * Role viewset + */ + async rbacRolesCreate(requestParameters: RbacRolesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacRolesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacRolesDestroy without sending the request + */ + async rbacRolesDestroyRequestOpts(requestParameters: RbacRolesDestroyRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Role viewset + */ + async rbacRolesDestroyRaw(requestParameters: RbacRolesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Role viewset + */ + async rbacRolesDestroy(requestParameters: RbacRolesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rbacRolesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for rbacRolesList without sending the request + */ + async rbacRolesListRequestOpts(requestParameters: RbacRolesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['groups'] != null) { + queryParameters['groups'] = requestParameters['groups']; + } + + if (requestParameters['inherited'] != null) { + queryParameters['inherited'] = requestParameters['inherited']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['managedIsnull'] != null) { + queryParameters['managed__isnull'] = requestParameters['managedIsnull']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['users'] != null) { + queryParameters['users'] = requestParameters['users']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Role viewset + */ + async rbacRolesListRaw(requestParameters: RbacRolesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRoleListFromJSON(jsonValue)); + } + + /** + * Role viewset + */ + async rbacRolesList(requestParameters: RbacRolesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacRolesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacRolesPartialUpdate without sending the request + */ + async rbacRolesPartialUpdateRequestOpts(requestParameters: RbacRolesPartialUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedRoleRequestToJSON(requestParameters['patchedRoleRequest']), + }; + } + + /** + * Role viewset + */ + async rbacRolesPartialUpdateRaw(requestParameters: RbacRolesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue)); + } + + /** + * Role viewset + */ + async rbacRolesPartialUpdate(requestParameters: RbacRolesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacRolesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacRolesRemoveUserCreate without sending the request + */ + async rbacRolesRemoveUserCreateRequestOpts(requestParameters: RbacRolesRemoveUserCreateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesRemoveUserCreate().' + ); + } + + if (requestParameters['userAccountSerializerForRoleRequest'] == null) { + throw new runtime.RequiredError( + 'userAccountSerializerForRoleRequest', + 'Required parameter "userAccountSerializerForRoleRequest" was null or undefined when calling rbacRolesRemoveUserCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/remove_user/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserAccountSerializerForRoleRequestToJSON(requestParameters['userAccountSerializerForRoleRequest']), + }; + } + + /** + * Remove user from role + */ + async rbacRolesRemoveUserCreateRaw(requestParameters: RbacRolesRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesRemoveUserCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Remove user from role + */ + async rbacRolesRemoveUserCreate(requestParameters: RbacRolesRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rbacRolesRemoveUserCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for rbacRolesRetrieve without sending the request + */ + async rbacRolesRetrieveRequestOpts(requestParameters: RbacRolesRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Role viewset + */ + async rbacRolesRetrieveRaw(requestParameters: RbacRolesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue)); + } + + /** + * Role viewset + */ + async rbacRolesRetrieve(requestParameters: RbacRolesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacRolesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacRolesUpdate without sending the request + */ + async rbacRolesUpdateRequestOpts(requestParameters: RbacRolesUpdateRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesUpdate().' + ); + } + + if (requestParameters['roleRequest'] == null) { + throw new runtime.RequiredError( + 'roleRequest', + 'Required parameter "roleRequest" was null or undefined when calling rbacRolesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RoleRequestToJSON(requestParameters['roleRequest']), + }; + } + + /** + * Role viewset + */ + async rbacRolesUpdateRaw(requestParameters: RbacRolesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rbacRolesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue)); + } + + /** + * Role viewset + */ + async rbacRolesUpdate(requestParameters: RbacRolesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rbacRolesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for rbacRolesUsedByList without sending the request + */ + async rbacRolesUsedByListRequestOpts(requestParameters: RbacRolesUsedByListRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling rbacRolesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/rbac/roles/{uuid}/used_by/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async rbacRolesUsedByListRaw(requestParameters: RbacRolesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.rbacRolesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async rbacRolesUsedByList(requestParameters: RbacRolesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.rbacRolesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const RbacPermissionsAssignedByRolesListModelEnum = { + AuthentikBlueprintsBlueprintinstance: 'authentik_blueprints.blueprintinstance', + AuthentikBrandsBrand: 'authentik_brands.brand', + AuthentikCoreApplication: 'authentik_core.application', + AuthentikCoreApplicationentitlement: 'authentik_core.applicationentitlement', + AuthentikCoreGroup: 'authentik_core.group', + AuthentikCoreToken: 'authentik_core.token', + AuthentikCoreUser: 'authentik_core.user', + AuthentikCryptoCertificatekeypair: 'authentik_crypto.certificatekeypair', + AuthentikEndpointsDeviceaccessgroup: 'authentik_endpoints.deviceaccessgroup', + AuthentikEndpointsDeviceuserbinding: 'authentik_endpoints.deviceuserbinding', + AuthentikEndpointsEndpointstage: 'authentik_endpoints.endpointstage', + AuthentikEndpointsConnectorsAgentAgentconnector: 'authentik_endpoints_connectors_agent.agentconnector', + AuthentikEndpointsConnectorsAgentAgentdeviceuserbinding: 'authentik_endpoints_connectors_agent.agentdeviceuserbinding', + AuthentikEndpointsConnectorsAgentEnrollmenttoken: 'authentik_endpoints_connectors_agent.enrollmenttoken', + AuthentikEndpointsConnectorsFleetFleetconnector: 'authentik_endpoints_connectors_fleet.fleetconnector', + AuthentikEndpointsConnectorsGoogleChromeGooglechromeconnector: 'authentik_endpoints_connectors_google_chrome.googlechromeconnector', + AuthentikEnterpriseLicense: 'authentik_enterprise.license', + AuthentikEventsEvent: 'authentik_events.event', + AuthentikEventsNotification: 'authentik_events.notification', + AuthentikEventsNotificationrule: 'authentik_events.notificationrule', + AuthentikEventsNotificationtransport: 'authentik_events.notificationtransport', + AuthentikEventsNotificationwebhookmapping: 'authentik_events.notificationwebhookmapping', + AuthentikFlowsFlow: 'authentik_flows.flow', + AuthentikFlowsFlowstagebinding: 'authentik_flows.flowstagebinding', + AuthentikLifecycleLifecycleiteration: 'authentik_lifecycle.lifecycleiteration', + AuthentikLifecycleLifecyclerule: 'authentik_lifecycle.lifecyclerule', + AuthentikLifecycleReview: 'authentik_lifecycle.review', + AuthentikOutpostsDockerserviceconnection: 'authentik_outposts.dockerserviceconnection', + AuthentikOutpostsKubernetesserviceconnection: 'authentik_outposts.kubernetesserviceconnection', + AuthentikOutpostsOutpost: 'authentik_outposts.outpost', + AuthentikPoliciesPolicybinding: 'authentik_policies.policybinding', + AuthentikPoliciesDummyDummypolicy: 'authentik_policies_dummy.dummypolicy', + AuthentikPoliciesEventMatcherEventmatcherpolicy: 'authentik_policies_event_matcher.eventmatcherpolicy', + AuthentikPoliciesExpiryPasswordexpirypolicy: 'authentik_policies_expiry.passwordexpirypolicy', + AuthentikPoliciesExpressionExpressionpolicy: 'authentik_policies_expression.expressionpolicy', + AuthentikPoliciesGeoipGeoippolicy: 'authentik_policies_geoip.geoippolicy', + AuthentikPoliciesPasswordPasswordpolicy: 'authentik_policies_password.passwordpolicy', + AuthentikPoliciesReputationReputationpolicy: 'authentik_policies_reputation.reputationpolicy', + AuthentikPoliciesUniquePasswordUniquepasswordpolicy: 'authentik_policies_unique_password.uniquepasswordpolicy', + AuthentikProvidersGoogleWorkspaceGoogleworkspaceprovider: 'authentik_providers_google_workspace.googleworkspaceprovider', + AuthentikProvidersGoogleWorkspaceGoogleworkspaceprovidermapping: 'authentik_providers_google_workspace.googleworkspaceprovidermapping', + AuthentikProvidersLdapLdapprovider: 'authentik_providers_ldap.ldapprovider', + AuthentikProvidersMicrosoftEntraMicrosoftentraprovider: 'authentik_providers_microsoft_entra.microsoftentraprovider', + AuthentikProvidersMicrosoftEntraMicrosoftentraprovidermapping: 'authentik_providers_microsoft_entra.microsoftentraprovidermapping', + AuthentikProvidersOauth2Oauth2provider: 'authentik_providers_oauth2.oauth2provider', + AuthentikProvidersOauth2Scopemapping: 'authentik_providers_oauth2.scopemapping', + AuthentikProvidersProxyProxyprovider: 'authentik_providers_proxy.proxyprovider', + AuthentikProvidersRacEndpoint: 'authentik_providers_rac.endpoint', + AuthentikProvidersRacRacpropertymapping: 'authentik_providers_rac.racpropertymapping', + AuthentikProvidersRacRacprovider: 'authentik_providers_rac.racprovider', + AuthentikProvidersRadiusRadiusprovider: 'authentik_providers_radius.radiusprovider', + AuthentikProvidersRadiusRadiusproviderpropertymapping: 'authentik_providers_radius.radiusproviderpropertymapping', + AuthentikProvidersSamlSamlpropertymapping: 'authentik_providers_saml.samlpropertymapping', + AuthentikProvidersSamlSamlprovider: 'authentik_providers_saml.samlprovider', + AuthentikProvidersScimScimmapping: 'authentik_providers_scim.scimmapping', + AuthentikProvidersScimScimprovider: 'authentik_providers_scim.scimprovider', + AuthentikProvidersSsfSsfprovider: 'authentik_providers_ssf.ssfprovider', + AuthentikProvidersWsFederationWsfederationprovider: 'authentik_providers_ws_federation.wsfederationprovider', + AuthentikRbacInitialpermissions: 'authentik_rbac.initialpermissions', + AuthentikRbacRole: 'authentik_rbac.role', + AuthentikReportsDataexport: 'authentik_reports.dataexport', + AuthentikSourcesKerberosGroupkerberossourceconnection: 'authentik_sources_kerberos.groupkerberossourceconnection', + AuthentikSourcesKerberosKerberossource: 'authentik_sources_kerberos.kerberossource', + AuthentikSourcesKerberosKerberossourcepropertymapping: 'authentik_sources_kerberos.kerberossourcepropertymapping', + AuthentikSourcesKerberosUserkerberossourceconnection: 'authentik_sources_kerberos.userkerberossourceconnection', + AuthentikSourcesLdapGroupldapsourceconnection: 'authentik_sources_ldap.groupldapsourceconnection', + AuthentikSourcesLdapLdapsource: 'authentik_sources_ldap.ldapsource', + AuthentikSourcesLdapLdapsourcepropertymapping: 'authentik_sources_ldap.ldapsourcepropertymapping', + AuthentikSourcesLdapUserldapsourceconnection: 'authentik_sources_ldap.userldapsourceconnection', + AuthentikSourcesOauthGroupoauthsourceconnection: 'authentik_sources_oauth.groupoauthsourceconnection', + AuthentikSourcesOauthOauthsource: 'authentik_sources_oauth.oauthsource', + AuthentikSourcesOauthOauthsourcepropertymapping: 'authentik_sources_oauth.oauthsourcepropertymapping', + AuthentikSourcesOauthUseroauthsourceconnection: 'authentik_sources_oauth.useroauthsourceconnection', + AuthentikSourcesPlexGroupplexsourceconnection: 'authentik_sources_plex.groupplexsourceconnection', + AuthentikSourcesPlexPlexsource: 'authentik_sources_plex.plexsource', + AuthentikSourcesPlexPlexsourcepropertymapping: 'authentik_sources_plex.plexsourcepropertymapping', + AuthentikSourcesPlexUserplexsourceconnection: 'authentik_sources_plex.userplexsourceconnection', + AuthentikSourcesSamlGroupsamlsourceconnection: 'authentik_sources_saml.groupsamlsourceconnection', + AuthentikSourcesSamlSamlsource: 'authentik_sources_saml.samlsource', + AuthentikSourcesSamlSamlsourcepropertymapping: 'authentik_sources_saml.samlsourcepropertymapping', + AuthentikSourcesSamlUsersamlsourceconnection: 'authentik_sources_saml.usersamlsourceconnection', + AuthentikSourcesScimScimsource: 'authentik_sources_scim.scimsource', + AuthentikSourcesScimScimsourcepropertymapping: 'authentik_sources_scim.scimsourcepropertymapping', + AuthentikSourcesTelegramGrouptelegramsourceconnection: 'authentik_sources_telegram.grouptelegramsourceconnection', + AuthentikSourcesTelegramTelegramsource: 'authentik_sources_telegram.telegramsource', + AuthentikSourcesTelegramTelegramsourcepropertymapping: 'authentik_sources_telegram.telegramsourcepropertymapping', + AuthentikSourcesTelegramUsertelegramsourceconnection: 'authentik_sources_telegram.usertelegramsourceconnection', + AuthentikStagesAuthenticatorDuoAuthenticatorduostage: 'authentik_stages_authenticator_duo.authenticatorduostage', + AuthentikStagesAuthenticatorDuoDuodevice: 'authentik_stages_authenticator_duo.duodevice', + AuthentikStagesAuthenticatorEmailAuthenticatoremailstage: 'authentik_stages_authenticator_email.authenticatoremailstage', + AuthentikStagesAuthenticatorEmailEmaildevice: 'authentik_stages_authenticator_email.emaildevice', + AuthentikStagesAuthenticatorEndpointGdtcAuthenticatorendpointgdtcstage: 'authentik_stages_authenticator_endpoint_gdtc.authenticatorendpointgdtcstage', + AuthentikStagesAuthenticatorSmsAuthenticatorsmsstage: 'authentik_stages_authenticator_sms.authenticatorsmsstage', + AuthentikStagesAuthenticatorSmsSmsdevice: 'authentik_stages_authenticator_sms.smsdevice', + AuthentikStagesAuthenticatorStaticAuthenticatorstaticstage: 'authentik_stages_authenticator_static.authenticatorstaticstage', + AuthentikStagesAuthenticatorStaticStaticdevice: 'authentik_stages_authenticator_static.staticdevice', + AuthentikStagesAuthenticatorTotpAuthenticatortotpstage: 'authentik_stages_authenticator_totp.authenticatortotpstage', + AuthentikStagesAuthenticatorTotpTotpdevice: 'authentik_stages_authenticator_totp.totpdevice', + AuthentikStagesAuthenticatorValidateAuthenticatorvalidatestage: 'authentik_stages_authenticator_validate.authenticatorvalidatestage', + AuthentikStagesAuthenticatorWebauthnAuthenticatorwebauthnstage: 'authentik_stages_authenticator_webauthn.authenticatorwebauthnstage', + AuthentikStagesAuthenticatorWebauthnWebauthndevice: 'authentik_stages_authenticator_webauthn.webauthndevice', + AuthentikStagesCaptchaCaptchastage: 'authentik_stages_captcha.captchastage', + AuthentikStagesConsentConsentstage: 'authentik_stages_consent.consentstage', + AuthentikStagesDenyDenystage: 'authentik_stages_deny.denystage', + AuthentikStagesDummyDummystage: 'authentik_stages_dummy.dummystage', + AuthentikStagesEmailEmailstage: 'authentik_stages_email.emailstage', + AuthentikStagesIdentificationIdentificationstage: 'authentik_stages_identification.identificationstage', + AuthentikStagesInvitationInvitation: 'authentik_stages_invitation.invitation', + AuthentikStagesInvitationInvitationstage: 'authentik_stages_invitation.invitationstage', + AuthentikStagesMtlsMutualtlsstage: 'authentik_stages_mtls.mutualtlsstage', + AuthentikStagesPasswordPasswordstage: 'authentik_stages_password.passwordstage', + AuthentikStagesPromptPrompt: 'authentik_stages_prompt.prompt', + AuthentikStagesPromptPromptstage: 'authentik_stages_prompt.promptstage', + AuthentikStagesRedirectRedirectstage: 'authentik_stages_redirect.redirectstage', + AuthentikStagesSourceSourcestage: 'authentik_stages_source.sourcestage', + AuthentikStagesUserDeleteUserdeletestage: 'authentik_stages_user_delete.userdeletestage', + AuthentikStagesUserLoginUserloginstage: 'authentik_stages_user_login.userloginstage', + AuthentikStagesUserLogoutUserlogoutstage: 'authentik_stages_user_logout.userlogoutstage', + AuthentikStagesUserWriteUserwritestage: 'authentik_stages_user_write.userwritestage', + AuthentikTasksSchedulesSchedule: 'authentik_tasks_schedules.schedule', + AuthentikTenantsDomain: 'authentik_tenants.domain', + UnknownDefaultOpenApi: '11184809' +} as const; +export type RbacPermissionsAssignedByRolesListModelEnum = typeof RbacPermissionsAssignedByRolesListModelEnum[keyof typeof RbacPermissionsAssignedByRolesListModelEnum]; diff --git a/packages/client-ts/src/apis/ReportsApi.ts b/packages/client-ts/src/apis/ReportsApi.ts new file mode 100644 index 0000000000..9b4af3d0ab --- /dev/null +++ b/packages/client-ts/src/apis/ReportsApi.ts @@ -0,0 +1,214 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + DataExport, + GenericError, + PaginatedDataExportList, + ValidationError, +} from '../models/index'; +import { + DataExportFromJSON, + DataExportToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedDataExportListFromJSON, + PaginatedDataExportListToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface ReportsExportsDestroyRequest { + id: string; +} + +export interface ReportsExportsListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface ReportsExportsRetrieveRequest { + id: string; +} + +/** + * + */ +export class ReportsApi extends runtime.BaseAPI { + + /** + * Creates request options for reportsExportsDestroy without sending the request + */ + async reportsExportsDestroyRequestOpts(requestParameters: ReportsExportsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling reportsExportsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/reports/exports/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async reportsExportsDestroyRaw(requestParameters: ReportsExportsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.reportsExportsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async reportsExportsDestroy(requestParameters: ReportsExportsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.reportsExportsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for reportsExportsList without sending the request + */ + async reportsExportsListRequestOpts(requestParameters: ReportsExportsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/reports/exports/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async reportsExportsListRaw(requestParameters: ReportsExportsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.reportsExportsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDataExportListFromJSON(jsonValue)); + } + + /** + */ + async reportsExportsList(requestParameters: ReportsExportsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.reportsExportsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for reportsExportsRetrieve without sending the request + */ + async reportsExportsRetrieveRequestOpts(requestParameters: ReportsExportsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling reportsExportsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/reports/exports/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async reportsExportsRetrieveRaw(requestParameters: ReportsExportsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.reportsExportsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DataExportFromJSON(jsonValue)); + } + + /** + */ + async reportsExportsRetrieve(requestParameters: ReportsExportsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.reportsExportsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/RootApi.ts b/packages/client-ts/src/apis/RootApi.ts new file mode 100644 index 0000000000..bdf8d30f1a --- /dev/null +++ b/packages/client-ts/src/apis/RootApi.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Config, + GenericError, + ValidationError, +} from '../models/index'; +import { + ConfigFromJSON, + ConfigToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +/** + * + */ +export class RootApi extends runtime.BaseAPI { + + /** + * Creates request options for rootConfigRetrieve without sending the request + */ + async rootConfigRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/root/config/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Retrieve public configuration options + */ + async rootConfigRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.rootConfigRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + } + + /** + * Retrieve public configuration options + */ + async rootConfigRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rootConfigRetrieveRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/SchemaApi.ts b/packages/client-ts/src/apis/SchemaApi.ts new file mode 100644 index 0000000000..14be7718bf --- /dev/null +++ b/packages/client-ts/src/apis/SchemaApi.ts @@ -0,0 +1,207 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface SchemaRetrieveRequest { + format?: SchemaRetrieveFormatEnum; + lang?: SchemaRetrieveLangEnum; +} + +/** + * + */ +export class SchemaApi extends runtime.BaseAPI { + + /** + * Creates request options for schemaRetrieve without sending the request + */ + async schemaRetrieveRequestOpts(requestParameters: SchemaRetrieveRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['format'] != null) { + queryParameters['format'] = requestParameters['format']; + } + + if (requestParameters['lang'] != null) { + queryParameters['lang'] = requestParameters['lang']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/schema/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json + */ + async schemaRetrieveRaw(requestParameters: SchemaRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.schemaRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json + */ + async schemaRetrieve(requestParameters: SchemaRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.schemaRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const SchemaRetrieveFormatEnum = { + Json: 'json', + Yaml: 'yaml', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SchemaRetrieveFormatEnum = typeof SchemaRetrieveFormatEnum[keyof typeof SchemaRetrieveFormatEnum]; +/** + * @export + */ +export const SchemaRetrieveLangEnum = { + Af: 'af', + Ar: 'ar', + ArDz: 'ar-dz', + Ast: 'ast', + Az: 'az', + Be: 'be', + Bg: 'bg', + Bn: 'bn', + Br: 'br', + Bs: 'bs', + Ca: 'ca', + Ckb: 'ckb', + Cs: 'cs', + Cy: 'cy', + Da: 'da', + De: 'de', + Dsb: 'dsb', + El: 'el', + En: 'en', + EnAu: 'en-au', + EnGb: 'en-gb', + Eo: 'eo', + Es: 'es', + EsAr: 'es-ar', + EsCo: 'es-co', + EsMx: 'es-mx', + EsNi: 'es-ni', + EsVe: 'es-ve', + Et: 'et', + Eu: 'eu', + Fa: 'fa', + Fi: 'fi', + Fr: 'fr', + Fy: 'fy', + Ga: 'ga', + Gd: 'gd', + Gl: 'gl', + He: 'he', + Hi: 'hi', + Hr: 'hr', + Hsb: 'hsb', + Hu: 'hu', + Hy: 'hy', + Ia: 'ia', + Id: 'id', + Ig: 'ig', + Io: 'io', + Is: 'is', + It: 'it', + Ja: 'ja', + Ka: 'ka', + Kab: 'kab', + Kk: 'kk', + Km: 'km', + Kn: 'kn', + Ko: 'ko', + Ky: 'ky', + Lb: 'lb', + Lt: 'lt', + Lv: 'lv', + Mk: 'mk', + Ml: 'ml', + Mn: 'mn', + Mr: 'mr', + Ms: 'ms', + My: 'my', + Nb: 'nb', + Ne: 'ne', + Nl: 'nl', + Nn: 'nn', + Os: 'os', + Pa: 'pa', + Pl: 'pl', + Pt: 'pt', + PtBr: 'pt-br', + Ro: 'ro', + Ru: 'ru', + Sk: 'sk', + Sl: 'sl', + Sq: 'sq', + Sr: 'sr', + SrLatn: 'sr-latn', + Sv: 'sv', + Sw: 'sw', + Ta: 'ta', + Te: 'te', + Tg: 'tg', + Th: 'th', + Tk: 'tk', + Tr: 'tr', + Tt: 'tt', + Udm: 'udm', + Ug: 'ug', + Uk: 'uk', + Ur: 'ur', + Uz: 'uz', + Vi: 'vi', + ZhHans: 'zh-hans', + ZhHant: 'zh-hant', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SchemaRetrieveLangEnum = typeof SchemaRetrieveLangEnum[keyof typeof SchemaRetrieveLangEnum]; diff --git a/packages/client-ts/src/apis/SourcesApi.ts b/packages/client-ts/src/apis/SourcesApi.ts new file mode 100644 index 0000000000..2dca0cf86e --- /dev/null +++ b/packages/client-ts/src/apis/SourcesApi.ts @@ -0,0 +1,11708 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + GroupKerberosSourceConnection, + GroupKerberosSourceConnectionRequest, + GroupLDAPSourceConnection, + GroupLDAPSourceConnectionRequest, + GroupOAuthSourceConnection, + GroupOAuthSourceConnectionRequest, + GroupPlexSourceConnection, + GroupPlexSourceConnectionRequest, + GroupSAMLSourceConnection, + GroupSAMLSourceConnectionRequest, + GroupSourceConnection, + GroupSourceConnectionRequest, + GroupTelegramSourceConnection, + GroupTelegramSourceConnectionRequest, + KerberosSource, + KerberosSourceRequest, + LDAPDebug, + LDAPSource, + LDAPSourceRequest, + OAuthSource, + OAuthSourceRequest, + PaginatedGroupKerberosSourceConnectionList, + PaginatedGroupLDAPSourceConnectionList, + PaginatedGroupOAuthSourceConnectionList, + PaginatedGroupPlexSourceConnectionList, + PaginatedGroupSAMLSourceConnectionList, + PaginatedGroupSourceConnectionList, + PaginatedGroupTelegramSourceConnectionList, + PaginatedKerberosSourceList, + PaginatedLDAPSourceList, + PaginatedOAuthSourceList, + PaginatedPlexSourceList, + PaginatedSAMLSourceList, + PaginatedSCIMSourceGroupList, + PaginatedSCIMSourceList, + PaginatedSCIMSourceUserList, + PaginatedSourceList, + PaginatedTelegramSourceList, + PaginatedUserKerberosSourceConnectionList, + PaginatedUserLDAPSourceConnectionList, + PaginatedUserOAuthSourceConnectionList, + PaginatedUserPlexSourceConnectionList, + PaginatedUserSAMLSourceConnectionList, + PaginatedUserSourceConnectionList, + PaginatedUserTelegramSourceConnectionList, + PatchedGroupKerberosSourceConnectionRequest, + PatchedGroupLDAPSourceConnectionRequest, + PatchedGroupOAuthSourceConnectionRequest, + PatchedGroupPlexSourceConnectionRequest, + PatchedGroupSAMLSourceConnectionRequest, + PatchedGroupSourceConnectionRequest, + PatchedGroupTelegramSourceConnectionRequest, + PatchedKerberosSourceRequest, + PatchedLDAPSourceRequest, + PatchedOAuthSourceRequest, + PatchedPlexSourceRequest, + PatchedSAMLSourceRequest, + PatchedSCIMSourceGroupRequest, + PatchedSCIMSourceRequest, + PatchedSCIMSourceUserRequest, + PatchedTelegramSourceRequest, + PatchedUserKerberosSourceConnectionRequest, + PatchedUserLDAPSourceConnectionRequest, + PatchedUserOAuthSourceConnectionRequest, + PatchedUserPlexSourceConnectionRequest, + PatchedUserSAMLSourceConnectionRequest, + PatchedUserSourceConnectionRequest, + PatchedUserTelegramSourceConnectionRequest, + PlexSource, + PlexSourceRequest, + PlexTokenRedeemRequest, + RedirectChallenge, + SAMLMetadata, + SAMLSource, + SAMLSourceRequest, + SCIMSource, + SCIMSourceGroup, + SCIMSourceGroupRequest, + SCIMSourceRequest, + SCIMSourceUser, + SCIMSourceUserRequest, + Source, + SourceType, + SyncStatus, + TelegramAuthRequest, + TelegramSource, + TelegramSourceRequest, + TypeCreate, + UsedBy, + UserKerberosSourceConnection, + UserKerberosSourceConnectionRequest, + UserLDAPSourceConnection, + UserLDAPSourceConnectionRequest, + UserOAuthSourceConnection, + UserOAuthSourceConnectionRequest, + UserPlexSourceConnection, + UserPlexSourceConnectionRequest, + UserSAMLSourceConnection, + UserSAMLSourceConnectionRequest, + UserSetting, + UserSourceConnection, + UserSourceConnectionRequest, + UserTelegramSourceConnection, + UserTelegramSourceConnectionRequest, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + GroupKerberosSourceConnectionFromJSON, + GroupKerberosSourceConnectionToJSON, + GroupKerberosSourceConnectionRequestFromJSON, + GroupKerberosSourceConnectionRequestToJSON, + GroupLDAPSourceConnectionFromJSON, + GroupLDAPSourceConnectionToJSON, + GroupLDAPSourceConnectionRequestFromJSON, + GroupLDAPSourceConnectionRequestToJSON, + GroupOAuthSourceConnectionFromJSON, + GroupOAuthSourceConnectionToJSON, + GroupOAuthSourceConnectionRequestFromJSON, + GroupOAuthSourceConnectionRequestToJSON, + GroupPlexSourceConnectionFromJSON, + GroupPlexSourceConnectionToJSON, + GroupPlexSourceConnectionRequestFromJSON, + GroupPlexSourceConnectionRequestToJSON, + GroupSAMLSourceConnectionFromJSON, + GroupSAMLSourceConnectionToJSON, + GroupSAMLSourceConnectionRequestFromJSON, + GroupSAMLSourceConnectionRequestToJSON, + GroupSourceConnectionFromJSON, + GroupSourceConnectionToJSON, + GroupSourceConnectionRequestFromJSON, + GroupSourceConnectionRequestToJSON, + GroupTelegramSourceConnectionFromJSON, + GroupTelegramSourceConnectionToJSON, + GroupTelegramSourceConnectionRequestFromJSON, + GroupTelegramSourceConnectionRequestToJSON, + KerberosSourceFromJSON, + KerberosSourceToJSON, + KerberosSourceRequestFromJSON, + KerberosSourceRequestToJSON, + LDAPDebugFromJSON, + LDAPDebugToJSON, + LDAPSourceFromJSON, + LDAPSourceToJSON, + LDAPSourceRequestFromJSON, + LDAPSourceRequestToJSON, + OAuthSourceFromJSON, + OAuthSourceToJSON, + OAuthSourceRequestFromJSON, + OAuthSourceRequestToJSON, + PaginatedGroupKerberosSourceConnectionListFromJSON, + PaginatedGroupKerberosSourceConnectionListToJSON, + PaginatedGroupLDAPSourceConnectionListFromJSON, + PaginatedGroupLDAPSourceConnectionListToJSON, + PaginatedGroupOAuthSourceConnectionListFromJSON, + PaginatedGroupOAuthSourceConnectionListToJSON, + PaginatedGroupPlexSourceConnectionListFromJSON, + PaginatedGroupPlexSourceConnectionListToJSON, + PaginatedGroupSAMLSourceConnectionListFromJSON, + PaginatedGroupSAMLSourceConnectionListToJSON, + PaginatedGroupSourceConnectionListFromJSON, + PaginatedGroupSourceConnectionListToJSON, + PaginatedGroupTelegramSourceConnectionListFromJSON, + PaginatedGroupTelegramSourceConnectionListToJSON, + PaginatedKerberosSourceListFromJSON, + PaginatedKerberosSourceListToJSON, + PaginatedLDAPSourceListFromJSON, + PaginatedLDAPSourceListToJSON, + PaginatedOAuthSourceListFromJSON, + PaginatedOAuthSourceListToJSON, + PaginatedPlexSourceListFromJSON, + PaginatedPlexSourceListToJSON, + PaginatedSAMLSourceListFromJSON, + PaginatedSAMLSourceListToJSON, + PaginatedSCIMSourceGroupListFromJSON, + PaginatedSCIMSourceGroupListToJSON, + PaginatedSCIMSourceListFromJSON, + PaginatedSCIMSourceListToJSON, + PaginatedSCIMSourceUserListFromJSON, + PaginatedSCIMSourceUserListToJSON, + PaginatedSourceListFromJSON, + PaginatedSourceListToJSON, + PaginatedTelegramSourceListFromJSON, + PaginatedTelegramSourceListToJSON, + PaginatedUserKerberosSourceConnectionListFromJSON, + PaginatedUserKerberosSourceConnectionListToJSON, + PaginatedUserLDAPSourceConnectionListFromJSON, + PaginatedUserLDAPSourceConnectionListToJSON, + PaginatedUserOAuthSourceConnectionListFromJSON, + PaginatedUserOAuthSourceConnectionListToJSON, + PaginatedUserPlexSourceConnectionListFromJSON, + PaginatedUserPlexSourceConnectionListToJSON, + PaginatedUserSAMLSourceConnectionListFromJSON, + PaginatedUserSAMLSourceConnectionListToJSON, + PaginatedUserSourceConnectionListFromJSON, + PaginatedUserSourceConnectionListToJSON, + PaginatedUserTelegramSourceConnectionListFromJSON, + PaginatedUserTelegramSourceConnectionListToJSON, + PatchedGroupKerberosSourceConnectionRequestFromJSON, + PatchedGroupKerberosSourceConnectionRequestToJSON, + PatchedGroupLDAPSourceConnectionRequestFromJSON, + PatchedGroupLDAPSourceConnectionRequestToJSON, + PatchedGroupOAuthSourceConnectionRequestFromJSON, + PatchedGroupOAuthSourceConnectionRequestToJSON, + PatchedGroupPlexSourceConnectionRequestFromJSON, + PatchedGroupPlexSourceConnectionRequestToJSON, + PatchedGroupSAMLSourceConnectionRequestFromJSON, + PatchedGroupSAMLSourceConnectionRequestToJSON, + PatchedGroupSourceConnectionRequestFromJSON, + PatchedGroupSourceConnectionRequestToJSON, + PatchedGroupTelegramSourceConnectionRequestFromJSON, + PatchedGroupTelegramSourceConnectionRequestToJSON, + PatchedKerberosSourceRequestFromJSON, + PatchedKerberosSourceRequestToJSON, + PatchedLDAPSourceRequestFromJSON, + PatchedLDAPSourceRequestToJSON, + PatchedOAuthSourceRequestFromJSON, + PatchedOAuthSourceRequestToJSON, + PatchedPlexSourceRequestFromJSON, + PatchedPlexSourceRequestToJSON, + PatchedSAMLSourceRequestFromJSON, + PatchedSAMLSourceRequestToJSON, + PatchedSCIMSourceGroupRequestFromJSON, + PatchedSCIMSourceGroupRequestToJSON, + PatchedSCIMSourceRequestFromJSON, + PatchedSCIMSourceRequestToJSON, + PatchedSCIMSourceUserRequestFromJSON, + PatchedSCIMSourceUserRequestToJSON, + PatchedTelegramSourceRequestFromJSON, + PatchedTelegramSourceRequestToJSON, + PatchedUserKerberosSourceConnectionRequestFromJSON, + PatchedUserKerberosSourceConnectionRequestToJSON, + PatchedUserLDAPSourceConnectionRequestFromJSON, + PatchedUserLDAPSourceConnectionRequestToJSON, + PatchedUserOAuthSourceConnectionRequestFromJSON, + PatchedUserOAuthSourceConnectionRequestToJSON, + PatchedUserPlexSourceConnectionRequestFromJSON, + PatchedUserPlexSourceConnectionRequestToJSON, + PatchedUserSAMLSourceConnectionRequestFromJSON, + PatchedUserSAMLSourceConnectionRequestToJSON, + PatchedUserSourceConnectionRequestFromJSON, + PatchedUserSourceConnectionRequestToJSON, + PatchedUserTelegramSourceConnectionRequestFromJSON, + PatchedUserTelegramSourceConnectionRequestToJSON, + PlexSourceFromJSON, + PlexSourceToJSON, + PlexSourceRequestFromJSON, + PlexSourceRequestToJSON, + PlexTokenRedeemRequestFromJSON, + PlexTokenRedeemRequestToJSON, + RedirectChallengeFromJSON, + RedirectChallengeToJSON, + SAMLMetadataFromJSON, + SAMLMetadataToJSON, + SAMLSourceFromJSON, + SAMLSourceToJSON, + SAMLSourceRequestFromJSON, + SAMLSourceRequestToJSON, + SCIMSourceFromJSON, + SCIMSourceToJSON, + SCIMSourceGroupFromJSON, + SCIMSourceGroupToJSON, + SCIMSourceGroupRequestFromJSON, + SCIMSourceGroupRequestToJSON, + SCIMSourceRequestFromJSON, + SCIMSourceRequestToJSON, + SCIMSourceUserFromJSON, + SCIMSourceUserToJSON, + SCIMSourceUserRequestFromJSON, + SCIMSourceUserRequestToJSON, + SourceFromJSON, + SourceToJSON, + SourceTypeFromJSON, + SourceTypeToJSON, + SyncStatusFromJSON, + SyncStatusToJSON, + TelegramAuthRequestFromJSON, + TelegramAuthRequestToJSON, + TelegramSourceFromJSON, + TelegramSourceToJSON, + TelegramSourceRequestFromJSON, + TelegramSourceRequestToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + UserKerberosSourceConnectionFromJSON, + UserKerberosSourceConnectionToJSON, + UserKerberosSourceConnectionRequestFromJSON, + UserKerberosSourceConnectionRequestToJSON, + UserLDAPSourceConnectionFromJSON, + UserLDAPSourceConnectionToJSON, + UserLDAPSourceConnectionRequestFromJSON, + UserLDAPSourceConnectionRequestToJSON, + UserOAuthSourceConnectionFromJSON, + UserOAuthSourceConnectionToJSON, + UserOAuthSourceConnectionRequestFromJSON, + UserOAuthSourceConnectionRequestToJSON, + UserPlexSourceConnectionFromJSON, + UserPlexSourceConnectionToJSON, + UserPlexSourceConnectionRequestFromJSON, + UserPlexSourceConnectionRequestToJSON, + UserSAMLSourceConnectionFromJSON, + UserSAMLSourceConnectionToJSON, + UserSAMLSourceConnectionRequestFromJSON, + UserSAMLSourceConnectionRequestToJSON, + UserSettingFromJSON, + UserSettingToJSON, + UserSourceConnectionFromJSON, + UserSourceConnectionToJSON, + UserSourceConnectionRequestFromJSON, + UserSourceConnectionRequestToJSON, + UserTelegramSourceConnectionFromJSON, + UserTelegramSourceConnectionToJSON, + UserTelegramSourceConnectionRequestFromJSON, + UserTelegramSourceConnectionRequestToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface SourcesAllDestroyRequest { + slug: string; +} + +export interface SourcesAllListRequest { + managed?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + search?: string; + slug?: string; +} + +export interface SourcesAllRetrieveRequest { + slug: string; +} + +export interface SourcesAllUsedByListRequest { + slug: string; +} + +export interface SourcesGroupConnectionsAllDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsAllListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsAllPartialUpdateRequest { + id: number; + patchedGroupSourceConnectionRequest?: PatchedGroupSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsAllRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsAllUpdateRequest { + id: number; + groupSourceConnectionRequest: GroupSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsAllUsedByListRequest { + id: number; +} + +export interface SourcesGroupConnectionsKerberosCreateRequest { + groupKerberosSourceConnectionRequest: GroupKerberosSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsKerberosDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsKerberosListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsKerberosPartialUpdateRequest { + id: number; + patchedGroupKerberosSourceConnectionRequest?: PatchedGroupKerberosSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsKerberosRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsKerberosUpdateRequest { + id: number; + groupKerberosSourceConnectionRequest: GroupKerberosSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsKerberosUsedByListRequest { + id: number; +} + +export interface SourcesGroupConnectionsLdapCreateRequest { + groupLDAPSourceConnectionRequest: GroupLDAPSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsLdapDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsLdapListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsLdapPartialUpdateRequest { + id: number; + patchedGroupLDAPSourceConnectionRequest?: PatchedGroupLDAPSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsLdapRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsLdapUpdateRequest { + id: number; + groupLDAPSourceConnectionRequest: GroupLDAPSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsLdapUsedByListRequest { + id: number; +} + +export interface SourcesGroupConnectionsOauthCreateRequest { + groupOAuthSourceConnectionRequest: GroupOAuthSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsOauthDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsOauthListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsOauthPartialUpdateRequest { + id: number; + patchedGroupOAuthSourceConnectionRequest?: PatchedGroupOAuthSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsOauthRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsOauthUpdateRequest { + id: number; + groupOAuthSourceConnectionRequest: GroupOAuthSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsOauthUsedByListRequest { + id: number; +} + +export interface SourcesGroupConnectionsPlexCreateRequest { + groupPlexSourceConnectionRequest: GroupPlexSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsPlexDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsPlexListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsPlexPartialUpdateRequest { + id: number; + patchedGroupPlexSourceConnectionRequest?: PatchedGroupPlexSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsPlexRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsPlexUpdateRequest { + id: number; + groupPlexSourceConnectionRequest: GroupPlexSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsPlexUsedByListRequest { + id: number; +} + +export interface SourcesGroupConnectionsSamlCreateRequest { + groupSAMLSourceConnectionRequest: GroupSAMLSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsSamlDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsSamlListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsSamlPartialUpdateRequest { + id: number; + patchedGroupSAMLSourceConnectionRequest?: PatchedGroupSAMLSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsSamlRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsSamlUpdateRequest { + id: number; + groupSAMLSourceConnectionRequest: GroupSAMLSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsSamlUsedByListRequest { + id: number; +} + +export interface SourcesGroupConnectionsTelegramCreateRequest { + groupTelegramSourceConnectionRequest: GroupTelegramSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsTelegramDestroyRequest { + id: number; +} + +export interface SourcesGroupConnectionsTelegramListRequest { + group?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesGroupConnectionsTelegramPartialUpdateRequest { + id: number; + patchedGroupTelegramSourceConnectionRequest?: PatchedGroupTelegramSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsTelegramRetrieveRequest { + id: number; +} + +export interface SourcesGroupConnectionsTelegramUpdateRequest { + id: number; + groupTelegramSourceConnectionRequest: GroupTelegramSourceConnectionRequest; +} + +export interface SourcesGroupConnectionsTelegramUsedByListRequest { + id: number; +} + +export interface SourcesKerberosCreateRequest { + kerberosSourceRequest: KerberosSourceRequest; +} + +export interface SourcesKerberosDestroyRequest { + slug: string; +} + +export interface SourcesKerberosListRequest { + enabled?: boolean; + kadminType?: SourcesKerberosListKadminTypeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + passwordLoginUpdateInternalPassword?: boolean; + pbmUuid?: string; + realm?: string; + search?: string; + slug?: string; + spnegoServerName?: string; + syncPrincipal?: string; + syncUsers?: boolean; + syncUsersPassword?: boolean; +} + +export interface SourcesKerberosPartialUpdateRequest { + slug: string; + patchedKerberosSourceRequest?: PatchedKerberosSourceRequest; +} + +export interface SourcesKerberosRetrieveRequest { + slug: string; +} + +export interface SourcesKerberosSyncStatusRetrieveRequest { + slug: string; +} + +export interface SourcesKerberosUpdateRequest { + slug: string; + kerberosSourceRequest: KerberosSourceRequest; +} + +export interface SourcesKerberosUsedByListRequest { + slug: string; +} + +export interface SourcesLdapCreateRequest { + lDAPSourceRequest: LDAPSourceRequest; +} + +export interface SourcesLdapDebugRetrieveRequest { + slug: string; +} + +export interface SourcesLdapDestroyRequest { + slug: string; +} + +export interface SourcesLdapListRequest { + additionalGroupDn?: string; + additionalUserDn?: string; + baseDn?: string; + bindCn?: string; + clientCertificate?: string; + deleteNotFoundObjects?: boolean; + enabled?: boolean; + groupMembershipField?: string; + groupObjectFilter?: string; + groupPropertyMappings?: Array; + lookupGroupsFromUser?: boolean; + name?: string; + objectUniquenessField?: string; + ordering?: string; + page?: number; + pageSize?: number; + passwordLoginUpdateInternalPassword?: boolean; + pbmUuid?: string; + peerCertificate?: string; + search?: string; + serverUri?: string; + slug?: string; + sni?: boolean; + startTls?: boolean; + syncGroups?: boolean; + syncParentGroup?: string; + syncUsers?: boolean; + syncUsersPassword?: boolean; + userMembershipAttribute?: string; + userObjectFilter?: string; + userPropertyMappings?: Array; +} + +export interface SourcesLdapPartialUpdateRequest { + slug: string; + patchedLDAPSourceRequest?: PatchedLDAPSourceRequest; +} + +export interface SourcesLdapRetrieveRequest { + slug: string; +} + +export interface SourcesLdapSyncStatusRetrieveRequest { + slug: string; +} + +export interface SourcesLdapUpdateRequest { + slug: string; + lDAPSourceRequest: LDAPSourceRequest; +} + +export interface SourcesLdapUsedByListRequest { + slug: string; +} + +export interface SourcesOauthCreateRequest { + oAuthSourceRequest: OAuthSourceRequest; +} + +export interface SourcesOauthDestroyRequest { + slug: string; +} + +export interface SourcesOauthListRequest { + accessTokenUrl?: string; + additionalScopes?: string; + authenticationFlow?: string; + authorizationUrl?: string; + consumerKey?: string; + enabled?: boolean; + enrollmentFlow?: string; + groupMatchingMode?: SourcesOauthListGroupMatchingModeEnum; + hasJwks?: boolean; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + policyEngineMode?: SourcesOauthListPolicyEngineModeEnum; + profileUrl?: string; + providerType?: string; + requestTokenUrl?: string; + search?: string; + slug?: string; + userMatchingMode?: SourcesOauthListUserMatchingModeEnum; +} + +export interface SourcesOauthPartialUpdateRequest { + slug: string; + patchedOAuthSourceRequest?: PatchedOAuthSourceRequest; +} + +export interface SourcesOauthRetrieveRequest { + slug: string; +} + +export interface SourcesOauthSourceTypesListRequest { + name?: string; +} + +export interface SourcesOauthUpdateRequest { + slug: string; + oAuthSourceRequest: OAuthSourceRequest; +} + +export interface SourcesOauthUsedByListRequest { + slug: string; +} + +export interface SourcesPlexCreateRequest { + plexSourceRequest: PlexSourceRequest; +} + +export interface SourcesPlexDestroyRequest { + slug: string; +} + +export interface SourcesPlexListRequest { + allowFriends?: boolean; + authenticationFlow?: string; + clientId?: string; + enabled?: boolean; + enrollmentFlow?: string; + groupMatchingMode?: SourcesPlexListGroupMatchingModeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + policyEngineMode?: SourcesPlexListPolicyEngineModeEnum; + search?: string; + slug?: string; + userMatchingMode?: SourcesPlexListUserMatchingModeEnum; +} + +export interface SourcesPlexPartialUpdateRequest { + slug: string; + patchedPlexSourceRequest?: PatchedPlexSourceRequest; +} + +export interface SourcesPlexRedeemTokenAuthenticatedCreateRequest { + plexTokenRedeemRequest: PlexTokenRedeemRequest; + slug?: string; +} + +export interface SourcesPlexRedeemTokenCreateRequest { + plexTokenRedeemRequest: PlexTokenRedeemRequest; + slug?: string; +} + +export interface SourcesPlexRetrieveRequest { + slug: string; +} + +export interface SourcesPlexUpdateRequest { + slug: string; + plexSourceRequest: PlexSourceRequest; +} + +export interface SourcesPlexUsedByListRequest { + slug: string; +} + +export interface SourcesSamlCreateRequest { + sAMLSourceRequest: SAMLSourceRequest; +} + +export interface SourcesSamlDestroyRequest { + slug: string; +} + +export interface SourcesSamlListRequest { + allowIdpInitiated?: boolean; + authenticationFlow?: string; + bindingType?: SourcesSamlListBindingTypeEnum; + digestAlgorithm?: SourcesSamlListDigestAlgorithmEnum; + enabled?: boolean; + enrollmentFlow?: string; + issuer?: string; + managed?: string; + name?: string; + nameIdPolicy?: SourcesSamlListNameIdPolicyEnum; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + policyEngineMode?: SourcesSamlListPolicyEngineModeEnum; + preAuthenticationFlow?: string; + search?: string; + signatureAlgorithm?: SourcesSamlListSignatureAlgorithmEnum; + signedAssertion?: boolean; + signedResponse?: boolean; + signingKp?: string; + sloUrl?: string; + slug?: string; + ssoUrl?: string; + temporaryUserDeleteAfter?: string; + userMatchingMode?: SourcesSamlListUserMatchingModeEnum; + verificationKp?: string; +} + +export interface SourcesSamlMetadataRetrieveRequest { + slug: string; +} + +export interface SourcesSamlPartialUpdateRequest { + slug: string; + patchedSAMLSourceRequest?: PatchedSAMLSourceRequest; +} + +export interface SourcesSamlRetrieveRequest { + slug: string; +} + +export interface SourcesSamlUpdateRequest { + slug: string; + sAMLSourceRequest: SAMLSourceRequest; +} + +export interface SourcesSamlUsedByListRequest { + slug: string; +} + +export interface SourcesScimCreateRequest { + sCIMSourceRequest: SCIMSourceRequest; +} + +export interface SourcesScimDestroyRequest { + slug: string; +} + +export interface SourcesScimGroupsCreateRequest { + sCIMSourceGroupRequest: SCIMSourceGroupRequest; +} + +export interface SourcesScimGroupsDestroyRequest { + id: string; +} + +export interface SourcesScimGroupsListRequest { + groupGroupUuid?: string; + groupName?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; +} + +export interface SourcesScimGroupsPartialUpdateRequest { + id: string; + patchedSCIMSourceGroupRequest?: PatchedSCIMSourceGroupRequest; +} + +export interface SourcesScimGroupsRetrieveRequest { + id: string; +} + +export interface SourcesScimGroupsUpdateRequest { + id: string; + sCIMSourceGroupRequest: SCIMSourceGroupRequest; +} + +export interface SourcesScimGroupsUsedByListRequest { + id: string; +} + +export interface SourcesScimListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + search?: string; + slug?: string; +} + +export interface SourcesScimPartialUpdateRequest { + slug: string; + patchedSCIMSourceRequest?: PatchedSCIMSourceRequest; +} + +export interface SourcesScimRetrieveRequest { + slug: string; +} + +export interface SourcesScimUpdateRequest { + slug: string; + sCIMSourceRequest: SCIMSourceRequest; +} + +export interface SourcesScimUsedByListRequest { + slug: string; +} + +export interface SourcesScimUsersCreateRequest { + sCIMSourceUserRequest: SCIMSourceUserRequest; +} + +export interface SourcesScimUsersDestroyRequest { + id: string; +} + +export interface SourcesScimUsersListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + userId?: number; + userUsername?: string; +} + +export interface SourcesScimUsersPartialUpdateRequest { + id: string; + patchedSCIMSourceUserRequest?: PatchedSCIMSourceUserRequest; +} + +export interface SourcesScimUsersRetrieveRequest { + id: string; +} + +export interface SourcesScimUsersUpdateRequest { + id: string; + sCIMSourceUserRequest: SCIMSourceUserRequest; +} + +export interface SourcesScimUsersUsedByListRequest { + id: string; +} + +export interface SourcesTelegramConnectUserCreateRequest { + slug: string; + telegramAuthRequest: TelegramAuthRequest; +} + +export interface SourcesTelegramCreateRequest { + telegramSourceRequest: TelegramSourceRequest; +} + +export interface SourcesTelegramDestroyRequest { + slug: string; +} + +export interface SourcesTelegramListRequest { + authenticationFlow?: string; + botUsername?: string; + enabled?: boolean; + enrollmentFlow?: string; + groupMatchingMode?: SourcesTelegramListGroupMatchingModeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + pbmUuid?: string; + policyEngineMode?: SourcesTelegramListPolicyEngineModeEnum; + requestMessageAccess?: boolean; + search?: string; + slug?: string; + userMatchingMode?: SourcesTelegramListUserMatchingModeEnum; +} + +export interface SourcesTelegramPartialUpdateRequest { + slug: string; + patchedTelegramSourceRequest?: PatchedTelegramSourceRequest; +} + +export interface SourcesTelegramRetrieveRequest { + slug: string; +} + +export interface SourcesTelegramUpdateRequest { + slug: string; + telegramSourceRequest: TelegramSourceRequest; +} + +export interface SourcesTelegramUsedByListRequest { + slug: string; +} + +export interface SourcesUserConnectionsAllDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsAllListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsAllPartialUpdateRequest { + id: number; + patchedUserSourceConnectionRequest?: PatchedUserSourceConnectionRequest; +} + +export interface SourcesUserConnectionsAllRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsAllUpdateRequest { + id: number; + userSourceConnectionRequest: UserSourceConnectionRequest; +} + +export interface SourcesUserConnectionsAllUsedByListRequest { + id: number; +} + +export interface SourcesUserConnectionsKerberosCreateRequest { + userKerberosSourceConnectionRequest: UserKerberosSourceConnectionRequest; +} + +export interface SourcesUserConnectionsKerberosDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsKerberosListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsKerberosPartialUpdateRequest { + id: number; + patchedUserKerberosSourceConnectionRequest?: PatchedUserKerberosSourceConnectionRequest; +} + +export interface SourcesUserConnectionsKerberosRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsKerberosUpdateRequest { + id: number; + userKerberosSourceConnectionRequest: UserKerberosSourceConnectionRequest; +} + +export interface SourcesUserConnectionsKerberosUsedByListRequest { + id: number; +} + +export interface SourcesUserConnectionsLdapCreateRequest { + userLDAPSourceConnectionRequest: UserLDAPSourceConnectionRequest; +} + +export interface SourcesUserConnectionsLdapDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsLdapListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsLdapPartialUpdateRequest { + id: number; + patchedUserLDAPSourceConnectionRequest?: PatchedUserLDAPSourceConnectionRequest; +} + +export interface SourcesUserConnectionsLdapRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsLdapUpdateRequest { + id: number; + userLDAPSourceConnectionRequest: UserLDAPSourceConnectionRequest; +} + +export interface SourcesUserConnectionsLdapUsedByListRequest { + id: number; +} + +export interface SourcesUserConnectionsOauthCreateRequest { + userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest; +} + +export interface SourcesUserConnectionsOauthDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsOauthListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsOauthPartialUpdateRequest { + id: number; + patchedUserOAuthSourceConnectionRequest?: PatchedUserOAuthSourceConnectionRequest; +} + +export interface SourcesUserConnectionsOauthRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsOauthUpdateRequest { + id: number; + userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest; +} + +export interface SourcesUserConnectionsOauthUsedByListRequest { + id: number; +} + +export interface SourcesUserConnectionsPlexCreateRequest { + userPlexSourceConnectionRequest: UserPlexSourceConnectionRequest; +} + +export interface SourcesUserConnectionsPlexDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsPlexListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsPlexPartialUpdateRequest { + id: number; + patchedUserPlexSourceConnectionRequest?: PatchedUserPlexSourceConnectionRequest; +} + +export interface SourcesUserConnectionsPlexRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsPlexUpdateRequest { + id: number; + userPlexSourceConnectionRequest: UserPlexSourceConnectionRequest; +} + +export interface SourcesUserConnectionsPlexUsedByListRequest { + id: number; +} + +export interface SourcesUserConnectionsSamlCreateRequest { + userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest; +} + +export interface SourcesUserConnectionsSamlDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsSamlListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsSamlPartialUpdateRequest { + id: number; + patchedUserSAMLSourceConnectionRequest?: PatchedUserSAMLSourceConnectionRequest; +} + +export interface SourcesUserConnectionsSamlRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsSamlUpdateRequest { + id: number; + userSAMLSourceConnectionRequest: UserSAMLSourceConnectionRequest; +} + +export interface SourcesUserConnectionsSamlUsedByListRequest { + id: number; +} + +export interface SourcesUserConnectionsTelegramCreateRequest { + userTelegramSourceConnectionRequest: UserTelegramSourceConnectionRequest; +} + +export interface SourcesUserConnectionsTelegramDestroyRequest { + id: number; +} + +export interface SourcesUserConnectionsTelegramListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + sourceSlug?: string; + user?: number; +} + +export interface SourcesUserConnectionsTelegramPartialUpdateRequest { + id: number; + patchedUserTelegramSourceConnectionRequest?: PatchedUserTelegramSourceConnectionRequest; +} + +export interface SourcesUserConnectionsTelegramRetrieveRequest { + id: number; +} + +export interface SourcesUserConnectionsTelegramUpdateRequest { + id: number; + userTelegramSourceConnectionRequest: UserTelegramSourceConnectionRequest; +} + +export interface SourcesUserConnectionsTelegramUsedByListRequest { + id: number; +} + +/** + * + */ +export class SourcesApi extends runtime.BaseAPI { + + /** + * Creates request options for sourcesAllDestroy without sending the request + */ + async sourcesAllDestroyRequestOpts(requestParameters: SourcesAllDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/all/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Prevent deletion of built-in sources + */ + async sourcesAllDestroyRaw(requestParameters: SourcesAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Prevent deletion of built-in sources + */ + async sourcesAllDestroy(requestParameters: SourcesAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesAllList without sending the request + */ + async sourcesAllListRequestOpts(requestParameters: SourcesAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async sourcesAllListRaw(requestParameters: SourcesAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSourceListFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesAllList(requestParameters: SourcesAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesAllRetrieve without sending the request + */ + async sourcesAllRetrieveRequestOpts(requestParameters: SourcesAllRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/all/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async sourcesAllRetrieveRaw(requestParameters: SourcesAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SourceFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesAllRetrieve(requestParameters: SourcesAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesAllTypesList without sending the request + */ + async sourcesAllTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/all/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async sourcesAllTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesAllTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async sourcesAllTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesAllTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesAllUsedByList without sending the request + */ + async sourcesAllUsedByListRequestOpts(requestParameters: SourcesAllUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/all/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesAllUsedByListRaw(requestParameters: SourcesAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesAllUsedByList(requestParameters: SourcesAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesAllUserSettingsList without sending the request + */ + async sourcesAllUserSettingsListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/all/user_settings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all sources the user can configure + */ + async sourcesAllUserSettingsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesAllUserSettingsListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserSettingFromJSON)); + } + + /** + * Get all sources the user can configure + */ + async sourcesAllUserSettingsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesAllUserSettingsListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsAllDestroy without sending the request + */ + async sourcesGroupConnectionsAllDestroyRequestOpts(requestParameters: SourcesGroupConnectionsAllDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllDestroyRaw(requestParameters: SourcesGroupConnectionsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllDestroy(requestParameters: SourcesGroupConnectionsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsAllList without sending the request + */ + async sourcesGroupConnectionsAllListRequestOpts(requestParameters: SourcesGroupConnectionsAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllListRaw(requestParameters: SourcesGroupConnectionsAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllList(requestParameters: SourcesGroupConnectionsAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsAllPartialUpdate without sending the request + */ + async sourcesGroupConnectionsAllPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsAllPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsAllPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupSourceConnectionRequestToJSON(requestParameters['patchedGroupSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllPartialUpdateRaw(requestParameters: SourcesGroupConnectionsAllPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsAllPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllPartialUpdate(requestParameters: SourcesGroupConnectionsAllPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsAllPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsAllRetrieve without sending the request + */ + async sourcesGroupConnectionsAllRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsAllRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllRetrieveRaw(requestParameters: SourcesGroupConnectionsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllRetrieve(requestParameters: SourcesGroupConnectionsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsAllUpdate without sending the request + */ + async sourcesGroupConnectionsAllUpdateRequestOpts(requestParameters: SourcesGroupConnectionsAllUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsAllUpdate().' + ); + } + + if (requestParameters['groupSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupSourceConnectionRequest', + 'Required parameter "groupSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsAllUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupSourceConnectionRequestToJSON(requestParameters['groupSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllUpdateRaw(requestParameters: SourcesGroupConnectionsAllUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsAllUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsAllUpdate(requestParameters: SourcesGroupConnectionsAllUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsAllUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsAllUsedByList without sending the request + */ + async sourcesGroupConnectionsAllUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsAllUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/all/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsAllUsedByListRaw(requestParameters: SourcesGroupConnectionsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsAllUsedByList(requestParameters: SourcesGroupConnectionsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosCreate without sending the request + */ + async sourcesGroupConnectionsKerberosCreateRequestOpts(requestParameters: SourcesGroupConnectionsKerberosCreateRequest): Promise { + if (requestParameters['groupKerberosSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupKerberosSourceConnectionRequest', + 'Required parameter "groupKerberosSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsKerberosCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupKerberosSourceConnectionRequestToJSON(requestParameters['groupKerberosSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosCreateRaw(requestParameters: SourcesGroupConnectionsKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsKerberosCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosCreate(requestParameters: SourcesGroupConnectionsKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsKerberosCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosDestroy without sending the request + */ + async sourcesGroupConnectionsKerberosDestroyRequestOpts(requestParameters: SourcesGroupConnectionsKerberosDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsKerberosDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosDestroyRaw(requestParameters: SourcesGroupConnectionsKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsKerberosDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosDestroy(requestParameters: SourcesGroupConnectionsKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsKerberosDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosList without sending the request + */ + async sourcesGroupConnectionsKerberosListRequestOpts(requestParameters: SourcesGroupConnectionsKerberosListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosListRaw(requestParameters: SourcesGroupConnectionsKerberosListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsKerberosListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupKerberosSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosList(requestParameters: SourcesGroupConnectionsKerberosListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsKerberosListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosPartialUpdate without sending the request + */ + async sourcesGroupConnectionsKerberosPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsKerberosPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsKerberosPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupKerberosSourceConnectionRequestToJSON(requestParameters['patchedGroupKerberosSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosPartialUpdateRaw(requestParameters: SourcesGroupConnectionsKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsKerberosPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosPartialUpdate(requestParameters: SourcesGroupConnectionsKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsKerberosPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosRetrieve without sending the request + */ + async sourcesGroupConnectionsKerberosRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsKerberosRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsKerberosRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosRetrieveRaw(requestParameters: SourcesGroupConnectionsKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsKerberosRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosRetrieve(requestParameters: SourcesGroupConnectionsKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsKerberosRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosUpdate without sending the request + */ + async sourcesGroupConnectionsKerberosUpdateRequestOpts(requestParameters: SourcesGroupConnectionsKerberosUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsKerberosUpdate().' + ); + } + + if (requestParameters['groupKerberosSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupKerberosSourceConnectionRequest', + 'Required parameter "groupKerberosSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsKerberosUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupKerberosSourceConnectionRequestToJSON(requestParameters['groupKerberosSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosUpdateRaw(requestParameters: SourcesGroupConnectionsKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsKerberosUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsKerberosUpdate(requestParameters: SourcesGroupConnectionsKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsKerberosUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsKerberosUsedByList without sending the request + */ + async sourcesGroupConnectionsKerberosUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsKerberosUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsKerberosUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/kerberos/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsKerberosUsedByListRaw(requestParameters: SourcesGroupConnectionsKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsKerberosUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsKerberosUsedByList(requestParameters: SourcesGroupConnectionsKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsKerberosUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapCreate without sending the request + */ + async sourcesGroupConnectionsLdapCreateRequestOpts(requestParameters: SourcesGroupConnectionsLdapCreateRequest): Promise { + if (requestParameters['groupLDAPSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupLDAPSourceConnectionRequest', + 'Required parameter "groupLDAPSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsLdapCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupLDAPSourceConnectionRequestToJSON(requestParameters['groupLDAPSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapCreateRaw(requestParameters: SourcesGroupConnectionsLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsLdapCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapCreate(requestParameters: SourcesGroupConnectionsLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsLdapCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapDestroy without sending the request + */ + async sourcesGroupConnectionsLdapDestroyRequestOpts(requestParameters: SourcesGroupConnectionsLdapDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsLdapDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapDestroyRaw(requestParameters: SourcesGroupConnectionsLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsLdapDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapDestroy(requestParameters: SourcesGroupConnectionsLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsLdapDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapList without sending the request + */ + async sourcesGroupConnectionsLdapListRequestOpts(requestParameters: SourcesGroupConnectionsLdapListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapListRaw(requestParameters: SourcesGroupConnectionsLdapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsLdapListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupLDAPSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapList(requestParameters: SourcesGroupConnectionsLdapListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsLdapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapPartialUpdate without sending the request + */ + async sourcesGroupConnectionsLdapPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsLdapPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsLdapPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupLDAPSourceConnectionRequestToJSON(requestParameters['patchedGroupLDAPSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapPartialUpdateRaw(requestParameters: SourcesGroupConnectionsLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsLdapPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapPartialUpdate(requestParameters: SourcesGroupConnectionsLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsLdapPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapRetrieve without sending the request + */ + async sourcesGroupConnectionsLdapRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsLdapRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsLdapRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapRetrieveRaw(requestParameters: SourcesGroupConnectionsLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsLdapRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapRetrieve(requestParameters: SourcesGroupConnectionsLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsLdapRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapUpdate without sending the request + */ + async sourcesGroupConnectionsLdapUpdateRequestOpts(requestParameters: SourcesGroupConnectionsLdapUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsLdapUpdate().' + ); + } + + if (requestParameters['groupLDAPSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupLDAPSourceConnectionRequest', + 'Required parameter "groupLDAPSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsLdapUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupLDAPSourceConnectionRequestToJSON(requestParameters['groupLDAPSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapUpdateRaw(requestParameters: SourcesGroupConnectionsLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsLdapUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsLdapUpdate(requestParameters: SourcesGroupConnectionsLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsLdapUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsLdapUsedByList without sending the request + */ + async sourcesGroupConnectionsLdapUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsLdapUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsLdapUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/ldap/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsLdapUsedByListRaw(requestParameters: SourcesGroupConnectionsLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsLdapUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsLdapUsedByList(requestParameters: SourcesGroupConnectionsLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsLdapUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthCreate without sending the request + */ + async sourcesGroupConnectionsOauthCreateRequestOpts(requestParameters: SourcesGroupConnectionsOauthCreateRequest): Promise { + if (requestParameters['groupOAuthSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupOAuthSourceConnectionRequest', + 'Required parameter "groupOAuthSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsOauthCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupOAuthSourceConnectionRequestToJSON(requestParameters['groupOAuthSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthCreateRaw(requestParameters: SourcesGroupConnectionsOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsOauthCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthCreate(requestParameters: SourcesGroupConnectionsOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsOauthCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthDestroy without sending the request + */ + async sourcesGroupConnectionsOauthDestroyRequestOpts(requestParameters: SourcesGroupConnectionsOauthDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsOauthDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthDestroyRaw(requestParameters: SourcesGroupConnectionsOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsOauthDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthDestroy(requestParameters: SourcesGroupConnectionsOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsOauthDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthList without sending the request + */ + async sourcesGroupConnectionsOauthListRequestOpts(requestParameters: SourcesGroupConnectionsOauthListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthListRaw(requestParameters: SourcesGroupConnectionsOauthListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsOauthListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupOAuthSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthList(requestParameters: SourcesGroupConnectionsOauthListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsOauthListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthPartialUpdate without sending the request + */ + async sourcesGroupConnectionsOauthPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsOauthPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsOauthPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupOAuthSourceConnectionRequestToJSON(requestParameters['patchedGroupOAuthSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthPartialUpdateRaw(requestParameters: SourcesGroupConnectionsOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsOauthPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthPartialUpdate(requestParameters: SourcesGroupConnectionsOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsOauthPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthRetrieve without sending the request + */ + async sourcesGroupConnectionsOauthRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsOauthRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsOauthRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthRetrieveRaw(requestParameters: SourcesGroupConnectionsOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsOauthRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthRetrieve(requestParameters: SourcesGroupConnectionsOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsOauthRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthUpdate without sending the request + */ + async sourcesGroupConnectionsOauthUpdateRequestOpts(requestParameters: SourcesGroupConnectionsOauthUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsOauthUpdate().' + ); + } + + if (requestParameters['groupOAuthSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupOAuthSourceConnectionRequest', + 'Required parameter "groupOAuthSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsOauthUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupOAuthSourceConnectionRequestToJSON(requestParameters['groupOAuthSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthUpdateRaw(requestParameters: SourcesGroupConnectionsOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsOauthUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsOauthUpdate(requestParameters: SourcesGroupConnectionsOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsOauthUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsOauthUsedByList without sending the request + */ + async sourcesGroupConnectionsOauthUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsOauthUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsOauthUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/oauth/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsOauthUsedByListRaw(requestParameters: SourcesGroupConnectionsOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsOauthUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsOauthUsedByList(requestParameters: SourcesGroupConnectionsOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsOauthUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexCreate without sending the request + */ + async sourcesGroupConnectionsPlexCreateRequestOpts(requestParameters: SourcesGroupConnectionsPlexCreateRequest): Promise { + if (requestParameters['groupPlexSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupPlexSourceConnectionRequest', + 'Required parameter "groupPlexSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsPlexCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupPlexSourceConnectionRequestToJSON(requestParameters['groupPlexSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexCreateRaw(requestParameters: SourcesGroupConnectionsPlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsPlexCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexCreate(requestParameters: SourcesGroupConnectionsPlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsPlexCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexDestroy without sending the request + */ + async sourcesGroupConnectionsPlexDestroyRequestOpts(requestParameters: SourcesGroupConnectionsPlexDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsPlexDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexDestroyRaw(requestParameters: SourcesGroupConnectionsPlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsPlexDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexDestroy(requestParameters: SourcesGroupConnectionsPlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsPlexDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexList without sending the request + */ + async sourcesGroupConnectionsPlexListRequestOpts(requestParameters: SourcesGroupConnectionsPlexListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexListRaw(requestParameters: SourcesGroupConnectionsPlexListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsPlexListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupPlexSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexList(requestParameters: SourcesGroupConnectionsPlexListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsPlexListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexPartialUpdate without sending the request + */ + async sourcesGroupConnectionsPlexPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsPlexPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsPlexPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupPlexSourceConnectionRequestToJSON(requestParameters['patchedGroupPlexSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexPartialUpdateRaw(requestParameters: SourcesGroupConnectionsPlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsPlexPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexPartialUpdate(requestParameters: SourcesGroupConnectionsPlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsPlexPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexRetrieve without sending the request + */ + async sourcesGroupConnectionsPlexRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsPlexRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsPlexRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexRetrieveRaw(requestParameters: SourcesGroupConnectionsPlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsPlexRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexRetrieve(requestParameters: SourcesGroupConnectionsPlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsPlexRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexUpdate without sending the request + */ + async sourcesGroupConnectionsPlexUpdateRequestOpts(requestParameters: SourcesGroupConnectionsPlexUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsPlexUpdate().' + ); + } + + if (requestParameters['groupPlexSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupPlexSourceConnectionRequest', + 'Required parameter "groupPlexSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsPlexUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupPlexSourceConnectionRequestToJSON(requestParameters['groupPlexSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexUpdateRaw(requestParameters: SourcesGroupConnectionsPlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsPlexUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsPlexUpdate(requestParameters: SourcesGroupConnectionsPlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsPlexUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsPlexUsedByList without sending the request + */ + async sourcesGroupConnectionsPlexUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsPlexUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsPlexUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/plex/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsPlexUsedByListRaw(requestParameters: SourcesGroupConnectionsPlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsPlexUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsPlexUsedByList(requestParameters: SourcesGroupConnectionsPlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsPlexUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlCreate without sending the request + */ + async sourcesGroupConnectionsSamlCreateRequestOpts(requestParameters: SourcesGroupConnectionsSamlCreateRequest): Promise { + if (requestParameters['groupSAMLSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupSAMLSourceConnectionRequest', + 'Required parameter "groupSAMLSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsSamlCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupSAMLSourceConnectionRequestToJSON(requestParameters['groupSAMLSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlCreateRaw(requestParameters: SourcesGroupConnectionsSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsSamlCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlCreate(requestParameters: SourcesGroupConnectionsSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsSamlCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlDestroy without sending the request + */ + async sourcesGroupConnectionsSamlDestroyRequestOpts(requestParameters: SourcesGroupConnectionsSamlDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsSamlDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlDestroyRaw(requestParameters: SourcesGroupConnectionsSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsSamlDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlDestroy(requestParameters: SourcesGroupConnectionsSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsSamlDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlList without sending the request + */ + async sourcesGroupConnectionsSamlListRequestOpts(requestParameters: SourcesGroupConnectionsSamlListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlListRaw(requestParameters: SourcesGroupConnectionsSamlListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsSamlListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupSAMLSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlList(requestParameters: SourcesGroupConnectionsSamlListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsSamlListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlPartialUpdate without sending the request + */ + async sourcesGroupConnectionsSamlPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsSamlPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsSamlPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupSAMLSourceConnectionRequestToJSON(requestParameters['patchedGroupSAMLSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlPartialUpdateRaw(requestParameters: SourcesGroupConnectionsSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsSamlPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlPartialUpdate(requestParameters: SourcesGroupConnectionsSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsSamlPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlRetrieve without sending the request + */ + async sourcesGroupConnectionsSamlRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsSamlRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsSamlRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlRetrieveRaw(requestParameters: SourcesGroupConnectionsSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsSamlRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlRetrieve(requestParameters: SourcesGroupConnectionsSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsSamlRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlUpdate without sending the request + */ + async sourcesGroupConnectionsSamlUpdateRequestOpts(requestParameters: SourcesGroupConnectionsSamlUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsSamlUpdate().' + ); + } + + if (requestParameters['groupSAMLSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupSAMLSourceConnectionRequest', + 'Required parameter "groupSAMLSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsSamlUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupSAMLSourceConnectionRequestToJSON(requestParameters['groupSAMLSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlUpdateRaw(requestParameters: SourcesGroupConnectionsSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsSamlUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsSamlUpdate(requestParameters: SourcesGroupConnectionsSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsSamlUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsSamlUsedByList without sending the request + */ + async sourcesGroupConnectionsSamlUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsSamlUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsSamlUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/saml/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsSamlUsedByListRaw(requestParameters: SourcesGroupConnectionsSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsSamlUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsSamlUsedByList(requestParameters: SourcesGroupConnectionsSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsSamlUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramCreate without sending the request + */ + async sourcesGroupConnectionsTelegramCreateRequestOpts(requestParameters: SourcesGroupConnectionsTelegramCreateRequest): Promise { + if (requestParameters['groupTelegramSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupTelegramSourceConnectionRequest', + 'Required parameter "groupTelegramSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsTelegramCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupTelegramSourceConnectionRequestToJSON(requestParameters['groupTelegramSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramCreateRaw(requestParameters: SourcesGroupConnectionsTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsTelegramCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramCreate(requestParameters: SourcesGroupConnectionsTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsTelegramCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramDestroy without sending the request + */ + async sourcesGroupConnectionsTelegramDestroyRequestOpts(requestParameters: SourcesGroupConnectionsTelegramDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsTelegramDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramDestroyRaw(requestParameters: SourcesGroupConnectionsTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsTelegramDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramDestroy(requestParameters: SourcesGroupConnectionsTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesGroupConnectionsTelegramDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramList without sending the request + */ + async sourcesGroupConnectionsTelegramListRequestOpts(requestParameters: SourcesGroupConnectionsTelegramListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['group'] != null) { + queryParameters['group'] = requestParameters['group']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramListRaw(requestParameters: SourcesGroupConnectionsTelegramListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsTelegramListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGroupTelegramSourceConnectionListFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramList(requestParameters: SourcesGroupConnectionsTelegramListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsTelegramListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramPartialUpdate without sending the request + */ + async sourcesGroupConnectionsTelegramPartialUpdateRequestOpts(requestParameters: SourcesGroupConnectionsTelegramPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsTelegramPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedGroupTelegramSourceConnectionRequestToJSON(requestParameters['patchedGroupTelegramSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramPartialUpdateRaw(requestParameters: SourcesGroupConnectionsTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsTelegramPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramPartialUpdate(requestParameters: SourcesGroupConnectionsTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsTelegramPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramRetrieve without sending the request + */ + async sourcesGroupConnectionsTelegramRetrieveRequestOpts(requestParameters: SourcesGroupConnectionsTelegramRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsTelegramRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramRetrieveRaw(requestParameters: SourcesGroupConnectionsTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsTelegramRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramRetrieve(requestParameters: SourcesGroupConnectionsTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsTelegramRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramUpdate without sending the request + */ + async sourcesGroupConnectionsTelegramUpdateRequestOpts(requestParameters: SourcesGroupConnectionsTelegramUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsTelegramUpdate().' + ); + } + + if (requestParameters['groupTelegramSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'groupTelegramSourceConnectionRequest', + 'Required parameter "groupTelegramSourceConnectionRequest" was null or undefined when calling sourcesGroupConnectionsTelegramUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupTelegramSourceConnectionRequestToJSON(requestParameters['groupTelegramSourceConnectionRequest']), + }; + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramUpdateRaw(requestParameters: SourcesGroupConnectionsTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesGroupConnectionsTelegramUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * Group-source connection Viewset + */ + async sourcesGroupConnectionsTelegramUpdate(requestParameters: SourcesGroupConnectionsTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesGroupConnectionsTelegramUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesGroupConnectionsTelegramUsedByList without sending the request + */ + async sourcesGroupConnectionsTelegramUsedByListRequestOpts(requestParameters: SourcesGroupConnectionsTelegramUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesGroupConnectionsTelegramUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/group_connections/telegram/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsTelegramUsedByListRaw(requestParameters: SourcesGroupConnectionsTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesGroupConnectionsTelegramUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesGroupConnectionsTelegramUsedByList(requestParameters: SourcesGroupConnectionsTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesGroupConnectionsTelegramUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosCreate without sending the request + */ + async sourcesKerberosCreateRequestOpts(requestParameters: SourcesKerberosCreateRequest): Promise { + if (requestParameters['kerberosSourceRequest'] == null) { + throw new runtime.RequiredError( + 'kerberosSourceRequest', + 'Required parameter "kerberosSourceRequest" was null or undefined when calling sourcesKerberosCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: KerberosSourceRequestToJSON(requestParameters['kerberosSourceRequest']), + }; + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosCreateRaw(requestParameters: SourcesKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourceFromJSON(jsonValue)); + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosCreate(requestParameters: SourcesKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesKerberosCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosDestroy without sending the request + */ + async sourcesKerberosDestroyRequestOpts(requestParameters: SourcesKerberosDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesKerberosDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosDestroyRaw(requestParameters: SourcesKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosDestroy(requestParameters: SourcesKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesKerberosDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesKerberosList without sending the request + */ + async sourcesKerberosListRequestOpts(requestParameters: SourcesKerberosListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['kadminType'] != null) { + queryParameters['kadmin_type'] = requestParameters['kadminType']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['passwordLoginUpdateInternalPassword'] != null) { + queryParameters['password_login_update_internal_password'] = requestParameters['passwordLoginUpdateInternalPassword']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['realm'] != null) { + queryParameters['realm'] = requestParameters['realm']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['spnegoServerName'] != null) { + queryParameters['spnego_server_name'] = requestParameters['spnegoServerName']; + } + + if (requestParameters['syncPrincipal'] != null) { + queryParameters['sync_principal'] = requestParameters['syncPrincipal']; + } + + if (requestParameters['syncUsers'] != null) { + queryParameters['sync_users'] = requestParameters['syncUsers']; + } + + if (requestParameters['syncUsersPassword'] != null) { + queryParameters['sync_users_password'] = requestParameters['syncUsersPassword']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosListRaw(requestParameters: SourcesKerberosListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedKerberosSourceListFromJSON(jsonValue)); + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosList(requestParameters: SourcesKerberosListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesKerberosListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosPartialUpdate without sending the request + */ + async sourcesKerberosPartialUpdateRequestOpts(requestParameters: SourcesKerberosPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesKerberosPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedKerberosSourceRequestToJSON(requestParameters['patchedKerberosSourceRequest']), + }; + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosPartialUpdateRaw(requestParameters: SourcesKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourceFromJSON(jsonValue)); + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosPartialUpdate(requestParameters: SourcesKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesKerberosPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosRetrieve without sending the request + */ + async sourcesKerberosRetrieveRequestOpts(requestParameters: SourcesKerberosRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesKerberosRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosRetrieveRaw(requestParameters: SourcesKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourceFromJSON(jsonValue)); + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosRetrieve(requestParameters: SourcesKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesKerberosRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosSyncStatusRetrieve without sending the request + */ + async sourcesKerberosSyncStatusRetrieveRequestOpts(requestParameters: SourcesKerberosSyncStatusRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesKerberosSyncStatusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/{slug}/sync/status/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get provider\'s sync status + */ + async sourcesKerberosSyncStatusRetrieveRaw(requestParameters: SourcesKerberosSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosSyncStatusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncStatusFromJSON(jsonValue)); + } + + /** + * Get provider\'s sync status + */ + async sourcesKerberosSyncStatusRetrieve(requestParameters: SourcesKerberosSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesKerberosSyncStatusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosUpdate without sending the request + */ + async sourcesKerberosUpdateRequestOpts(requestParameters: SourcesKerberosUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesKerberosUpdate().' + ); + } + + if (requestParameters['kerberosSourceRequest'] == null) { + throw new runtime.RequiredError( + 'kerberosSourceRequest', + 'Required parameter "kerberosSourceRequest" was null or undefined when calling sourcesKerberosUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: KerberosSourceRequestToJSON(requestParameters['kerberosSourceRequest']), + }; + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosUpdateRaw(requestParameters: SourcesKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesKerberosUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KerberosSourceFromJSON(jsonValue)); + } + + /** + * Kerberos Source Viewset + */ + async sourcesKerberosUpdate(requestParameters: SourcesKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesKerberosUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesKerberosUsedByList without sending the request + */ + async sourcesKerberosUsedByListRequestOpts(requestParameters: SourcesKerberosUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesKerberosUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/kerberos/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesKerberosUsedByListRaw(requestParameters: SourcesKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesKerberosUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesKerberosUsedByList(requestParameters: SourcesKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesKerberosUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapCreate without sending the request + */ + async sourcesLdapCreateRequestOpts(requestParameters: SourcesLdapCreateRequest): Promise { + if (requestParameters['lDAPSourceRequest'] == null) { + throw new runtime.RequiredError( + 'lDAPSourceRequest', + 'Required parameter "lDAPSourceRequest" was null or undefined when calling sourcesLdapCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LDAPSourceRequestToJSON(requestParameters['lDAPSourceRequest']), + }; + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapCreateRaw(requestParameters: SourcesLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourceFromJSON(jsonValue)); + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapCreate(requestParameters: SourcesLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapDebugRetrieve without sending the request + */ + async sourcesLdapDebugRetrieveRequestOpts(requestParameters: SourcesLdapDebugRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapDebugRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/debug/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get raw LDAP data to debug + */ + async sourcesLdapDebugRetrieveRaw(requestParameters: SourcesLdapDebugRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapDebugRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPDebugFromJSON(jsonValue)); + } + + /** + * Get raw LDAP data to debug + */ + async sourcesLdapDebugRetrieve(requestParameters: SourcesLdapDebugRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapDebugRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapDestroy without sending the request + */ + async sourcesLdapDestroyRequestOpts(requestParameters: SourcesLdapDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapDestroyRaw(requestParameters: SourcesLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapDestroy(requestParameters: SourcesLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesLdapDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesLdapList without sending the request + */ + async sourcesLdapListRequestOpts(requestParameters: SourcesLdapListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['additionalGroupDn'] != null) { + queryParameters['additional_group_dn'] = requestParameters['additionalGroupDn']; + } + + if (requestParameters['additionalUserDn'] != null) { + queryParameters['additional_user_dn'] = requestParameters['additionalUserDn']; + } + + if (requestParameters['baseDn'] != null) { + queryParameters['base_dn'] = requestParameters['baseDn']; + } + + if (requestParameters['bindCn'] != null) { + queryParameters['bind_cn'] = requestParameters['bindCn']; + } + + if (requestParameters['clientCertificate'] != null) { + queryParameters['client_certificate'] = requestParameters['clientCertificate']; + } + + if (requestParameters['deleteNotFoundObjects'] != null) { + queryParameters['delete_not_found_objects'] = requestParameters['deleteNotFoundObjects']; + } + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['groupMembershipField'] != null) { + queryParameters['group_membership_field'] = requestParameters['groupMembershipField']; + } + + if (requestParameters['groupObjectFilter'] != null) { + queryParameters['group_object_filter'] = requestParameters['groupObjectFilter']; + } + + if (requestParameters['groupPropertyMappings'] != null) { + queryParameters['group_property_mappings'] = requestParameters['groupPropertyMappings']; + } + + if (requestParameters['lookupGroupsFromUser'] != null) { + queryParameters['lookup_groups_from_user'] = requestParameters['lookupGroupsFromUser']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['objectUniquenessField'] != null) { + queryParameters['object_uniqueness_field'] = requestParameters['objectUniquenessField']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['passwordLoginUpdateInternalPassword'] != null) { + queryParameters['password_login_update_internal_password'] = requestParameters['passwordLoginUpdateInternalPassword']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['peerCertificate'] != null) { + queryParameters['peer_certificate'] = requestParameters['peerCertificate']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['serverUri'] != null) { + queryParameters['server_uri'] = requestParameters['serverUri']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['sni'] != null) { + queryParameters['sni'] = requestParameters['sni']; + } + + if (requestParameters['startTls'] != null) { + queryParameters['start_tls'] = requestParameters['startTls']; + } + + if (requestParameters['syncGroups'] != null) { + queryParameters['sync_groups'] = requestParameters['syncGroups']; + } + + if (requestParameters['syncParentGroup'] != null) { + queryParameters['sync_parent_group'] = requestParameters['syncParentGroup']; + } + + if (requestParameters['syncUsers'] != null) { + queryParameters['sync_users'] = requestParameters['syncUsers']; + } + + if (requestParameters['syncUsersPassword'] != null) { + queryParameters['sync_users_password'] = requestParameters['syncUsersPassword']; + } + + if (requestParameters['userMembershipAttribute'] != null) { + queryParameters['user_membership_attribute'] = requestParameters['userMembershipAttribute']; + } + + if (requestParameters['userObjectFilter'] != null) { + queryParameters['user_object_filter'] = requestParameters['userObjectFilter']; + } + + if (requestParameters['userPropertyMappings'] != null) { + queryParameters['user_property_mappings'] = requestParameters['userPropertyMappings']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapListRaw(requestParameters: SourcesLdapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedLDAPSourceListFromJSON(jsonValue)); + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapList(requestParameters: SourcesLdapListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapPartialUpdate without sending the request + */ + async sourcesLdapPartialUpdateRequestOpts(requestParameters: SourcesLdapPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedLDAPSourceRequestToJSON(requestParameters['patchedLDAPSourceRequest']), + }; + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapPartialUpdateRaw(requestParameters: SourcesLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourceFromJSON(jsonValue)); + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapPartialUpdate(requestParameters: SourcesLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapRetrieve without sending the request + */ + async sourcesLdapRetrieveRequestOpts(requestParameters: SourcesLdapRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapRetrieveRaw(requestParameters: SourcesLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourceFromJSON(jsonValue)); + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapRetrieve(requestParameters: SourcesLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapSyncStatusRetrieve without sending the request + */ + async sourcesLdapSyncStatusRetrieveRequestOpts(requestParameters: SourcesLdapSyncStatusRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapSyncStatusRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/sync/status/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get provider\'s sync status + */ + async sourcesLdapSyncStatusRetrieveRaw(requestParameters: SourcesLdapSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapSyncStatusRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SyncStatusFromJSON(jsonValue)); + } + + /** + * Get provider\'s sync status + */ + async sourcesLdapSyncStatusRetrieve(requestParameters: SourcesLdapSyncStatusRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapSyncStatusRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapUpdate without sending the request + */ + async sourcesLdapUpdateRequestOpts(requestParameters: SourcesLdapUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapUpdate().' + ); + } + + if (requestParameters['lDAPSourceRequest'] == null) { + throw new runtime.RequiredError( + 'lDAPSourceRequest', + 'Required parameter "lDAPSourceRequest" was null or undefined when calling sourcesLdapUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: LDAPSourceRequestToJSON(requestParameters['lDAPSourceRequest']), + }; + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapUpdateRaw(requestParameters: SourcesLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesLdapUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LDAPSourceFromJSON(jsonValue)); + } + + /** + * LDAP Source Viewset + */ + async sourcesLdapUpdate(requestParameters: SourcesLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesLdapUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesLdapUsedByList without sending the request + */ + async sourcesLdapUsedByListRequestOpts(requestParameters: SourcesLdapUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesLdapUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/ldap/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesLdapUsedByListRaw(requestParameters: SourcesLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesLdapUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesLdapUsedByList(requestParameters: SourcesLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesLdapUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthCreate without sending the request + */ + async sourcesOauthCreateRequestOpts(requestParameters: SourcesOauthCreateRequest): Promise { + if (requestParameters['oAuthSourceRequest'] == null) { + throw new runtime.RequiredError( + 'oAuthSourceRequest', + 'Required parameter "oAuthSourceRequest" was null or undefined when calling sourcesOauthCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OAuthSourceRequestToJSON(requestParameters['oAuthSourceRequest']), + }; + } + + /** + * Source Viewset + */ + async sourcesOauthCreateRaw(requestParameters: SourcesOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesOauthCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourceFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesOauthCreate(requestParameters: SourcesOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesOauthCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthDestroy without sending the request + */ + async sourcesOauthDestroyRequestOpts(requestParameters: SourcesOauthDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesOauthDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async sourcesOauthDestroyRaw(requestParameters: SourcesOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesOauthDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Source Viewset + */ + async sourcesOauthDestroy(requestParameters: SourcesOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesOauthDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesOauthList without sending the request + */ + async sourcesOauthListRequestOpts(requestParameters: SourcesOauthListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['accessTokenUrl'] != null) { + queryParameters['access_token_url'] = requestParameters['accessTokenUrl']; + } + + if (requestParameters['additionalScopes'] != null) { + queryParameters['additional_scopes'] = requestParameters['additionalScopes']; + } + + if (requestParameters['authenticationFlow'] != null) { + queryParameters['authentication_flow'] = requestParameters['authenticationFlow']; + } + + if (requestParameters['authorizationUrl'] != null) { + queryParameters['authorization_url'] = requestParameters['authorizationUrl']; + } + + if (requestParameters['consumerKey'] != null) { + queryParameters['consumer_key'] = requestParameters['consumerKey']; + } + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['enrollmentFlow'] != null) { + queryParameters['enrollment_flow'] = requestParameters['enrollmentFlow']; + } + + if (requestParameters['groupMatchingMode'] != null) { + queryParameters['group_matching_mode'] = requestParameters['groupMatchingMode']; + } + + if (requestParameters['hasJwks'] != null) { + queryParameters['has_jwks'] = requestParameters['hasJwks']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['policyEngineMode'] != null) { + queryParameters['policy_engine_mode'] = requestParameters['policyEngineMode']; + } + + if (requestParameters['profileUrl'] != null) { + queryParameters['profile_url'] = requestParameters['profileUrl']; + } + + if (requestParameters['providerType'] != null) { + queryParameters['provider_type'] = requestParameters['providerType']; + } + + if (requestParameters['requestTokenUrl'] != null) { + queryParameters['request_token_url'] = requestParameters['requestTokenUrl']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['userMatchingMode'] != null) { + queryParameters['user_matching_mode'] = requestParameters['userMatchingMode']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async sourcesOauthListRaw(requestParameters: SourcesOauthListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesOauthListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOAuthSourceListFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesOauthList(requestParameters: SourcesOauthListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesOauthListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthPartialUpdate without sending the request + */ + async sourcesOauthPartialUpdateRequestOpts(requestParameters: SourcesOauthPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesOauthPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedOAuthSourceRequestToJSON(requestParameters['patchedOAuthSourceRequest']), + }; + } + + /** + * Source Viewset + */ + async sourcesOauthPartialUpdateRaw(requestParameters: SourcesOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesOauthPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourceFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesOauthPartialUpdate(requestParameters: SourcesOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesOauthPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthRetrieve without sending the request + */ + async sourcesOauthRetrieveRequestOpts(requestParameters: SourcesOauthRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesOauthRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Source Viewset + */ + async sourcesOauthRetrieveRaw(requestParameters: SourcesOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesOauthRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourceFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesOauthRetrieve(requestParameters: SourcesOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesOauthRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthSourceTypesList without sending the request + */ + async sourcesOauthSourceTypesListRequestOpts(requestParameters: SourcesOauthSourceTypesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/source_types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable source types. If ?name is set, only returns the type for . If isn\'t found, returns the default type. + */ + async sourcesOauthSourceTypesListRaw(requestParameters: SourcesOauthSourceTypesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesOauthSourceTypesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SourceTypeFromJSON)); + } + + /** + * Get all creatable source types. If ?name is set, only returns the type for . If isn\'t found, returns the default type. + */ + async sourcesOauthSourceTypesList(requestParameters: SourcesOauthSourceTypesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesOauthSourceTypesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthUpdate without sending the request + */ + async sourcesOauthUpdateRequestOpts(requestParameters: SourcesOauthUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesOauthUpdate().' + ); + } + + if (requestParameters['oAuthSourceRequest'] == null) { + throw new runtime.RequiredError( + 'oAuthSourceRequest', + 'Required parameter "oAuthSourceRequest" was null or undefined when calling sourcesOauthUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: OAuthSourceRequestToJSON(requestParameters['oAuthSourceRequest']), + }; + } + + /** + * Source Viewset + */ + async sourcesOauthUpdateRaw(requestParameters: SourcesOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesOauthUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OAuthSourceFromJSON(jsonValue)); + } + + /** + * Source Viewset + */ + async sourcesOauthUpdate(requestParameters: SourcesOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesOauthUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesOauthUsedByList without sending the request + */ + async sourcesOauthUsedByListRequestOpts(requestParameters: SourcesOauthUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesOauthUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/oauth/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesOauthUsedByListRaw(requestParameters: SourcesOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesOauthUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesOauthUsedByList(requestParameters: SourcesOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesOauthUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexCreate without sending the request + */ + async sourcesPlexCreateRequestOpts(requestParameters: SourcesPlexCreateRequest): Promise { + if (requestParameters['plexSourceRequest'] == null) { + throw new runtime.RequiredError( + 'plexSourceRequest', + 'Required parameter "plexSourceRequest" was null or undefined when calling sourcesPlexCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PlexSourceRequestToJSON(requestParameters['plexSourceRequest']), + }; + } + + /** + * Plex source Viewset + */ + async sourcesPlexCreateRaw(requestParameters: SourcesPlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourceFromJSON(jsonValue)); + } + + /** + * Plex source Viewset + */ + async sourcesPlexCreate(requestParameters: SourcesPlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesPlexCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexDestroy without sending the request + */ + async sourcesPlexDestroyRequestOpts(requestParameters: SourcesPlexDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesPlexDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Plex source Viewset + */ + async sourcesPlexDestroyRaw(requestParameters: SourcesPlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Plex source Viewset + */ + async sourcesPlexDestroy(requestParameters: SourcesPlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesPlexDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesPlexList without sending the request + */ + async sourcesPlexListRequestOpts(requestParameters: SourcesPlexListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['allowFriends'] != null) { + queryParameters['allow_friends'] = requestParameters['allowFriends']; + } + + if (requestParameters['authenticationFlow'] != null) { + queryParameters['authentication_flow'] = requestParameters['authenticationFlow']; + } + + if (requestParameters['clientId'] != null) { + queryParameters['client_id'] = requestParameters['clientId']; + } + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['enrollmentFlow'] != null) { + queryParameters['enrollment_flow'] = requestParameters['enrollmentFlow']; + } + + if (requestParameters['groupMatchingMode'] != null) { + queryParameters['group_matching_mode'] = requestParameters['groupMatchingMode']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['policyEngineMode'] != null) { + queryParameters['policy_engine_mode'] = requestParameters['policyEngineMode']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['userMatchingMode'] != null) { + queryParameters['user_matching_mode'] = requestParameters['userMatchingMode']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Plex source Viewset + */ + async sourcesPlexListRaw(requestParameters: SourcesPlexListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPlexSourceListFromJSON(jsonValue)); + } + + /** + * Plex source Viewset + */ + async sourcesPlexList(requestParameters: SourcesPlexListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesPlexListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexPartialUpdate without sending the request + */ + async sourcesPlexPartialUpdateRequestOpts(requestParameters: SourcesPlexPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesPlexPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPlexSourceRequestToJSON(requestParameters['patchedPlexSourceRequest']), + }; + } + + /** + * Plex source Viewset + */ + async sourcesPlexPartialUpdateRaw(requestParameters: SourcesPlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourceFromJSON(jsonValue)); + } + + /** + * Plex source Viewset + */ + async sourcesPlexPartialUpdate(requestParameters: SourcesPlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesPlexPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexRedeemTokenAuthenticatedCreate without sending the request + */ + async sourcesPlexRedeemTokenAuthenticatedCreateRequestOpts(requestParameters: SourcesPlexRedeemTokenAuthenticatedCreateRequest): Promise { + if (requestParameters['plexTokenRedeemRequest'] == null) { + throw new runtime.RequiredError( + 'plexTokenRedeemRequest', + 'Required parameter "plexTokenRedeemRequest" was null or undefined when calling sourcesPlexRedeemTokenAuthenticatedCreate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/redeem_token_authenticated/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PlexTokenRedeemRequestToJSON(requestParameters['plexTokenRedeemRequest']), + }; + } + + /** + * Redeem a plex token for an authenticated user, creating a connection + */ + async sourcesPlexRedeemTokenAuthenticatedCreateRaw(requestParameters: SourcesPlexRedeemTokenAuthenticatedCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexRedeemTokenAuthenticatedCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Redeem a plex token for an authenticated user, creating a connection + */ + async sourcesPlexRedeemTokenAuthenticatedCreate(requestParameters: SourcesPlexRedeemTokenAuthenticatedCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesPlexRedeemTokenAuthenticatedCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesPlexRedeemTokenCreate without sending the request + */ + async sourcesPlexRedeemTokenCreateRequestOpts(requestParameters: SourcesPlexRedeemTokenCreateRequest): Promise { + if (requestParameters['plexTokenRedeemRequest'] == null) { + throw new runtime.RequiredError( + 'plexTokenRedeemRequest', + 'Required parameter "plexTokenRedeemRequest" was null or undefined when calling sourcesPlexRedeemTokenCreate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/redeem_token/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PlexTokenRedeemRequestToJSON(requestParameters['plexTokenRedeemRequest']), + }; + } + + /** + * Redeem a plex token, check it\'s access to resources against what\'s allowed for the source, and redirect to an authentication/enrollment flow. + */ + async sourcesPlexRedeemTokenCreateRaw(requestParameters: SourcesPlexRedeemTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexRedeemTokenCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RedirectChallengeFromJSON(jsonValue)); + } + + /** + * Redeem a plex token, check it\'s access to resources against what\'s allowed for the source, and redirect to an authentication/enrollment flow. + */ + async sourcesPlexRedeemTokenCreate(requestParameters: SourcesPlexRedeemTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesPlexRedeemTokenCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexRetrieve without sending the request + */ + async sourcesPlexRetrieveRequestOpts(requestParameters: SourcesPlexRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesPlexRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Plex source Viewset + */ + async sourcesPlexRetrieveRaw(requestParameters: SourcesPlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourceFromJSON(jsonValue)); + } + + /** + * Plex source Viewset + */ + async sourcesPlexRetrieve(requestParameters: SourcesPlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesPlexRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexUpdate without sending the request + */ + async sourcesPlexUpdateRequestOpts(requestParameters: SourcesPlexUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesPlexUpdate().' + ); + } + + if (requestParameters['plexSourceRequest'] == null) { + throw new runtime.RequiredError( + 'plexSourceRequest', + 'Required parameter "plexSourceRequest" was null or undefined when calling sourcesPlexUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PlexSourceRequestToJSON(requestParameters['plexSourceRequest']), + }; + } + + /** + * Plex source Viewset + */ + async sourcesPlexUpdateRaw(requestParameters: SourcesPlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesPlexUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourceFromJSON(jsonValue)); + } + + /** + * Plex source Viewset + */ + async sourcesPlexUpdate(requestParameters: SourcesPlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesPlexUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesPlexUsedByList without sending the request + */ + async sourcesPlexUsedByListRequestOpts(requestParameters: SourcesPlexUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesPlexUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/plex/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesPlexUsedByListRaw(requestParameters: SourcesPlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesPlexUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesPlexUsedByList(requestParameters: SourcesPlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesPlexUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlCreate without sending the request + */ + async sourcesSamlCreateRequestOpts(requestParameters: SourcesSamlCreateRequest): Promise { + if (requestParameters['sAMLSourceRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLSourceRequest', + 'Required parameter "sAMLSourceRequest" was null or undefined when calling sourcesSamlCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SAMLSourceRequestToJSON(requestParameters['sAMLSourceRequest']), + }; + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlCreateRaw(requestParameters: SourcesSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourceFromJSON(jsonValue)); + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlCreate(requestParameters: SourcesSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesSamlCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlDestroy without sending the request + */ + async sourcesSamlDestroyRequestOpts(requestParameters: SourcesSamlDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesSamlDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlDestroyRaw(requestParameters: SourcesSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlDestroy(requestParameters: SourcesSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesSamlDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesSamlList without sending the request + */ + async sourcesSamlListRequestOpts(requestParameters: SourcesSamlListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['allowIdpInitiated'] != null) { + queryParameters['allow_idp_initiated'] = requestParameters['allowIdpInitiated']; + } + + if (requestParameters['authenticationFlow'] != null) { + queryParameters['authentication_flow'] = requestParameters['authenticationFlow']; + } + + if (requestParameters['bindingType'] != null) { + queryParameters['binding_type'] = requestParameters['bindingType']; + } + + if (requestParameters['digestAlgorithm'] != null) { + queryParameters['digest_algorithm'] = requestParameters['digestAlgorithm']; + } + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['enrollmentFlow'] != null) { + queryParameters['enrollment_flow'] = requestParameters['enrollmentFlow']; + } + + if (requestParameters['issuer'] != null) { + queryParameters['issuer'] = requestParameters['issuer']; + } + + if (requestParameters['managed'] != null) { + queryParameters['managed'] = requestParameters['managed']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['nameIdPolicy'] != null) { + queryParameters['name_id_policy'] = requestParameters['nameIdPolicy']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['policyEngineMode'] != null) { + queryParameters['policy_engine_mode'] = requestParameters['policyEngineMode']; + } + + if (requestParameters['preAuthenticationFlow'] != null) { + queryParameters['pre_authentication_flow'] = requestParameters['preAuthenticationFlow']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['signatureAlgorithm'] != null) { + queryParameters['signature_algorithm'] = requestParameters['signatureAlgorithm']; + } + + if (requestParameters['signedAssertion'] != null) { + queryParameters['signed_assertion'] = requestParameters['signedAssertion']; + } + + if (requestParameters['signedResponse'] != null) { + queryParameters['signed_response'] = requestParameters['signedResponse']; + } + + if (requestParameters['signingKp'] != null) { + queryParameters['signing_kp'] = requestParameters['signingKp']; + } + + if (requestParameters['sloUrl'] != null) { + queryParameters['slo_url'] = requestParameters['sloUrl']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['ssoUrl'] != null) { + queryParameters['sso_url'] = requestParameters['ssoUrl']; + } + + if (requestParameters['temporaryUserDeleteAfter'] != null) { + queryParameters['temporary_user_delete_after'] = requestParameters['temporaryUserDeleteAfter']; + } + + if (requestParameters['userMatchingMode'] != null) { + queryParameters['user_matching_mode'] = requestParameters['userMatchingMode']; + } + + if (requestParameters['verificationKp'] != null) { + queryParameters['verification_kp'] = requestParameters['verificationKp']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlListRaw(requestParameters: SourcesSamlListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSAMLSourceListFromJSON(jsonValue)); + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlList(requestParameters: SourcesSamlListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesSamlListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlMetadataRetrieve without sending the request + */ + async sourcesSamlMetadataRetrieveRequestOpts(requestParameters: SourcesSamlMetadataRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesSamlMetadataRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/{slug}/metadata/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Return metadata as XML string + */ + async sourcesSamlMetadataRetrieveRaw(requestParameters: SourcesSamlMetadataRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlMetadataRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLMetadataFromJSON(jsonValue)); + } + + /** + * Return metadata as XML string + */ + async sourcesSamlMetadataRetrieve(requestParameters: SourcesSamlMetadataRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesSamlMetadataRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlPartialUpdate without sending the request + */ + async sourcesSamlPartialUpdateRequestOpts(requestParameters: SourcesSamlPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesSamlPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSAMLSourceRequestToJSON(requestParameters['patchedSAMLSourceRequest']), + }; + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlPartialUpdateRaw(requestParameters: SourcesSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourceFromJSON(jsonValue)); + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlPartialUpdate(requestParameters: SourcesSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesSamlPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlRetrieve without sending the request + */ + async sourcesSamlRetrieveRequestOpts(requestParameters: SourcesSamlRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesSamlRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlRetrieveRaw(requestParameters: SourcesSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourceFromJSON(jsonValue)); + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlRetrieve(requestParameters: SourcesSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesSamlRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlUpdate without sending the request + */ + async sourcesSamlUpdateRequestOpts(requestParameters: SourcesSamlUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesSamlUpdate().' + ); + } + + if (requestParameters['sAMLSourceRequest'] == null) { + throw new runtime.RequiredError( + 'sAMLSourceRequest', + 'Required parameter "sAMLSourceRequest" was null or undefined when calling sourcesSamlUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SAMLSourceRequestToJSON(requestParameters['sAMLSourceRequest']), + }; + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlUpdateRaw(requestParameters: SourcesSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesSamlUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SAMLSourceFromJSON(jsonValue)); + } + + /** + * SAMLSource Viewset + */ + async sourcesSamlUpdate(requestParameters: SourcesSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesSamlUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesSamlUsedByList without sending the request + */ + async sourcesSamlUsedByListRequestOpts(requestParameters: SourcesSamlUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesSamlUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/saml/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesSamlUsedByListRaw(requestParameters: SourcesSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesSamlUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesSamlUsedByList(requestParameters: SourcesSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesSamlUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimCreate without sending the request + */ + async sourcesScimCreateRequestOpts(requestParameters: SourcesScimCreateRequest): Promise { + if (requestParameters['sCIMSourceRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourceRequest', + 'Required parameter "sCIMSourceRequest" was null or undefined when calling sourcesScimCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMSourceRequestToJSON(requestParameters['sCIMSourceRequest']), + }; + } + + /** + * SCIMSource Viewset + */ + async sourcesScimCreateRaw(requestParameters: SourcesScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceFromJSON(jsonValue)); + } + + /** + * SCIMSource Viewset + */ + async sourcesScimCreate(requestParameters: SourcesScimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimDestroy without sending the request + */ + async sourcesScimDestroyRequestOpts(requestParameters: SourcesScimDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesScimDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSource Viewset + */ + async sourcesScimDestroyRaw(requestParameters: SourcesScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMSource Viewset + */ + async sourcesScimDestroy(requestParameters: SourcesScimDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesScimDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesScimGroupsCreate without sending the request + */ + async sourcesScimGroupsCreateRequestOpts(requestParameters: SourcesScimGroupsCreateRequest): Promise { + if (requestParameters['sCIMSourceGroupRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourceGroupRequest', + 'Required parameter "sCIMSourceGroupRequest" was null or undefined when calling sourcesScimGroupsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMSourceGroupRequestToJSON(requestParameters['sCIMSourceGroupRequest']), + }; + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsCreateRaw(requestParameters: SourcesScimGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimGroupsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceGroupFromJSON(jsonValue)); + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsCreate(requestParameters: SourcesScimGroupsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimGroupsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimGroupsDestroy without sending the request + */ + async sourcesScimGroupsDestroyRequestOpts(requestParameters: SourcesScimGroupsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimGroupsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsDestroyRaw(requestParameters: SourcesScimGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimGroupsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsDestroy(requestParameters: SourcesScimGroupsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesScimGroupsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesScimGroupsList without sending the request + */ + async sourcesScimGroupsListRequestOpts(requestParameters: SourcesScimGroupsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['groupGroupUuid'] != null) { + queryParameters['group__group_uuid'] = requestParameters['groupGroupUuid']; + } + + if (requestParameters['groupName'] != null) { + queryParameters['group__name'] = requestParameters['groupName']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsListRaw(requestParameters: SourcesScimGroupsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimGroupsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMSourceGroupListFromJSON(jsonValue)); + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsList(requestParameters: SourcesScimGroupsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimGroupsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimGroupsPartialUpdate without sending the request + */ + async sourcesScimGroupsPartialUpdateRequestOpts(requestParameters: SourcesScimGroupsPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimGroupsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSCIMSourceGroupRequestToJSON(requestParameters['patchedSCIMSourceGroupRequest']), + }; + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsPartialUpdateRaw(requestParameters: SourcesScimGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimGroupsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceGroupFromJSON(jsonValue)); + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsPartialUpdate(requestParameters: SourcesScimGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimGroupsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimGroupsRetrieve without sending the request + */ + async sourcesScimGroupsRetrieveRequestOpts(requestParameters: SourcesScimGroupsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimGroupsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsRetrieveRaw(requestParameters: SourcesScimGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimGroupsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceGroupFromJSON(jsonValue)); + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsRetrieve(requestParameters: SourcesScimGroupsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimGroupsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimGroupsUpdate without sending the request + */ + async sourcesScimGroupsUpdateRequestOpts(requestParameters: SourcesScimGroupsUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimGroupsUpdate().' + ); + } + + if (requestParameters['sCIMSourceGroupRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourceGroupRequest', + 'Required parameter "sCIMSourceGroupRequest" was null or undefined when calling sourcesScimGroupsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SCIMSourceGroupRequestToJSON(requestParameters['sCIMSourceGroupRequest']), + }; + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsUpdateRaw(requestParameters: SourcesScimGroupsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimGroupsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceGroupFromJSON(jsonValue)); + } + + /** + * SCIMSourceGroup Viewset + */ + async sourcesScimGroupsUpdate(requestParameters: SourcesScimGroupsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimGroupsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimGroupsUsedByList without sending the request + */ + async sourcesScimGroupsUsedByListRequestOpts(requestParameters: SourcesScimGroupsUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimGroupsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_groups/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesScimGroupsUsedByListRaw(requestParameters: SourcesScimGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesScimGroupsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesScimGroupsUsedByList(requestParameters: SourcesScimGroupsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesScimGroupsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimList without sending the request + */ + async sourcesScimListRequestOpts(requestParameters: SourcesScimListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSource Viewset + */ + async sourcesScimListRaw(requestParameters: SourcesScimListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMSourceListFromJSON(jsonValue)); + } + + /** + * SCIMSource Viewset + */ + async sourcesScimList(requestParameters: SourcesScimListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimPartialUpdate without sending the request + */ + async sourcesScimPartialUpdateRequestOpts(requestParameters: SourcesScimPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesScimPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSCIMSourceRequestToJSON(requestParameters['patchedSCIMSourceRequest']), + }; + } + + /** + * SCIMSource Viewset + */ + async sourcesScimPartialUpdateRaw(requestParameters: SourcesScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceFromJSON(jsonValue)); + } + + /** + * SCIMSource Viewset + */ + async sourcesScimPartialUpdate(requestParameters: SourcesScimPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimRetrieve without sending the request + */ + async sourcesScimRetrieveRequestOpts(requestParameters: SourcesScimRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesScimRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSource Viewset + */ + async sourcesScimRetrieveRaw(requestParameters: SourcesScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceFromJSON(jsonValue)); + } + + /** + * SCIMSource Viewset + */ + async sourcesScimRetrieve(requestParameters: SourcesScimRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUpdate without sending the request + */ + async sourcesScimUpdateRequestOpts(requestParameters: SourcesScimUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesScimUpdate().' + ); + } + + if (requestParameters['sCIMSourceRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourceRequest', + 'Required parameter "sCIMSourceRequest" was null or undefined when calling sourcesScimUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SCIMSourceRequestToJSON(requestParameters['sCIMSourceRequest']), + }; + } + + /** + * SCIMSource Viewset + */ + async sourcesScimUpdateRaw(requestParameters: SourcesScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceFromJSON(jsonValue)); + } + + /** + * SCIMSource Viewset + */ + async sourcesScimUpdate(requestParameters: SourcesScimUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsedByList without sending the request + */ + async sourcesScimUsedByListRequestOpts(requestParameters: SourcesScimUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesScimUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesScimUsedByListRaw(requestParameters: SourcesScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesScimUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesScimUsedByList(requestParameters: SourcesScimUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesScimUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsersCreate without sending the request + */ + async sourcesScimUsersCreateRequestOpts(requestParameters: SourcesScimUsersCreateRequest): Promise { + if (requestParameters['sCIMSourceUserRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourceUserRequest', + 'Required parameter "sCIMSourceUserRequest" was null or undefined when calling sourcesScimUsersCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SCIMSourceUserRequestToJSON(requestParameters['sCIMSourceUserRequest']), + }; + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersCreateRaw(requestParameters: SourcesScimUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUsersCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceUserFromJSON(jsonValue)); + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersCreate(requestParameters: SourcesScimUsersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimUsersCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsersDestroy without sending the request + */ + async sourcesScimUsersDestroyRequestOpts(requestParameters: SourcesScimUsersDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimUsersDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersDestroyRaw(requestParameters: SourcesScimUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUsersDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersDestroy(requestParameters: SourcesScimUsersDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesScimUsersDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesScimUsersList without sending the request + */ + async sourcesScimUsersListRequestOpts(requestParameters: SourcesScimUsersListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['userId'] != null) { + queryParameters['user__id'] = requestParameters['userId']; + } + + if (requestParameters['userUsername'] != null) { + queryParameters['user__username'] = requestParameters['userUsername']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersListRaw(requestParameters: SourcesScimUsersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUsersListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSCIMSourceUserListFromJSON(jsonValue)); + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersList(requestParameters: SourcesScimUsersListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimUsersListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsersPartialUpdate without sending the request + */ + async sourcesScimUsersPartialUpdateRequestOpts(requestParameters: SourcesScimUsersPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimUsersPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSCIMSourceUserRequestToJSON(requestParameters['patchedSCIMSourceUserRequest']), + }; + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersPartialUpdateRaw(requestParameters: SourcesScimUsersPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUsersPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceUserFromJSON(jsonValue)); + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersPartialUpdate(requestParameters: SourcesScimUsersPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimUsersPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsersRetrieve without sending the request + */ + async sourcesScimUsersRetrieveRequestOpts(requestParameters: SourcesScimUsersRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimUsersRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersRetrieveRaw(requestParameters: SourcesScimUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUsersRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceUserFromJSON(jsonValue)); + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersRetrieve(requestParameters: SourcesScimUsersRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimUsersRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsersUpdate without sending the request + */ + async sourcesScimUsersUpdateRequestOpts(requestParameters: SourcesScimUsersUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimUsersUpdate().' + ); + } + + if (requestParameters['sCIMSourceUserRequest'] == null) { + throw new runtime.RequiredError( + 'sCIMSourceUserRequest', + 'Required parameter "sCIMSourceUserRequest" was null or undefined when calling sourcesScimUsersUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SCIMSourceUserRequestToJSON(requestParameters['sCIMSourceUserRequest']), + }; + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersUpdateRaw(requestParameters: SourcesScimUsersUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesScimUsersUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SCIMSourceUserFromJSON(jsonValue)); + } + + /** + * SCIMSourceUser Viewset + */ + async sourcesScimUsersUpdate(requestParameters: SourcesScimUsersUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesScimUsersUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesScimUsersUsedByList without sending the request + */ + async sourcesScimUsersUsedByListRequestOpts(requestParameters: SourcesScimUsersUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesScimUsersUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/scim_users/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesScimUsersUsedByListRaw(requestParameters: SourcesScimUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesScimUsersUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesScimUsersUsedByList(requestParameters: SourcesScimUsersUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesScimUsersUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramConnectUserCreate without sending the request + */ + async sourcesTelegramConnectUserCreateRequestOpts(requestParameters: SourcesTelegramConnectUserCreateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesTelegramConnectUserCreate().' + ); + } + + if (requestParameters['telegramAuthRequest'] == null) { + throw new runtime.RequiredError( + 'telegramAuthRequest', + 'Required parameter "telegramAuthRequest" was null or undefined when calling sourcesTelegramConnectUserCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/{slug}/connect_user/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TelegramAuthRequestToJSON(requestParameters['telegramAuthRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramConnectUserCreateRaw(requestParameters: SourcesTelegramConnectUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramConnectUserCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramConnectUserCreate(requestParameters: SourcesTelegramConnectUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesTelegramConnectUserCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramCreate without sending the request + */ + async sourcesTelegramCreateRequestOpts(requestParameters: SourcesTelegramCreateRequest): Promise { + if (requestParameters['telegramSourceRequest'] == null) { + throw new runtime.RequiredError( + 'telegramSourceRequest', + 'Required parameter "telegramSourceRequest" was null or undefined when calling sourcesTelegramCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TelegramSourceRequestToJSON(requestParameters['telegramSourceRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramCreateRaw(requestParameters: SourcesTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourceFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramCreate(requestParameters: SourcesTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesTelegramCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramDestroy without sending the request + */ + async sourcesTelegramDestroyRequestOpts(requestParameters: SourcesTelegramDestroyRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesTelegramDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramDestroyRaw(requestParameters: SourcesTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramDestroy(requestParameters: SourcesTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesTelegramDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesTelegramList without sending the request + */ + async sourcesTelegramListRequestOpts(requestParameters: SourcesTelegramListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['authenticationFlow'] != null) { + queryParameters['authentication_flow'] = requestParameters['authenticationFlow']; + } + + if (requestParameters['botUsername'] != null) { + queryParameters['bot_username'] = requestParameters['botUsername']; + } + + if (requestParameters['enabled'] != null) { + queryParameters['enabled'] = requestParameters['enabled']; + } + + if (requestParameters['enrollmentFlow'] != null) { + queryParameters['enrollment_flow'] = requestParameters['enrollmentFlow']; + } + + if (requestParameters['groupMatchingMode'] != null) { + queryParameters['group_matching_mode'] = requestParameters['groupMatchingMode']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['pbmUuid'] != null) { + queryParameters['pbm_uuid'] = requestParameters['pbmUuid']; + } + + if (requestParameters['policyEngineMode'] != null) { + queryParameters['policy_engine_mode'] = requestParameters['policyEngineMode']; + } + + if (requestParameters['requestMessageAccess'] != null) { + queryParameters['request_message_access'] = requestParameters['requestMessageAccess']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['slug'] != null) { + queryParameters['slug'] = requestParameters['slug']; + } + + if (requestParameters['userMatchingMode'] != null) { + queryParameters['user_matching_mode'] = requestParameters['userMatchingMode']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramListRaw(requestParameters: SourcesTelegramListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTelegramSourceListFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramList(requestParameters: SourcesTelegramListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesTelegramListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramPartialUpdate without sending the request + */ + async sourcesTelegramPartialUpdateRequestOpts(requestParameters: SourcesTelegramPartialUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesTelegramPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTelegramSourceRequestToJSON(requestParameters['patchedTelegramSourceRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramPartialUpdateRaw(requestParameters: SourcesTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourceFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramPartialUpdate(requestParameters: SourcesTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesTelegramPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramRetrieve without sending the request + */ + async sourcesTelegramRetrieveRequestOpts(requestParameters: SourcesTelegramRetrieveRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesTelegramRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramRetrieveRaw(requestParameters: SourcesTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourceFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramRetrieve(requestParameters: SourcesTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesTelegramRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramUpdate without sending the request + */ + async sourcesTelegramUpdateRequestOpts(requestParameters: SourcesTelegramUpdateRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesTelegramUpdate().' + ); + } + + if (requestParameters['telegramSourceRequest'] == null) { + throw new runtime.RequiredError( + 'telegramSourceRequest', + 'Required parameter "telegramSourceRequest" was null or undefined when calling sourcesTelegramUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/{slug}/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TelegramSourceRequestToJSON(requestParameters['telegramSourceRequest']), + }; + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramUpdateRaw(requestParameters: SourcesTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesTelegramUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TelegramSourceFromJSON(jsonValue)); + } + + /** + * Mixin to add a used_by endpoint to return a list of all objects using this object + */ + async sourcesTelegramUpdate(requestParameters: SourcesTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesTelegramUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesTelegramUsedByList without sending the request + */ + async sourcesTelegramUsedByListRequestOpts(requestParameters: SourcesTelegramUsedByListRequest): Promise { + if (requestParameters['slug'] == null) { + throw new runtime.RequiredError( + 'slug', + 'Required parameter "slug" was null or undefined when calling sourcesTelegramUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/telegram/{slug}/used_by/`; + urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesTelegramUsedByListRaw(requestParameters: SourcesTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesTelegramUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesTelegramUsedByList(requestParameters: SourcesTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesTelegramUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsAllDestroy without sending the request + */ + async sourcesUserConnectionsAllDestroyRequestOpts(requestParameters: SourcesUserConnectionsAllDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllDestroyRaw(requestParameters: SourcesUserConnectionsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllDestroy(requestParameters: SourcesUserConnectionsAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsAllList without sending the request + */ + async sourcesUserConnectionsAllListRequestOpts(requestParameters: SourcesUserConnectionsAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllListRaw(requestParameters: SourcesUserConnectionsAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllList(requestParameters: SourcesUserConnectionsAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsAllPartialUpdate without sending the request + */ + async sourcesUserConnectionsAllPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsAllPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsAllPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserSourceConnectionRequestToJSON(requestParameters['patchedUserSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllPartialUpdateRaw(requestParameters: SourcesUserConnectionsAllPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsAllPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllPartialUpdate(requestParameters: SourcesUserConnectionsAllPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsAllPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsAllRetrieve without sending the request + */ + async sourcesUserConnectionsAllRetrieveRequestOpts(requestParameters: SourcesUserConnectionsAllRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllRetrieveRaw(requestParameters: SourcesUserConnectionsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllRetrieve(requestParameters: SourcesUserConnectionsAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsAllUpdate without sending the request + */ + async sourcesUserConnectionsAllUpdateRequestOpts(requestParameters: SourcesUserConnectionsAllUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsAllUpdate().' + ); + } + + if (requestParameters['userSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userSourceConnectionRequest', + 'Required parameter "userSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsAllUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/all/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserSourceConnectionRequestToJSON(requestParameters['userSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllUpdateRaw(requestParameters: SourcesUserConnectionsAllUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsAllUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsAllUpdate(requestParameters: SourcesUserConnectionsAllUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsAllUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsAllUsedByList without sending the request + */ + async sourcesUserConnectionsAllUsedByListRequestOpts(requestParameters: SourcesUserConnectionsAllUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/all/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsAllUsedByListRaw(requestParameters: SourcesUserConnectionsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsAllUsedByList(requestParameters: SourcesUserConnectionsAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosCreate without sending the request + */ + async sourcesUserConnectionsKerberosCreateRequestOpts(requestParameters: SourcesUserConnectionsKerberosCreateRequest): Promise { + if (requestParameters['userKerberosSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userKerberosSourceConnectionRequest', + 'Required parameter "userKerberosSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsKerberosCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserKerberosSourceConnectionRequestToJSON(requestParameters['userKerberosSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosCreateRaw(requestParameters: SourcesUserConnectionsKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsKerberosCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosCreate(requestParameters: SourcesUserConnectionsKerberosCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsKerberosCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosDestroy without sending the request + */ + async sourcesUserConnectionsKerberosDestroyRequestOpts(requestParameters: SourcesUserConnectionsKerberosDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsKerberosDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosDestroyRaw(requestParameters: SourcesUserConnectionsKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsKerberosDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosDestroy(requestParameters: SourcesUserConnectionsKerberosDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsKerberosDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosList without sending the request + */ + async sourcesUserConnectionsKerberosListRequestOpts(requestParameters: SourcesUserConnectionsKerberosListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosListRaw(requestParameters: SourcesUserConnectionsKerberosListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsKerberosListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserKerberosSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosList(requestParameters: SourcesUserConnectionsKerberosListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsKerberosListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosPartialUpdate without sending the request + */ + async sourcesUserConnectionsKerberosPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsKerberosPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsKerberosPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserKerberosSourceConnectionRequestToJSON(requestParameters['patchedUserKerberosSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosPartialUpdateRaw(requestParameters: SourcesUserConnectionsKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsKerberosPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosPartialUpdate(requestParameters: SourcesUserConnectionsKerberosPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsKerberosPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosRetrieve without sending the request + */ + async sourcesUserConnectionsKerberosRetrieveRequestOpts(requestParameters: SourcesUserConnectionsKerberosRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsKerberosRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosRetrieveRaw(requestParameters: SourcesUserConnectionsKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsKerberosRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosRetrieve(requestParameters: SourcesUserConnectionsKerberosRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsKerberosRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosUpdate without sending the request + */ + async sourcesUserConnectionsKerberosUpdateRequestOpts(requestParameters: SourcesUserConnectionsKerberosUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsKerberosUpdate().' + ); + } + + if (requestParameters['userKerberosSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userKerberosSourceConnectionRequest', + 'Required parameter "userKerberosSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsKerberosUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserKerberosSourceConnectionRequestToJSON(requestParameters['userKerberosSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosUpdateRaw(requestParameters: SourcesUserConnectionsKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsKerberosUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserKerberosSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsKerberosUpdate(requestParameters: SourcesUserConnectionsKerberosUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsKerberosUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsKerberosUsedByList without sending the request + */ + async sourcesUserConnectionsKerberosUsedByListRequestOpts(requestParameters: SourcesUserConnectionsKerberosUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsKerberosUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/kerberos/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsKerberosUsedByListRaw(requestParameters: SourcesUserConnectionsKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsKerberosUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsKerberosUsedByList(requestParameters: SourcesUserConnectionsKerberosUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsKerberosUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsLdapCreate without sending the request + */ + async sourcesUserConnectionsLdapCreateRequestOpts(requestParameters: SourcesUserConnectionsLdapCreateRequest): Promise { + if (requestParameters['userLDAPSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userLDAPSourceConnectionRequest', + 'Required parameter "userLDAPSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsLdapCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserLDAPSourceConnectionRequestToJSON(requestParameters['userLDAPSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapCreateRaw(requestParameters: SourcesUserConnectionsLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsLdapCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapCreate(requestParameters: SourcesUserConnectionsLdapCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsLdapCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsLdapDestroy without sending the request + */ + async sourcesUserConnectionsLdapDestroyRequestOpts(requestParameters: SourcesUserConnectionsLdapDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsLdapDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapDestroyRaw(requestParameters: SourcesUserConnectionsLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsLdapDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapDestroy(requestParameters: SourcesUserConnectionsLdapDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsLdapDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsLdapList without sending the request + */ + async sourcesUserConnectionsLdapListRequestOpts(requestParameters: SourcesUserConnectionsLdapListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapListRaw(requestParameters: SourcesUserConnectionsLdapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsLdapListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserLDAPSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapList(requestParameters: SourcesUserConnectionsLdapListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsLdapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsLdapPartialUpdate without sending the request + */ + async sourcesUserConnectionsLdapPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsLdapPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsLdapPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserLDAPSourceConnectionRequestToJSON(requestParameters['patchedUserLDAPSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapPartialUpdateRaw(requestParameters: SourcesUserConnectionsLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsLdapPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapPartialUpdate(requestParameters: SourcesUserConnectionsLdapPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsLdapPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsLdapRetrieve without sending the request + */ + async sourcesUserConnectionsLdapRetrieveRequestOpts(requestParameters: SourcesUserConnectionsLdapRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsLdapRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapRetrieveRaw(requestParameters: SourcesUserConnectionsLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsLdapRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapRetrieve(requestParameters: SourcesUserConnectionsLdapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsLdapRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsLdapUpdate without sending the request + */ + async sourcesUserConnectionsLdapUpdateRequestOpts(requestParameters: SourcesUserConnectionsLdapUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsLdapUpdate().' + ); + } + + if (requestParameters['userLDAPSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userLDAPSourceConnectionRequest', + 'Required parameter "userLDAPSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsLdapUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserLDAPSourceConnectionRequestToJSON(requestParameters['userLDAPSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapUpdateRaw(requestParameters: SourcesUserConnectionsLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsLdapUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLDAPSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsLdapUpdate(requestParameters: SourcesUserConnectionsLdapUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsLdapUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsLdapUsedByList without sending the request + */ + async sourcesUserConnectionsLdapUsedByListRequestOpts(requestParameters: SourcesUserConnectionsLdapUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsLdapUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/ldap/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsLdapUsedByListRaw(requestParameters: SourcesUserConnectionsLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsLdapUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsLdapUsedByList(requestParameters: SourcesUserConnectionsLdapUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsLdapUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsOauthCreate without sending the request + */ + async sourcesUserConnectionsOauthCreateRequestOpts(requestParameters: SourcesUserConnectionsOauthCreateRequest): Promise { + if (requestParameters['userOAuthSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userOAuthSourceConnectionRequest', + 'Required parameter "userOAuthSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsOauthCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserOAuthSourceConnectionRequestToJSON(requestParameters['userOAuthSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthCreateRaw(requestParameters: SourcesUserConnectionsOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsOauthCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthCreate(requestParameters: SourcesUserConnectionsOauthCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsOauthCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsOauthDestroy without sending the request + */ + async sourcesUserConnectionsOauthDestroyRequestOpts(requestParameters: SourcesUserConnectionsOauthDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsOauthDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthDestroyRaw(requestParameters: SourcesUserConnectionsOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsOauthDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthDestroy(requestParameters: SourcesUserConnectionsOauthDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsOauthDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsOauthList without sending the request + */ + async sourcesUserConnectionsOauthListRequestOpts(requestParameters: SourcesUserConnectionsOauthListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthListRaw(requestParameters: SourcesUserConnectionsOauthListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsOauthListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserOAuthSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthList(requestParameters: SourcesUserConnectionsOauthListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsOauthListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsOauthPartialUpdate without sending the request + */ + async sourcesUserConnectionsOauthPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsOauthPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsOauthPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserOAuthSourceConnectionRequestToJSON(requestParameters['patchedUserOAuthSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthPartialUpdateRaw(requestParameters: SourcesUserConnectionsOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsOauthPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthPartialUpdate(requestParameters: SourcesUserConnectionsOauthPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsOauthPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsOauthRetrieve without sending the request + */ + async sourcesUserConnectionsOauthRetrieveRequestOpts(requestParameters: SourcesUserConnectionsOauthRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsOauthRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthRetrieveRaw(requestParameters: SourcesUserConnectionsOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsOauthRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthRetrieve(requestParameters: SourcesUserConnectionsOauthRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsOauthRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsOauthUpdate without sending the request + */ + async sourcesUserConnectionsOauthUpdateRequestOpts(requestParameters: SourcesUserConnectionsOauthUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsOauthUpdate().' + ); + } + + if (requestParameters['userOAuthSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userOAuthSourceConnectionRequest', + 'Required parameter "userOAuthSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsOauthUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserOAuthSourceConnectionRequestToJSON(requestParameters['userOAuthSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthUpdateRaw(requestParameters: SourcesUserConnectionsOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsOauthUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserOAuthSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsOauthUpdate(requestParameters: SourcesUserConnectionsOauthUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsOauthUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsOauthUsedByList without sending the request + */ + async sourcesUserConnectionsOauthUsedByListRequestOpts(requestParameters: SourcesUserConnectionsOauthUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsOauthUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/oauth/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsOauthUsedByListRaw(requestParameters: SourcesUserConnectionsOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsOauthUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsOauthUsedByList(requestParameters: SourcesUserConnectionsOauthUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsOauthUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsPlexCreate without sending the request + */ + async sourcesUserConnectionsPlexCreateRequestOpts(requestParameters: SourcesUserConnectionsPlexCreateRequest): Promise { + if (requestParameters['userPlexSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userPlexSourceConnectionRequest', + 'Required parameter "userPlexSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsPlexCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserPlexSourceConnectionRequestToJSON(requestParameters['userPlexSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexCreateRaw(requestParameters: SourcesUserConnectionsPlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsPlexCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexCreate(requestParameters: SourcesUserConnectionsPlexCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsPlexCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsPlexDestroy without sending the request + */ + async sourcesUserConnectionsPlexDestroyRequestOpts(requestParameters: SourcesUserConnectionsPlexDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsPlexDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexDestroyRaw(requestParameters: SourcesUserConnectionsPlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsPlexDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexDestroy(requestParameters: SourcesUserConnectionsPlexDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsPlexDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsPlexList without sending the request + */ + async sourcesUserConnectionsPlexListRequestOpts(requestParameters: SourcesUserConnectionsPlexListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexListRaw(requestParameters: SourcesUserConnectionsPlexListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsPlexListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserPlexSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexList(requestParameters: SourcesUserConnectionsPlexListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsPlexListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsPlexPartialUpdate without sending the request + */ + async sourcesUserConnectionsPlexPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsPlexPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsPlexPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserPlexSourceConnectionRequestToJSON(requestParameters['patchedUserPlexSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexPartialUpdateRaw(requestParameters: SourcesUserConnectionsPlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsPlexPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexPartialUpdate(requestParameters: SourcesUserConnectionsPlexPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsPlexPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsPlexRetrieve without sending the request + */ + async sourcesUserConnectionsPlexRetrieveRequestOpts(requestParameters: SourcesUserConnectionsPlexRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsPlexRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexRetrieveRaw(requestParameters: SourcesUserConnectionsPlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsPlexRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexRetrieve(requestParameters: SourcesUserConnectionsPlexRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsPlexRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsPlexUpdate without sending the request + */ + async sourcesUserConnectionsPlexUpdateRequestOpts(requestParameters: SourcesUserConnectionsPlexUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsPlexUpdate().' + ); + } + + if (requestParameters['userPlexSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userPlexSourceConnectionRequest', + 'Required parameter "userPlexSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsPlexUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserPlexSourceConnectionRequestToJSON(requestParameters['userPlexSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexUpdateRaw(requestParameters: SourcesUserConnectionsPlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsPlexUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPlexSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsPlexUpdate(requestParameters: SourcesUserConnectionsPlexUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsPlexUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsPlexUsedByList without sending the request + */ + async sourcesUserConnectionsPlexUsedByListRequestOpts(requestParameters: SourcesUserConnectionsPlexUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsPlexUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/plex/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsPlexUsedByListRaw(requestParameters: SourcesUserConnectionsPlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsPlexUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsPlexUsedByList(requestParameters: SourcesUserConnectionsPlexUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsPlexUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsSamlCreate without sending the request + */ + async sourcesUserConnectionsSamlCreateRequestOpts(requestParameters: SourcesUserConnectionsSamlCreateRequest): Promise { + if (requestParameters['userSAMLSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userSAMLSourceConnectionRequest', + 'Required parameter "userSAMLSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsSamlCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserSAMLSourceConnectionRequestToJSON(requestParameters['userSAMLSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlCreateRaw(requestParameters: SourcesUserConnectionsSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsSamlCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlCreate(requestParameters: SourcesUserConnectionsSamlCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsSamlCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsSamlDestroy without sending the request + */ + async sourcesUserConnectionsSamlDestroyRequestOpts(requestParameters: SourcesUserConnectionsSamlDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsSamlDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlDestroyRaw(requestParameters: SourcesUserConnectionsSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsSamlDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlDestroy(requestParameters: SourcesUserConnectionsSamlDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsSamlDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsSamlList without sending the request + */ + async sourcesUserConnectionsSamlListRequestOpts(requestParameters: SourcesUserConnectionsSamlListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlListRaw(requestParameters: SourcesUserConnectionsSamlListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsSamlListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserSAMLSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlList(requestParameters: SourcesUserConnectionsSamlListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsSamlListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsSamlPartialUpdate without sending the request + */ + async sourcesUserConnectionsSamlPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsSamlPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsSamlPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserSAMLSourceConnectionRequestToJSON(requestParameters['patchedUserSAMLSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlPartialUpdateRaw(requestParameters: SourcesUserConnectionsSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsSamlPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlPartialUpdate(requestParameters: SourcesUserConnectionsSamlPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsSamlPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsSamlRetrieve without sending the request + */ + async sourcesUserConnectionsSamlRetrieveRequestOpts(requestParameters: SourcesUserConnectionsSamlRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsSamlRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlRetrieveRaw(requestParameters: SourcesUserConnectionsSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsSamlRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlRetrieve(requestParameters: SourcesUserConnectionsSamlRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsSamlRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsSamlUpdate without sending the request + */ + async sourcesUserConnectionsSamlUpdateRequestOpts(requestParameters: SourcesUserConnectionsSamlUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsSamlUpdate().' + ); + } + + if (requestParameters['userSAMLSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userSAMLSourceConnectionRequest', + 'Required parameter "userSAMLSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsSamlUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserSAMLSourceConnectionRequestToJSON(requestParameters['userSAMLSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlUpdateRaw(requestParameters: SourcesUserConnectionsSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsSamlUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserSAMLSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsSamlUpdate(requestParameters: SourcesUserConnectionsSamlUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsSamlUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsSamlUsedByList without sending the request + */ + async sourcesUserConnectionsSamlUsedByListRequestOpts(requestParameters: SourcesUserConnectionsSamlUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsSamlUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/saml/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsSamlUsedByListRaw(requestParameters: SourcesUserConnectionsSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsSamlUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsSamlUsedByList(requestParameters: SourcesUserConnectionsSamlUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsSamlUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramCreate without sending the request + */ + async sourcesUserConnectionsTelegramCreateRequestOpts(requestParameters: SourcesUserConnectionsTelegramCreateRequest): Promise { + if (requestParameters['userTelegramSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userTelegramSourceConnectionRequest', + 'Required parameter "userTelegramSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsTelegramCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserTelegramSourceConnectionRequestToJSON(requestParameters['userTelegramSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramCreateRaw(requestParameters: SourcesUserConnectionsTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsTelegramCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramCreate(requestParameters: SourcesUserConnectionsTelegramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsTelegramCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramDestroy without sending the request + */ + async sourcesUserConnectionsTelegramDestroyRequestOpts(requestParameters: SourcesUserConnectionsTelegramDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsTelegramDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramDestroyRaw(requestParameters: SourcesUserConnectionsTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsTelegramDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramDestroy(requestParameters: SourcesUserConnectionsTelegramDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sourcesUserConnectionsTelegramDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramList without sending the request + */ + async sourcesUserConnectionsTelegramListRequestOpts(requestParameters: SourcesUserConnectionsTelegramListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sourceSlug'] != null) { + queryParameters['source__slug'] = requestParameters['sourceSlug']; + } + + if (requestParameters['user'] != null) { + queryParameters['user'] = requestParameters['user']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramListRaw(requestParameters: SourcesUserConnectionsTelegramListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsTelegramListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserTelegramSourceConnectionListFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramList(requestParameters: SourcesUserConnectionsTelegramListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsTelegramListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramPartialUpdate without sending the request + */ + async sourcesUserConnectionsTelegramPartialUpdateRequestOpts(requestParameters: SourcesUserConnectionsTelegramPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsTelegramPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserTelegramSourceConnectionRequestToJSON(requestParameters['patchedUserTelegramSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramPartialUpdateRaw(requestParameters: SourcesUserConnectionsTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsTelegramPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramPartialUpdate(requestParameters: SourcesUserConnectionsTelegramPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsTelegramPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramRetrieve without sending the request + */ + async sourcesUserConnectionsTelegramRetrieveRequestOpts(requestParameters: SourcesUserConnectionsTelegramRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsTelegramRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramRetrieveRaw(requestParameters: SourcesUserConnectionsTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsTelegramRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramRetrieve(requestParameters: SourcesUserConnectionsTelegramRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsTelegramRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramUpdate without sending the request + */ + async sourcesUserConnectionsTelegramUpdateRequestOpts(requestParameters: SourcesUserConnectionsTelegramUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsTelegramUpdate().' + ); + } + + if (requestParameters['userTelegramSourceConnectionRequest'] == null) { + throw new runtime.RequiredError( + 'userTelegramSourceConnectionRequest', + 'Required parameter "userTelegramSourceConnectionRequest" was null or undefined when calling sourcesUserConnectionsTelegramUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserTelegramSourceConnectionRequestToJSON(requestParameters['userTelegramSourceConnectionRequest']), + }; + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramUpdateRaw(requestParameters: SourcesUserConnectionsTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sourcesUserConnectionsTelegramUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserTelegramSourceConnectionFromJSON(jsonValue)); + } + + /** + * User-source connection Viewset + */ + async sourcesUserConnectionsTelegramUpdate(requestParameters: SourcesUserConnectionsTelegramUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sourcesUserConnectionsTelegramUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sourcesUserConnectionsTelegramUsedByList without sending the request + */ + async sourcesUserConnectionsTelegramUsedByListRequestOpts(requestParameters: SourcesUserConnectionsTelegramUsedByListRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sourcesUserConnectionsTelegramUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sources/user_connections/telegram/{id}/used_by/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsTelegramUsedByListRaw(requestParameters: SourcesUserConnectionsTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.sourcesUserConnectionsTelegramUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async sourcesUserConnectionsTelegramUsedByList(requestParameters: SourcesUserConnectionsTelegramUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.sourcesUserConnectionsTelegramUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const SourcesKerberosListKadminTypeEnum = { + Heimdal: 'Heimdal', + Mit: 'MIT', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesKerberosListKadminTypeEnum = typeof SourcesKerberosListKadminTypeEnum[keyof typeof SourcesKerberosListKadminTypeEnum]; +/** + * @export + */ +export const SourcesOauthListGroupMatchingModeEnum = { + Identifier: 'identifier', + NameDeny: 'name_deny', + NameLink: 'name_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesOauthListGroupMatchingModeEnum = typeof SourcesOauthListGroupMatchingModeEnum[keyof typeof SourcesOauthListGroupMatchingModeEnum]; +/** + * @export + */ +export const SourcesOauthListPolicyEngineModeEnum = { + All: 'all', + Any: 'any', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesOauthListPolicyEngineModeEnum = typeof SourcesOauthListPolicyEngineModeEnum[keyof typeof SourcesOauthListPolicyEngineModeEnum]; +/** + * @export + */ +export const SourcesOauthListUserMatchingModeEnum = { + EmailDeny: 'email_deny', + EmailLink: 'email_link', + Identifier: 'identifier', + UsernameDeny: 'username_deny', + UsernameLink: 'username_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesOauthListUserMatchingModeEnum = typeof SourcesOauthListUserMatchingModeEnum[keyof typeof SourcesOauthListUserMatchingModeEnum]; +/** + * @export + */ +export const SourcesPlexListGroupMatchingModeEnum = { + Identifier: 'identifier', + NameDeny: 'name_deny', + NameLink: 'name_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesPlexListGroupMatchingModeEnum = typeof SourcesPlexListGroupMatchingModeEnum[keyof typeof SourcesPlexListGroupMatchingModeEnum]; +/** + * @export + */ +export const SourcesPlexListPolicyEngineModeEnum = { + All: 'all', + Any: 'any', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesPlexListPolicyEngineModeEnum = typeof SourcesPlexListPolicyEngineModeEnum[keyof typeof SourcesPlexListPolicyEngineModeEnum]; +/** + * @export + */ +export const SourcesPlexListUserMatchingModeEnum = { + EmailDeny: 'email_deny', + EmailLink: 'email_link', + Identifier: 'identifier', + UsernameDeny: 'username_deny', + UsernameLink: 'username_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesPlexListUserMatchingModeEnum = typeof SourcesPlexListUserMatchingModeEnum[keyof typeof SourcesPlexListUserMatchingModeEnum]; +/** + * @export + */ +export const SourcesSamlListBindingTypeEnum = { + Post: 'POST', + PostAuto: 'POST_AUTO', + Redirect: 'REDIRECT', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesSamlListBindingTypeEnum = typeof SourcesSamlListBindingTypeEnum[keyof typeof SourcesSamlListBindingTypeEnum]; +/** + * @export + */ +export const SourcesSamlListDigestAlgorithmEnum = { + HttpWwwW3Org200009Xmldsigsha1: 'http://www.w3.org/2000/09/xmldsig#sha1', + HttpWwwW3Org200104XmldsigMoresha384: 'http://www.w3.org/2001/04/xmldsig-more#sha384', + HttpWwwW3Org200104Xmlencsha256: 'http://www.w3.org/2001/04/xmlenc#sha256', + HttpWwwW3Org200104Xmlencsha512: 'http://www.w3.org/2001/04/xmlenc#sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesSamlListDigestAlgorithmEnum = typeof SourcesSamlListDigestAlgorithmEnum[keyof typeof SourcesSamlListDigestAlgorithmEnum]; +/** + * @export + */ +export const SourcesSamlListNameIdPolicyEnum = { + UrnOasisNamesTcSaml11NameidFormatX509SubjectName: 'urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName', + UrnOasisNamesTcSaml11NameidFormatEmailAddress: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', + UrnOasisNamesTcSaml11NameidFormatUnspecified: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', + UrnOasisNamesTcSaml20NameidFormatWindowsDomainQualifiedName: 'urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName', + UrnOasisNamesTcSaml20NameidFormatPersistent: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', + UrnOasisNamesTcSaml20NameidFormatTransient: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesSamlListNameIdPolicyEnum = typeof SourcesSamlListNameIdPolicyEnum[keyof typeof SourcesSamlListNameIdPolicyEnum]; +/** + * @export + */ +export const SourcesSamlListPolicyEngineModeEnum = { + All: 'all', + Any: 'any', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesSamlListPolicyEngineModeEnum = typeof SourcesSamlListPolicyEngineModeEnum[keyof typeof SourcesSamlListPolicyEngineModeEnum]; +/** + * @export + */ +export const SourcesSamlListSignatureAlgorithmEnum = { + HttpWwwW3Org200009XmldsigdsaSha1: 'http://www.w3.org/2000/09/xmldsig#dsa-sha1', + HttpWwwW3Org200009XmldsigrsaSha1: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha1: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha256: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256', + HttpWwwW3Org200104XmldsigMoreecdsaSha384: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384', + HttpWwwW3Org200104XmldsigMoreecdsaSha512: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512', + HttpWwwW3Org200104XmldsigMorersaSha256: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', + HttpWwwW3Org200104XmldsigMorersaSha384: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384', + HttpWwwW3Org200104XmldsigMorersaSha512: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesSamlListSignatureAlgorithmEnum = typeof SourcesSamlListSignatureAlgorithmEnum[keyof typeof SourcesSamlListSignatureAlgorithmEnum]; +/** + * @export + */ +export const SourcesSamlListUserMatchingModeEnum = { + EmailDeny: 'email_deny', + EmailLink: 'email_link', + Identifier: 'identifier', + UsernameDeny: 'username_deny', + UsernameLink: 'username_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesSamlListUserMatchingModeEnum = typeof SourcesSamlListUserMatchingModeEnum[keyof typeof SourcesSamlListUserMatchingModeEnum]; +/** + * @export + */ +export const SourcesTelegramListGroupMatchingModeEnum = { + Identifier: 'identifier', + NameDeny: 'name_deny', + NameLink: 'name_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesTelegramListGroupMatchingModeEnum = typeof SourcesTelegramListGroupMatchingModeEnum[keyof typeof SourcesTelegramListGroupMatchingModeEnum]; +/** + * @export + */ +export const SourcesTelegramListPolicyEngineModeEnum = { + All: 'all', + Any: 'any', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesTelegramListPolicyEngineModeEnum = typeof SourcesTelegramListPolicyEngineModeEnum[keyof typeof SourcesTelegramListPolicyEngineModeEnum]; +/** + * @export + */ +export const SourcesTelegramListUserMatchingModeEnum = { + EmailDeny: 'email_deny', + EmailLink: 'email_link', + Identifier: 'identifier', + UsernameDeny: 'username_deny', + UsernameLink: 'username_link', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SourcesTelegramListUserMatchingModeEnum = typeof SourcesTelegramListUserMatchingModeEnum[keyof typeof SourcesTelegramListUserMatchingModeEnum]; diff --git a/packages/client-ts/src/apis/SsfApi.ts b/packages/client-ts/src/apis/SsfApi.ts new file mode 100644 index 0000000000..02d5623e84 --- /dev/null +++ b/packages/client-ts/src/apis/SsfApi.ts @@ -0,0 +1,189 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + PaginatedSSFStreamList, + SSFStream, + ValidationError, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedSSFStreamListFromJSON, + PaginatedSSFStreamListToJSON, + SSFStreamFromJSON, + SSFStreamToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface SsfStreamsListRequest { + deliveryMethod?: SsfStreamsListDeliveryMethodEnum; + endpointUrl?: string; + ordering?: string; + page?: number; + pageSize?: number; + provider?: number; + search?: string; +} + +export interface SsfStreamsRetrieveRequest { + uuid: string; +} + +/** + * + */ +export class SsfApi extends runtime.BaseAPI { + + /** + * Creates request options for ssfStreamsList without sending the request + */ + async ssfStreamsListRequestOpts(requestParameters: SsfStreamsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['deliveryMethod'] != null) { + queryParameters['delivery_method'] = requestParameters['deliveryMethod']; + } + + if (requestParameters['endpointUrl'] != null) { + queryParameters['endpoint_url'] = requestParameters['endpointUrl']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/ssf/streams/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SSFStream Viewset + */ + async ssfStreamsListRaw(requestParameters: SsfStreamsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.ssfStreamsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSSFStreamListFromJSON(jsonValue)); + } + + /** + * SSFStream Viewset + */ + async ssfStreamsList(requestParameters: SsfStreamsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.ssfStreamsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for ssfStreamsRetrieve without sending the request + */ + async ssfStreamsRetrieveRequestOpts(requestParameters: SsfStreamsRetrieveRequest): Promise { + if (requestParameters['uuid'] == null) { + throw new runtime.RequiredError( + 'uuid', + 'Required parameter "uuid" was null or undefined when calling ssfStreamsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/ssf/streams/{uuid}/`; + urlPath = urlPath.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SSFStream Viewset + */ + async ssfStreamsRetrieveRaw(requestParameters: SsfStreamsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.ssfStreamsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SSFStreamFromJSON(jsonValue)); + } + + /** + * SSFStream Viewset + */ + async ssfStreamsRetrieve(requestParameters: SsfStreamsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.ssfStreamsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const SsfStreamsListDeliveryMethodEnum = { + HttpsSchemasOpenidNetSeceventRiscDeliveryMethodPoll: 'https://schemas.openid.net/secevent/risc/delivery-method/poll', + HttpsSchemasOpenidNetSeceventRiscDeliveryMethodPush: 'https://schemas.openid.net/secevent/risc/delivery-method/push', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SsfStreamsListDeliveryMethodEnum = typeof SsfStreamsListDeliveryMethodEnum[keyof typeof SsfStreamsListDeliveryMethodEnum]; diff --git a/packages/client-ts/src/apis/StagesApi.ts b/packages/client-ts/src/apis/StagesApi.ts new file mode 100644 index 0000000000..58baef8c35 --- /dev/null +++ b/packages/client-ts/src/apis/StagesApi.ts @@ -0,0 +1,13595 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AuthenticatorDuoStage, + AuthenticatorDuoStageDeviceImportResponse, + AuthenticatorDuoStageManualDeviceImportRequest, + AuthenticatorDuoStageRequest, + AuthenticatorEmailStage, + AuthenticatorEmailStageRequest, + AuthenticatorEndpointGDTCStage, + AuthenticatorEndpointGDTCStageRequest, + AuthenticatorSMSStage, + AuthenticatorSMSStageRequest, + AuthenticatorStaticStage, + AuthenticatorStaticStageRequest, + AuthenticatorTOTPStage, + AuthenticatorTOTPStageRequest, + AuthenticatorValidateStage, + AuthenticatorValidateStageRequest, + AuthenticatorWebAuthnStage, + AuthenticatorWebAuthnStageRequest, + CaptchaStage, + CaptchaStageRequest, + ConsentStage, + ConsentStageRequest, + DenyStage, + DenyStageRequest, + DummyStage, + DummyStageRequest, + DuoDeviceEnrollmentStatus, + EmailStage, + EmailStageRequest, + EndpointStage, + EndpointStageRequest, + GenericError, + IdentificationStage, + IdentificationStageRequest, + Invitation, + InvitationRequest, + InvitationSendEmailRequest, + InvitationStage, + InvitationStageRequest, + MutualTLSStage, + MutualTLSStageRequest, + PaginatedAuthenticatorDuoStageList, + PaginatedAuthenticatorEmailStageList, + PaginatedAuthenticatorEndpointGDTCStageList, + PaginatedAuthenticatorSMSStageList, + PaginatedAuthenticatorStaticStageList, + PaginatedAuthenticatorTOTPStageList, + PaginatedAuthenticatorValidateStageList, + PaginatedAuthenticatorWebAuthnStageList, + PaginatedCaptchaStageList, + PaginatedConsentStageList, + PaginatedDenyStageList, + PaginatedDummyStageList, + PaginatedEmailStageList, + PaginatedEndpointStageList, + PaginatedIdentificationStageList, + PaginatedInvitationList, + PaginatedInvitationStageList, + PaginatedMutualTLSStageList, + PaginatedPasswordStageList, + PaginatedPromptList, + PaginatedPromptStageList, + PaginatedRedirectStageList, + PaginatedSourceStageList, + PaginatedStageList, + PaginatedUserDeleteStageList, + PaginatedUserLoginStageList, + PaginatedUserLogoutStageList, + PaginatedUserWriteStageList, + PaginatedWebAuthnDeviceTypeList, + PasswordStage, + PasswordStageRequest, + PatchedAuthenticatorDuoStageRequest, + PatchedAuthenticatorEmailStageRequest, + PatchedAuthenticatorEndpointGDTCStageRequest, + PatchedAuthenticatorSMSStageRequest, + PatchedAuthenticatorStaticStageRequest, + PatchedAuthenticatorTOTPStageRequest, + PatchedAuthenticatorValidateStageRequest, + PatchedAuthenticatorWebAuthnStageRequest, + PatchedCaptchaStageRequest, + PatchedConsentStageRequest, + PatchedDenyStageRequest, + PatchedDummyStageRequest, + PatchedEmailStageRequest, + PatchedEndpointStageRequest, + PatchedIdentificationStageRequest, + PatchedInvitationRequest, + PatchedInvitationStageRequest, + PatchedMutualTLSStageRequest, + PatchedPasswordStageRequest, + PatchedPromptRequest, + PatchedPromptStageRequest, + PatchedRedirectStageRequest, + PatchedSourceStageRequest, + PatchedUserDeleteStageRequest, + PatchedUserLoginStageRequest, + PatchedUserLogoutStageRequest, + PatchedUserWriteStageRequest, + Prompt, + PromptChallenge, + PromptRequest, + PromptStage, + PromptStageRequest, + RedirectStage, + RedirectStageRequest, + SourceStage, + SourceStageRequest, + Stage, + TypeCreate, + UsedBy, + UserDeleteStage, + UserDeleteStageRequest, + UserLoginStage, + UserLoginStageRequest, + UserLogoutStage, + UserLogoutStageRequest, + UserSetting, + UserWriteStage, + UserWriteStageRequest, + ValidationError, + WebAuthnDeviceType, +} from '../models/index'; +import { + AuthenticatorDuoStageFromJSON, + AuthenticatorDuoStageToJSON, + AuthenticatorDuoStageDeviceImportResponseFromJSON, + AuthenticatorDuoStageDeviceImportResponseToJSON, + AuthenticatorDuoStageManualDeviceImportRequestFromJSON, + AuthenticatorDuoStageManualDeviceImportRequestToJSON, + AuthenticatorDuoStageRequestFromJSON, + AuthenticatorDuoStageRequestToJSON, + AuthenticatorEmailStageFromJSON, + AuthenticatorEmailStageToJSON, + AuthenticatorEmailStageRequestFromJSON, + AuthenticatorEmailStageRequestToJSON, + AuthenticatorEndpointGDTCStageFromJSON, + AuthenticatorEndpointGDTCStageToJSON, + AuthenticatorEndpointGDTCStageRequestFromJSON, + AuthenticatorEndpointGDTCStageRequestToJSON, + AuthenticatorSMSStageFromJSON, + AuthenticatorSMSStageToJSON, + AuthenticatorSMSStageRequestFromJSON, + AuthenticatorSMSStageRequestToJSON, + AuthenticatorStaticStageFromJSON, + AuthenticatorStaticStageToJSON, + AuthenticatorStaticStageRequestFromJSON, + AuthenticatorStaticStageRequestToJSON, + AuthenticatorTOTPStageFromJSON, + AuthenticatorTOTPStageToJSON, + AuthenticatorTOTPStageRequestFromJSON, + AuthenticatorTOTPStageRequestToJSON, + AuthenticatorValidateStageFromJSON, + AuthenticatorValidateStageToJSON, + AuthenticatorValidateStageRequestFromJSON, + AuthenticatorValidateStageRequestToJSON, + AuthenticatorWebAuthnStageFromJSON, + AuthenticatorWebAuthnStageToJSON, + AuthenticatorWebAuthnStageRequestFromJSON, + AuthenticatorWebAuthnStageRequestToJSON, + CaptchaStageFromJSON, + CaptchaStageToJSON, + CaptchaStageRequestFromJSON, + CaptchaStageRequestToJSON, + ConsentStageFromJSON, + ConsentStageToJSON, + ConsentStageRequestFromJSON, + ConsentStageRequestToJSON, + DenyStageFromJSON, + DenyStageToJSON, + DenyStageRequestFromJSON, + DenyStageRequestToJSON, + DummyStageFromJSON, + DummyStageToJSON, + DummyStageRequestFromJSON, + DummyStageRequestToJSON, + DuoDeviceEnrollmentStatusFromJSON, + DuoDeviceEnrollmentStatusToJSON, + EmailStageFromJSON, + EmailStageToJSON, + EmailStageRequestFromJSON, + EmailStageRequestToJSON, + EndpointStageFromJSON, + EndpointStageToJSON, + EndpointStageRequestFromJSON, + EndpointStageRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + IdentificationStageFromJSON, + IdentificationStageToJSON, + IdentificationStageRequestFromJSON, + IdentificationStageRequestToJSON, + InvitationFromJSON, + InvitationToJSON, + InvitationRequestFromJSON, + InvitationRequestToJSON, + InvitationSendEmailRequestFromJSON, + InvitationSendEmailRequestToJSON, + InvitationStageFromJSON, + InvitationStageToJSON, + InvitationStageRequestFromJSON, + InvitationStageRequestToJSON, + MutualTLSStageFromJSON, + MutualTLSStageToJSON, + MutualTLSStageRequestFromJSON, + MutualTLSStageRequestToJSON, + PaginatedAuthenticatorDuoStageListFromJSON, + PaginatedAuthenticatorDuoStageListToJSON, + PaginatedAuthenticatorEmailStageListFromJSON, + PaginatedAuthenticatorEmailStageListToJSON, + PaginatedAuthenticatorEndpointGDTCStageListFromJSON, + PaginatedAuthenticatorEndpointGDTCStageListToJSON, + PaginatedAuthenticatorSMSStageListFromJSON, + PaginatedAuthenticatorSMSStageListToJSON, + PaginatedAuthenticatorStaticStageListFromJSON, + PaginatedAuthenticatorStaticStageListToJSON, + PaginatedAuthenticatorTOTPStageListFromJSON, + PaginatedAuthenticatorTOTPStageListToJSON, + PaginatedAuthenticatorValidateStageListFromJSON, + PaginatedAuthenticatorValidateStageListToJSON, + PaginatedAuthenticatorWebAuthnStageListFromJSON, + PaginatedAuthenticatorWebAuthnStageListToJSON, + PaginatedCaptchaStageListFromJSON, + PaginatedCaptchaStageListToJSON, + PaginatedConsentStageListFromJSON, + PaginatedConsentStageListToJSON, + PaginatedDenyStageListFromJSON, + PaginatedDenyStageListToJSON, + PaginatedDummyStageListFromJSON, + PaginatedDummyStageListToJSON, + PaginatedEmailStageListFromJSON, + PaginatedEmailStageListToJSON, + PaginatedEndpointStageListFromJSON, + PaginatedEndpointStageListToJSON, + PaginatedIdentificationStageListFromJSON, + PaginatedIdentificationStageListToJSON, + PaginatedInvitationListFromJSON, + PaginatedInvitationListToJSON, + PaginatedInvitationStageListFromJSON, + PaginatedInvitationStageListToJSON, + PaginatedMutualTLSStageListFromJSON, + PaginatedMutualTLSStageListToJSON, + PaginatedPasswordStageListFromJSON, + PaginatedPasswordStageListToJSON, + PaginatedPromptListFromJSON, + PaginatedPromptListToJSON, + PaginatedPromptStageListFromJSON, + PaginatedPromptStageListToJSON, + PaginatedRedirectStageListFromJSON, + PaginatedRedirectStageListToJSON, + PaginatedSourceStageListFromJSON, + PaginatedSourceStageListToJSON, + PaginatedStageListFromJSON, + PaginatedStageListToJSON, + PaginatedUserDeleteStageListFromJSON, + PaginatedUserDeleteStageListToJSON, + PaginatedUserLoginStageListFromJSON, + PaginatedUserLoginStageListToJSON, + PaginatedUserLogoutStageListFromJSON, + PaginatedUserLogoutStageListToJSON, + PaginatedUserWriteStageListFromJSON, + PaginatedUserWriteStageListToJSON, + PaginatedWebAuthnDeviceTypeListFromJSON, + PaginatedWebAuthnDeviceTypeListToJSON, + PasswordStageFromJSON, + PasswordStageToJSON, + PasswordStageRequestFromJSON, + PasswordStageRequestToJSON, + PatchedAuthenticatorDuoStageRequestFromJSON, + PatchedAuthenticatorDuoStageRequestToJSON, + PatchedAuthenticatorEmailStageRequestFromJSON, + PatchedAuthenticatorEmailStageRequestToJSON, + PatchedAuthenticatorEndpointGDTCStageRequestFromJSON, + PatchedAuthenticatorEndpointGDTCStageRequestToJSON, + PatchedAuthenticatorSMSStageRequestFromJSON, + PatchedAuthenticatorSMSStageRequestToJSON, + PatchedAuthenticatorStaticStageRequestFromJSON, + PatchedAuthenticatorStaticStageRequestToJSON, + PatchedAuthenticatorTOTPStageRequestFromJSON, + PatchedAuthenticatorTOTPStageRequestToJSON, + PatchedAuthenticatorValidateStageRequestFromJSON, + PatchedAuthenticatorValidateStageRequestToJSON, + PatchedAuthenticatorWebAuthnStageRequestFromJSON, + PatchedAuthenticatorWebAuthnStageRequestToJSON, + PatchedCaptchaStageRequestFromJSON, + PatchedCaptchaStageRequestToJSON, + PatchedConsentStageRequestFromJSON, + PatchedConsentStageRequestToJSON, + PatchedDenyStageRequestFromJSON, + PatchedDenyStageRequestToJSON, + PatchedDummyStageRequestFromJSON, + PatchedDummyStageRequestToJSON, + PatchedEmailStageRequestFromJSON, + PatchedEmailStageRequestToJSON, + PatchedEndpointStageRequestFromJSON, + PatchedEndpointStageRequestToJSON, + PatchedIdentificationStageRequestFromJSON, + PatchedIdentificationStageRequestToJSON, + PatchedInvitationRequestFromJSON, + PatchedInvitationRequestToJSON, + PatchedInvitationStageRequestFromJSON, + PatchedInvitationStageRequestToJSON, + PatchedMutualTLSStageRequestFromJSON, + PatchedMutualTLSStageRequestToJSON, + PatchedPasswordStageRequestFromJSON, + PatchedPasswordStageRequestToJSON, + PatchedPromptRequestFromJSON, + PatchedPromptRequestToJSON, + PatchedPromptStageRequestFromJSON, + PatchedPromptStageRequestToJSON, + PatchedRedirectStageRequestFromJSON, + PatchedRedirectStageRequestToJSON, + PatchedSourceStageRequestFromJSON, + PatchedSourceStageRequestToJSON, + PatchedUserDeleteStageRequestFromJSON, + PatchedUserDeleteStageRequestToJSON, + PatchedUserLoginStageRequestFromJSON, + PatchedUserLoginStageRequestToJSON, + PatchedUserLogoutStageRequestFromJSON, + PatchedUserLogoutStageRequestToJSON, + PatchedUserWriteStageRequestFromJSON, + PatchedUserWriteStageRequestToJSON, + PromptFromJSON, + PromptToJSON, + PromptChallengeFromJSON, + PromptChallengeToJSON, + PromptRequestFromJSON, + PromptRequestToJSON, + PromptStageFromJSON, + PromptStageToJSON, + PromptStageRequestFromJSON, + PromptStageRequestToJSON, + RedirectStageFromJSON, + RedirectStageToJSON, + RedirectStageRequestFromJSON, + RedirectStageRequestToJSON, + SourceStageFromJSON, + SourceStageToJSON, + SourceStageRequestFromJSON, + SourceStageRequestToJSON, + StageFromJSON, + StageToJSON, + TypeCreateFromJSON, + TypeCreateToJSON, + UsedByFromJSON, + UsedByToJSON, + UserDeleteStageFromJSON, + UserDeleteStageToJSON, + UserDeleteStageRequestFromJSON, + UserDeleteStageRequestToJSON, + UserLoginStageFromJSON, + UserLoginStageToJSON, + UserLoginStageRequestFromJSON, + UserLoginStageRequestToJSON, + UserLogoutStageFromJSON, + UserLogoutStageToJSON, + UserLogoutStageRequestFromJSON, + UserLogoutStageRequestToJSON, + UserSettingFromJSON, + UserSettingToJSON, + UserWriteStageFromJSON, + UserWriteStageToJSON, + UserWriteStageRequestFromJSON, + UserWriteStageRequestToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, + WebAuthnDeviceTypeFromJSON, + WebAuthnDeviceTypeToJSON, +} from '../models/index'; + +export interface StagesAllDestroyRequest { + stageUuid: string; +} + +export interface StagesAllListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesAllRetrieveRequest { + stageUuid: string; +} + +export interface StagesAllUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorDuoCreateRequest { + authenticatorDuoStageRequest: AuthenticatorDuoStageRequest; +} + +export interface StagesAuthenticatorDuoDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorDuoEnrollmentStatusCreateRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorDuoImportDeviceManualCreateRequest { + stageUuid: string; + authenticatorDuoStageManualDeviceImportRequest: AuthenticatorDuoStageManualDeviceImportRequest; +} + +export interface StagesAuthenticatorDuoImportDevicesAutomaticCreateRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorDuoListRequest { + apiHostname?: string; + clientId?: string; + configureFlow?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesAuthenticatorDuoPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorDuoStageRequest?: PatchedAuthenticatorDuoStageRequest; +} + +export interface StagesAuthenticatorDuoRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorDuoUpdateRequest { + stageUuid: string; + authenticatorDuoStageRequest: AuthenticatorDuoStageRequest; +} + +export interface StagesAuthenticatorDuoUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorEmailCreateRequest { + authenticatorEmailStageRequest: AuthenticatorEmailStageRequest; +} + +export interface StagesAuthenticatorEmailDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorEmailListRequest { + configureFlow?: string; + friendlyName?: string; + fromAddress?: string; + host?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + password?: string; + port?: number; + search?: string; + stageUuid?: string; + subject?: string; + template?: string; + timeout?: number; + tokenExpiry?: string; + useGlobalSettings?: boolean; + useSsl?: boolean; + useTls?: boolean; + username?: string; +} + +export interface StagesAuthenticatorEmailPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorEmailStageRequest?: PatchedAuthenticatorEmailStageRequest; +} + +export interface StagesAuthenticatorEmailRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorEmailUpdateRequest { + stageUuid: string; + authenticatorEmailStageRequest: AuthenticatorEmailStageRequest; +} + +export interface StagesAuthenticatorEmailUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorEndpointGdtcCreateRequest { + authenticatorEndpointGDTCStageRequest: AuthenticatorEndpointGDTCStageRequest; +} + +export interface StagesAuthenticatorEndpointGdtcDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorEndpointGdtcListRequest { + configureFlow?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesAuthenticatorEndpointGdtcPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorEndpointGDTCStageRequest?: PatchedAuthenticatorEndpointGDTCStageRequest; +} + +export interface StagesAuthenticatorEndpointGdtcRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorEndpointGdtcUpdateRequest { + stageUuid: string; + authenticatorEndpointGDTCStageRequest: AuthenticatorEndpointGDTCStageRequest; +} + +export interface StagesAuthenticatorEndpointGdtcUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorSmsCreateRequest { + authenticatorSMSStageRequest: AuthenticatorSMSStageRequest; +} + +export interface StagesAuthenticatorSmsDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorSmsListRequest { + accountSid?: string; + auth?: string; + authPassword?: string; + authType?: StagesAuthenticatorSmsListAuthTypeEnum; + configureFlow?: string; + friendlyName?: string; + fromNumber?: string; + mapping?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + provider?: StagesAuthenticatorSmsListProviderEnum; + search?: string; + stageUuid?: string; + verifyOnly?: boolean; +} + +export interface StagesAuthenticatorSmsPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorSMSStageRequest?: PatchedAuthenticatorSMSStageRequest; +} + +export interface StagesAuthenticatorSmsRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorSmsUpdateRequest { + stageUuid: string; + authenticatorSMSStageRequest: AuthenticatorSMSStageRequest; +} + +export interface StagesAuthenticatorSmsUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorStaticCreateRequest { + authenticatorStaticStageRequest: AuthenticatorStaticStageRequest; +} + +export interface StagesAuthenticatorStaticDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorStaticListRequest { + configureFlow?: string; + friendlyName?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; + tokenCount?: number; + tokenLength?: number; +} + +export interface StagesAuthenticatorStaticPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorStaticStageRequest?: PatchedAuthenticatorStaticStageRequest; +} + +export interface StagesAuthenticatorStaticRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorStaticUpdateRequest { + stageUuid: string; + authenticatorStaticStageRequest: AuthenticatorStaticStageRequest; +} + +export interface StagesAuthenticatorStaticUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorTotpCreateRequest { + authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest; +} + +export interface StagesAuthenticatorTotpDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorTotpListRequest { + configureFlow?: string; + digits?: StagesAuthenticatorTotpListDigitsEnum; + friendlyName?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; +} + +export interface StagesAuthenticatorTotpPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorTOTPStageRequest?: PatchedAuthenticatorTOTPStageRequest; +} + +export interface StagesAuthenticatorTotpRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorTotpUpdateRequest { + stageUuid: string; + authenticatorTOTPStageRequest: AuthenticatorTOTPStageRequest; +} + +export interface StagesAuthenticatorTotpUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorValidateCreateRequest { + authenticatorValidateStageRequest: AuthenticatorValidateStageRequest; +} + +export interface StagesAuthenticatorValidateDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorValidateListRequest { + configurationStages?: Array; + name?: string; + notConfiguredAction?: StagesAuthenticatorValidateListNotConfiguredActionEnum; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesAuthenticatorValidatePartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorValidateStageRequest?: PatchedAuthenticatorValidateStageRequest; +} + +export interface StagesAuthenticatorValidateRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorValidateUpdateRequest { + stageUuid: string; + authenticatorValidateStageRequest: AuthenticatorValidateStageRequest; +} + +export interface StagesAuthenticatorValidateUsedByListRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorWebauthnCreateRequest { + authenticatorWebAuthnStageRequest: AuthenticatorWebAuthnStageRequest; +} + +export interface StagesAuthenticatorWebauthnDestroyRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorWebauthnDeviceTypesListRequest { + aaguid?: string; + description?: string; + icon?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesAuthenticatorWebauthnDeviceTypesRetrieveRequest { + aaguid: string; +} + +export interface StagesAuthenticatorWebauthnListRequest { + authenticatorAttachment?: StagesAuthenticatorWebauthnListAuthenticatorAttachmentEnum; + configureFlow?: string; + deviceTypeRestrictions?: Array; + maxAttempts?: number; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + residentKeyRequirement?: StagesAuthenticatorWebauthnListResidentKeyRequirementEnum; + search?: string; + userVerification?: StagesAuthenticatorWebauthnListUserVerificationEnum; +} + +export interface StagesAuthenticatorWebauthnPartialUpdateRequest { + stageUuid: string; + patchedAuthenticatorWebAuthnStageRequest?: PatchedAuthenticatorWebAuthnStageRequest; +} + +export interface StagesAuthenticatorWebauthnRetrieveRequest { + stageUuid: string; +} + +export interface StagesAuthenticatorWebauthnUpdateRequest { + stageUuid: string; + authenticatorWebAuthnStageRequest: AuthenticatorWebAuthnStageRequest; +} + +export interface StagesAuthenticatorWebauthnUsedByListRequest { + stageUuid: string; +} + +export interface StagesCaptchaCreateRequest { + captchaStageRequest: CaptchaStageRequest; +} + +export interface StagesCaptchaDestroyRequest { + stageUuid: string; +} + +export interface StagesCaptchaListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + publicKey?: string; + search?: string; +} + +export interface StagesCaptchaPartialUpdateRequest { + stageUuid: string; + patchedCaptchaStageRequest?: PatchedCaptchaStageRequest; +} + +export interface StagesCaptchaRetrieveRequest { + stageUuid: string; +} + +export interface StagesCaptchaUpdateRequest { + stageUuid: string; + captchaStageRequest: CaptchaStageRequest; +} + +export interface StagesCaptchaUsedByListRequest { + stageUuid: string; +} + +export interface StagesConsentCreateRequest { + consentStageRequest: ConsentStageRequest; +} + +export interface StagesConsentDestroyRequest { + stageUuid: string; +} + +export interface StagesConsentListRequest { + consentExpireIn?: string; + mode?: StagesConsentListModeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; +} + +export interface StagesConsentPartialUpdateRequest { + stageUuid: string; + patchedConsentStageRequest?: PatchedConsentStageRequest; +} + +export interface StagesConsentRetrieveRequest { + stageUuid: string; +} + +export interface StagesConsentUpdateRequest { + stageUuid: string; + consentStageRequest: ConsentStageRequest; +} + +export interface StagesConsentUsedByListRequest { + stageUuid: string; +} + +export interface StagesDenyCreateRequest { + denyStageRequest: DenyStageRequest; +} + +export interface StagesDenyDestroyRequest { + stageUuid: string; +} + +export interface StagesDenyListRequest { + denyMessage?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; +} + +export interface StagesDenyPartialUpdateRequest { + stageUuid: string; + patchedDenyStageRequest?: PatchedDenyStageRequest; +} + +export interface StagesDenyRetrieveRequest { + stageUuid: string; +} + +export interface StagesDenyUpdateRequest { + stageUuid: string; + denyStageRequest: DenyStageRequest; +} + +export interface StagesDenyUsedByListRequest { + stageUuid: string; +} + +export interface StagesDummyCreateRequest { + dummyStageRequest: DummyStageRequest; +} + +export interface StagesDummyDestroyRequest { + stageUuid: string; +} + +export interface StagesDummyListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; + throwError?: boolean; +} + +export interface StagesDummyPartialUpdateRequest { + stageUuid: string; + patchedDummyStageRequest?: PatchedDummyStageRequest; +} + +export interface StagesDummyRetrieveRequest { + stageUuid: string; +} + +export interface StagesDummyUpdateRequest { + stageUuid: string; + dummyStageRequest: DummyStageRequest; +} + +export interface StagesDummyUsedByListRequest { + stageUuid: string; +} + +export interface StagesEmailCreateRequest { + emailStageRequest: EmailStageRequest; +} + +export interface StagesEmailDestroyRequest { + stageUuid: string; +} + +export interface StagesEmailListRequest { + activateUserOnSuccess?: boolean; + fromAddress?: string; + host?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + port?: number; + search?: string; + subject?: string; + template?: string; + timeout?: number; + tokenExpiry?: string; + useGlobalSettings?: boolean; + useSsl?: boolean; + useTls?: boolean; + username?: string; +} + +export interface StagesEmailPartialUpdateRequest { + stageUuid: string; + patchedEmailStageRequest?: PatchedEmailStageRequest; +} + +export interface StagesEmailRetrieveRequest { + stageUuid: string; +} + +export interface StagesEmailUpdateRequest { + stageUuid: string; + emailStageRequest: EmailStageRequest; +} + +export interface StagesEmailUsedByListRequest { + stageUuid: string; +} + +export interface StagesEndpointsCreateRequest { + endpointStageRequest: EndpointStageRequest; +} + +export interface StagesEndpointsDestroyRequest { + stageUuid: string; +} + +export interface StagesEndpointsListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesEndpointsPartialUpdateRequest { + stageUuid: string; + patchedEndpointStageRequest?: PatchedEndpointStageRequest; +} + +export interface StagesEndpointsRetrieveRequest { + stageUuid: string; +} + +export interface StagesEndpointsUpdateRequest { + stageUuid: string; + endpointStageRequest: EndpointStageRequest; +} + +export interface StagesEndpointsUsedByListRequest { + stageUuid: string; +} + +export interface StagesIdentificationCreateRequest { + identificationStageRequest: IdentificationStageRequest; +} + +export interface StagesIdentificationDestroyRequest { + stageUuid: string; +} + +export interface StagesIdentificationListRequest { + captchaStage?: string; + caseInsensitiveMatching?: boolean; + enrollmentFlow?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + passwordStage?: string; + passwordlessFlow?: string; + recoveryFlow?: string; + search?: string; + showMatchedUser?: boolean; + showSourceLabels?: boolean; + webauthnStage?: string; +} + +export interface StagesIdentificationPartialUpdateRequest { + stageUuid: string; + patchedIdentificationStageRequest?: PatchedIdentificationStageRequest; +} + +export interface StagesIdentificationRetrieveRequest { + stageUuid: string; +} + +export interface StagesIdentificationUpdateRequest { + stageUuid: string; + identificationStageRequest: IdentificationStageRequest; +} + +export interface StagesIdentificationUsedByListRequest { + stageUuid: string; +} + +export interface StagesInvitationInvitationsCreateRequest { + invitationRequest: InvitationRequest; +} + +export interface StagesInvitationInvitationsDestroyRequest { + inviteUuid: string; +} + +export interface StagesInvitationInvitationsListRequest { + createdByUsername?: string; + expires?: Date; + flowSlug?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesInvitationInvitationsPartialUpdateRequest { + inviteUuid: string; + patchedInvitationRequest?: PatchedInvitationRequest; +} + +export interface StagesInvitationInvitationsRetrieveRequest { + inviteUuid: string; +} + +export interface StagesInvitationInvitationsSendEmailCreateRequest { + inviteUuid: string; + invitationSendEmailRequest: InvitationSendEmailRequest; +} + +export interface StagesInvitationInvitationsUpdateRequest { + inviteUuid: string; + invitationRequest: InvitationRequest; +} + +export interface StagesInvitationInvitationsUsedByListRequest { + inviteUuid: string; +} + +export interface StagesInvitationStagesCreateRequest { + invitationStageRequest: InvitationStageRequest; +} + +export interface StagesInvitationStagesDestroyRequest { + stageUuid: string; +} + +export interface StagesInvitationStagesListRequest { + continueFlowWithoutInvitation?: boolean; + name?: string; + noFlows?: boolean; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; +} + +export interface StagesInvitationStagesPartialUpdateRequest { + stageUuid: string; + patchedInvitationStageRequest?: PatchedInvitationStageRequest; +} + +export interface StagesInvitationStagesRetrieveRequest { + stageUuid: string; +} + +export interface StagesInvitationStagesUpdateRequest { + stageUuid: string; + invitationStageRequest: InvitationStageRequest; +} + +export interface StagesInvitationStagesUsedByListRequest { + stageUuid: string; +} + +export interface StagesMtlsCreateRequest { + mutualTLSStageRequest: MutualTLSStageRequest; +} + +export interface StagesMtlsDestroyRequest { + stageUuid: string; +} + +export interface StagesMtlsListRequest { + certAttribute?: StagesMtlsListCertAttributeEnum; + certificateAuthorities?: Array; + mode?: StagesMtlsListModeEnum; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; + userAttribute?: StagesMtlsListUserAttributeEnum; +} + +export interface StagesMtlsPartialUpdateRequest { + stageUuid: string; + patchedMutualTLSStageRequest?: PatchedMutualTLSStageRequest; +} + +export interface StagesMtlsRetrieveRequest { + stageUuid: string; +} + +export interface StagesMtlsUpdateRequest { + stageUuid: string; + mutualTLSStageRequest: MutualTLSStageRequest; +} + +export interface StagesMtlsUsedByListRequest { + stageUuid: string; +} + +export interface StagesPasswordCreateRequest { + passwordStageRequest: PasswordStageRequest; +} + +export interface StagesPasswordDestroyRequest { + stageUuid: string; +} + +export interface StagesPasswordListRequest { + allowShowPassword?: boolean; + configureFlow?: string; + failedAttemptsBeforeCancel?: number; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesPasswordPartialUpdateRequest { + stageUuid: string; + patchedPasswordStageRequest?: PatchedPasswordStageRequest; +} + +export interface StagesPasswordRetrieveRequest { + stageUuid: string; +} + +export interface StagesPasswordUpdateRequest { + stageUuid: string; + passwordStageRequest: PasswordStageRequest; +} + +export interface StagesPasswordUsedByListRequest { + stageUuid: string; +} + +export interface StagesPromptPromptsCreateRequest { + promptRequest: PromptRequest; +} + +export interface StagesPromptPromptsDestroyRequest { + promptUuid: string; +} + +export interface StagesPromptPromptsListRequest { + fieldKey?: string; + label?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + placeholder?: string; + search?: string; + type?: StagesPromptPromptsListTypeEnum; +} + +export interface StagesPromptPromptsPartialUpdateRequest { + promptUuid: string; + patchedPromptRequest?: PatchedPromptRequest; +} + +export interface StagesPromptPromptsPreviewCreateRequest { + promptRequest: PromptRequest; +} + +export interface StagesPromptPromptsRetrieveRequest { + promptUuid: string; +} + +export interface StagesPromptPromptsUpdateRequest { + promptUuid: string; + promptRequest: PromptRequest; +} + +export interface StagesPromptPromptsUsedByListRequest { + promptUuid: string; +} + +export interface StagesPromptStagesCreateRequest { + promptStageRequest: PromptStageRequest; +} + +export interface StagesPromptStagesDestroyRequest { + stageUuid: string; +} + +export interface StagesPromptStagesListRequest { + fields?: Array; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; + validationPolicies?: Array; +} + +export interface StagesPromptStagesPartialUpdateRequest { + stageUuid: string; + patchedPromptStageRequest?: PatchedPromptStageRequest; +} + +export interface StagesPromptStagesRetrieveRequest { + stageUuid: string; +} + +export interface StagesPromptStagesUpdateRequest { + stageUuid: string; + promptStageRequest: PromptStageRequest; +} + +export interface StagesPromptStagesUsedByListRequest { + stageUuid: string; +} + +export interface StagesRedirectCreateRequest { + redirectStageRequest: RedirectStageRequest; +} + +export interface StagesRedirectDestroyRequest { + stageUuid: string; +} + +export interface StagesRedirectListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface StagesRedirectPartialUpdateRequest { + stageUuid: string; + patchedRedirectStageRequest?: PatchedRedirectStageRequest; +} + +export interface StagesRedirectRetrieveRequest { + stageUuid: string; +} + +export interface StagesRedirectUpdateRequest { + stageUuid: string; + redirectStageRequest: RedirectStageRequest; +} + +export interface StagesRedirectUsedByListRequest { + stageUuid: string; +} + +export interface StagesSourceCreateRequest { + sourceStageRequest: SourceStageRequest; +} + +export interface StagesSourceDestroyRequest { + stageUuid: string; +} + +export interface StagesSourceListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + resumeTimeout?: string; + search?: string; + source?: string; + stageUuid?: string; +} + +export interface StagesSourcePartialUpdateRequest { + stageUuid: string; + patchedSourceStageRequest?: PatchedSourceStageRequest; +} + +export interface StagesSourceRetrieveRequest { + stageUuid: string; +} + +export interface StagesSourceUpdateRequest { + stageUuid: string; + sourceStageRequest: SourceStageRequest; +} + +export interface StagesSourceUsedByListRequest { + stageUuid: string; +} + +export interface StagesUserDeleteCreateRequest { + userDeleteStageRequest: UserDeleteStageRequest; +} + +export interface StagesUserDeleteDestroyRequest { + stageUuid: string; +} + +export interface StagesUserDeleteListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; +} + +export interface StagesUserDeletePartialUpdateRequest { + stageUuid: string; + patchedUserDeleteStageRequest?: PatchedUserDeleteStageRequest; +} + +export interface StagesUserDeleteRetrieveRequest { + stageUuid: string; +} + +export interface StagesUserDeleteUpdateRequest { + stageUuid: string; + userDeleteStageRequest: UserDeleteStageRequest; +} + +export interface StagesUserDeleteUsedByListRequest { + stageUuid: string; +} + +export interface StagesUserLoginCreateRequest { + userLoginStageRequest: UserLoginStageRequest; +} + +export interface StagesUserLoginDestroyRequest { + stageUuid: string; +} + +export interface StagesUserLoginListRequest { + geoipBinding?: StagesUserLoginListGeoipBindingEnum; + name?: string; + networkBinding?: StagesUserLoginListNetworkBindingEnum; + ordering?: string; + page?: number; + pageSize?: number; + rememberDevice?: string; + rememberMeOffset?: string; + search?: string; + sessionDuration?: string; + stageUuid?: string; + terminateOtherSessions?: boolean; +} + +export interface StagesUserLoginPartialUpdateRequest { + stageUuid: string; + patchedUserLoginStageRequest?: PatchedUserLoginStageRequest; +} + +export interface StagesUserLoginRetrieveRequest { + stageUuid: string; +} + +export interface StagesUserLoginUpdateRequest { + stageUuid: string; + userLoginStageRequest: UserLoginStageRequest; +} + +export interface StagesUserLoginUsedByListRequest { + stageUuid: string; +} + +export interface StagesUserLogoutCreateRequest { + userLogoutStageRequest: UserLogoutStageRequest; +} + +export interface StagesUserLogoutDestroyRequest { + stageUuid: string; +} + +export interface StagesUserLogoutListRequest { + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; +} + +export interface StagesUserLogoutPartialUpdateRequest { + stageUuid: string; + patchedUserLogoutStageRequest?: PatchedUserLogoutStageRequest; +} + +export interface StagesUserLogoutRetrieveRequest { + stageUuid: string; +} + +export interface StagesUserLogoutUpdateRequest { + stageUuid: string; + userLogoutStageRequest: UserLogoutStageRequest; +} + +export interface StagesUserLogoutUsedByListRequest { + stageUuid: string; +} + +export interface StagesUserWriteCreateRequest { + userWriteStageRequest: UserWriteStageRequest; +} + +export interface StagesUserWriteDestroyRequest { + stageUuid: string; +} + +export interface StagesUserWriteListRequest { + createUsersAsInactive?: boolean; + createUsersGroup?: string; + name?: string; + ordering?: string; + page?: number; + pageSize?: number; + search?: string; + stageUuid?: string; + userCreationMode?: StagesUserWriteListUserCreationModeEnum; + userPathTemplate?: string; + userType?: StagesUserWriteListUserTypeEnum; +} + +export interface StagesUserWritePartialUpdateRequest { + stageUuid: string; + patchedUserWriteStageRequest?: PatchedUserWriteStageRequest; +} + +export interface StagesUserWriteRetrieveRequest { + stageUuid: string; +} + +export interface StagesUserWriteUpdateRequest { + stageUuid: string; + userWriteStageRequest: UserWriteStageRequest; +} + +export interface StagesUserWriteUsedByListRequest { + stageUuid: string; +} + +/** + * + */ +export class StagesApi extends runtime.BaseAPI { + + /** + * Creates request options for stagesAllDestroy without sending the request + */ + async stagesAllDestroyRequestOpts(requestParameters: StagesAllDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAllDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/all/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Stage Viewset + */ + async stagesAllDestroyRaw(requestParameters: StagesAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAllDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Stage Viewset + */ + async stagesAllDestroy(requestParameters: StagesAllDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAllDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAllList without sending the request + */ + async stagesAllListRequestOpts(requestParameters: StagesAllListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/all/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Stage Viewset + */ + async stagesAllListRaw(requestParameters: StagesAllListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAllListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStageListFromJSON(jsonValue)); + } + + /** + * Stage Viewset + */ + async stagesAllList(requestParameters: StagesAllListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAllListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAllRetrieve without sending the request + */ + async stagesAllRetrieveRequestOpts(requestParameters: StagesAllRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAllRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/all/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Stage Viewset + */ + async stagesAllRetrieveRaw(requestParameters: StagesAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAllRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StageFromJSON(jsonValue)); + } + + /** + * Stage Viewset + */ + async stagesAllRetrieve(requestParameters: StagesAllRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAllRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAllTypesList without sending the request + */ + async stagesAllTypesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/all/types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all creatable types + */ + async stagesAllTypesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAllTypesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all creatable types + */ + async stagesAllTypesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAllTypesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAllUsedByList without sending the request + */ + async stagesAllUsedByListRequestOpts(requestParameters: StagesAllUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAllUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/all/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAllUsedByListRaw(requestParameters: StagesAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAllUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAllUsedByList(requestParameters: StagesAllUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAllUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAllUserSettingsList without sending the request + */ + async stagesAllUserSettingsListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/all/user_settings/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all stages the user can configure + */ + async stagesAllUserSettingsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAllUserSettingsListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserSettingFromJSON)); + } + + /** + * Get all stages the user can configure + */ + async stagesAllUserSettingsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAllUserSettingsListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoCreate without sending the request + */ + async stagesAuthenticatorDuoCreateRequestOpts(requestParameters: StagesAuthenticatorDuoCreateRequest): Promise { + if (requestParameters['authenticatorDuoStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorDuoStageRequest', + 'Required parameter "authenticatorDuoStageRequest" was null or undefined when calling stagesAuthenticatorDuoCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorDuoStageRequestToJSON(requestParameters['authenticatorDuoStageRequest']), + }; + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoCreateRaw(requestParameters: StagesAuthenticatorDuoCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorDuoStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoCreate(requestParameters: StagesAuthenticatorDuoCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoDestroy without sending the request + */ + async stagesAuthenticatorDuoDestroyRequestOpts(requestParameters: StagesAuthenticatorDuoDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoDestroyRaw(requestParameters: StagesAuthenticatorDuoDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoDestroy(requestParameters: StagesAuthenticatorDuoDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorDuoDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorDuoEnrollmentStatusCreate without sending the request + */ + async stagesAuthenticatorDuoEnrollmentStatusCreateRequestOpts(requestParameters: StagesAuthenticatorDuoEnrollmentStatusCreateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoEnrollmentStatusCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/enrollment_status/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Check enrollment status of user details in current session + */ + async stagesAuthenticatorDuoEnrollmentStatusCreateRaw(requestParameters: StagesAuthenticatorDuoEnrollmentStatusCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoEnrollmentStatusCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DuoDeviceEnrollmentStatusFromJSON(jsonValue)); + } + + /** + * Check enrollment status of user details in current session + */ + async stagesAuthenticatorDuoEnrollmentStatusCreate(requestParameters: StagesAuthenticatorDuoEnrollmentStatusCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoEnrollmentStatusCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoImportDeviceManualCreate without sending the request + */ + async stagesAuthenticatorDuoImportDeviceManualCreateRequestOpts(requestParameters: StagesAuthenticatorDuoImportDeviceManualCreateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoImportDeviceManualCreate().' + ); + } + + if (requestParameters['authenticatorDuoStageManualDeviceImportRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorDuoStageManualDeviceImportRequest', + 'Required parameter "authenticatorDuoStageManualDeviceImportRequest" was null or undefined when calling stagesAuthenticatorDuoImportDeviceManualCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/import_device_manual/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorDuoStageManualDeviceImportRequestToJSON(requestParameters['authenticatorDuoStageManualDeviceImportRequest']), + }; + } + + /** + * Import duo devices into authentik + */ + async stagesAuthenticatorDuoImportDeviceManualCreateRaw(requestParameters: StagesAuthenticatorDuoImportDeviceManualCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoImportDeviceManualCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Import duo devices into authentik + */ + async stagesAuthenticatorDuoImportDeviceManualCreate(requestParameters: StagesAuthenticatorDuoImportDeviceManualCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorDuoImportDeviceManualCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorDuoImportDevicesAutomaticCreate without sending the request + */ + async stagesAuthenticatorDuoImportDevicesAutomaticCreateRequestOpts(requestParameters: StagesAuthenticatorDuoImportDevicesAutomaticCreateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoImportDevicesAutomaticCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/import_devices_automatic/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Import duo devices into authentik + */ + async stagesAuthenticatorDuoImportDevicesAutomaticCreateRaw(requestParameters: StagesAuthenticatorDuoImportDevicesAutomaticCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoImportDevicesAutomaticCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorDuoStageDeviceImportResponseFromJSON(jsonValue)); + } + + /** + * Import duo devices into authentik + */ + async stagesAuthenticatorDuoImportDevicesAutomaticCreate(requestParameters: StagesAuthenticatorDuoImportDevicesAutomaticCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoImportDevicesAutomaticCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoList without sending the request + */ + async stagesAuthenticatorDuoListRequestOpts(requestParameters: StagesAuthenticatorDuoListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['apiHostname'] != null) { + queryParameters['api_hostname'] = requestParameters['apiHostname']; + } + + if (requestParameters['clientId'] != null) { + queryParameters['client_id'] = requestParameters['clientId']; + } + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoListRaw(requestParameters: StagesAuthenticatorDuoListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorDuoStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoList(requestParameters: StagesAuthenticatorDuoListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoPartialUpdate without sending the request + */ + async stagesAuthenticatorDuoPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorDuoPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorDuoStageRequestToJSON(requestParameters['patchedAuthenticatorDuoStageRequest']), + }; + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoPartialUpdateRaw(requestParameters: StagesAuthenticatorDuoPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorDuoStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoPartialUpdate(requestParameters: StagesAuthenticatorDuoPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoRetrieve without sending the request + */ + async stagesAuthenticatorDuoRetrieveRequestOpts(requestParameters: StagesAuthenticatorDuoRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoRetrieveRaw(requestParameters: StagesAuthenticatorDuoRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorDuoStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoRetrieve(requestParameters: StagesAuthenticatorDuoRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoUpdate without sending the request + */ + async stagesAuthenticatorDuoUpdateRequestOpts(requestParameters: StagesAuthenticatorDuoUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoUpdate().' + ); + } + + if (requestParameters['authenticatorDuoStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorDuoStageRequest', + 'Required parameter "authenticatorDuoStageRequest" was null or undefined when calling stagesAuthenticatorDuoUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorDuoStageRequestToJSON(requestParameters['authenticatorDuoStageRequest']), + }; + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoUpdateRaw(requestParameters: StagesAuthenticatorDuoUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorDuoUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorDuoStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorDuoStage Viewset + */ + async stagesAuthenticatorDuoUpdate(requestParameters: StagesAuthenticatorDuoUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorDuoUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorDuoUsedByList without sending the request + */ + async stagesAuthenticatorDuoUsedByListRequestOpts(requestParameters: StagesAuthenticatorDuoUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorDuoUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/duo/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorDuoUsedByListRaw(requestParameters: StagesAuthenticatorDuoUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorDuoUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorDuoUsedByList(requestParameters: StagesAuthenticatorDuoUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorDuoUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEmailCreate without sending the request + */ + async stagesAuthenticatorEmailCreateRequestOpts(requestParameters: StagesAuthenticatorEmailCreateRequest): Promise { + if (requestParameters['authenticatorEmailStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorEmailStageRequest', + 'Required parameter "authenticatorEmailStageRequest" was null or undefined when calling stagesAuthenticatorEmailCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorEmailStageRequestToJSON(requestParameters['authenticatorEmailStageRequest']), + }; + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailCreateRaw(requestParameters: StagesAuthenticatorEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEmailCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailCreate(requestParameters: StagesAuthenticatorEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEmailCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEmailDestroy without sending the request + */ + async stagesAuthenticatorEmailDestroyRequestOpts(requestParameters: StagesAuthenticatorEmailDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailDestroyRaw(requestParameters: StagesAuthenticatorEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEmailDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailDestroy(requestParameters: StagesAuthenticatorEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorEmailDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorEmailList without sending the request + */ + async stagesAuthenticatorEmailListRequestOpts(requestParameters: StagesAuthenticatorEmailListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['friendlyName'] != null) { + queryParameters['friendly_name'] = requestParameters['friendlyName']; + } + + if (requestParameters['fromAddress'] != null) { + queryParameters['from_address'] = requestParameters['fromAddress']; + } + + if (requestParameters['host'] != null) { + queryParameters['host'] = requestParameters['host']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['password'] != null) { + queryParameters['password'] = requestParameters['password']; + } + + if (requestParameters['port'] != null) { + queryParameters['port'] = requestParameters['port']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['template'] != null) { + queryParameters['template'] = requestParameters['template']; + } + + if (requestParameters['timeout'] != null) { + queryParameters['timeout'] = requestParameters['timeout']; + } + + if (requestParameters['tokenExpiry'] != null) { + queryParameters['token_expiry'] = requestParameters['tokenExpiry']; + } + + if (requestParameters['useGlobalSettings'] != null) { + queryParameters['use_global_settings'] = requestParameters['useGlobalSettings']; + } + + if (requestParameters['useSsl'] != null) { + queryParameters['use_ssl'] = requestParameters['useSsl']; + } + + if (requestParameters['useTls'] != null) { + queryParameters['use_tls'] = requestParameters['useTls']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailListRaw(requestParameters: StagesAuthenticatorEmailListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEmailListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorEmailStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailList(requestParameters: StagesAuthenticatorEmailListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEmailListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEmailPartialUpdate without sending the request + */ + async stagesAuthenticatorEmailPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorEmailPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorEmailStageRequestToJSON(requestParameters['patchedAuthenticatorEmailStageRequest']), + }; + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailPartialUpdateRaw(requestParameters: StagesAuthenticatorEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEmailPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailPartialUpdate(requestParameters: StagesAuthenticatorEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEmailPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEmailRetrieve without sending the request + */ + async stagesAuthenticatorEmailRetrieveRequestOpts(requestParameters: StagesAuthenticatorEmailRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailRetrieveRaw(requestParameters: StagesAuthenticatorEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEmailRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailRetrieve(requestParameters: StagesAuthenticatorEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEmailRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEmailUpdate without sending the request + */ + async stagesAuthenticatorEmailUpdateRequestOpts(requestParameters: StagesAuthenticatorEmailUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailUpdate().' + ); + } + + if (requestParameters['authenticatorEmailStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorEmailStageRequest', + 'Required parameter "authenticatorEmailStageRequest" was null or undefined when calling stagesAuthenticatorEmailUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorEmailStageRequestToJSON(requestParameters['authenticatorEmailStageRequest']), + }; + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailUpdateRaw(requestParameters: StagesAuthenticatorEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEmailUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEmailStage Viewset + */ + async stagesAuthenticatorEmailUpdate(requestParameters: StagesAuthenticatorEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEmailUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEmailUsedByList without sending the request + */ + async stagesAuthenticatorEmailUsedByListRequestOpts(requestParameters: StagesAuthenticatorEmailUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/email/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorEmailUsedByListRaw(requestParameters: StagesAuthenticatorEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorEmailUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorEmailUsedByList(requestParameters: StagesAuthenticatorEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorEmailUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcCreate without sending the request + */ + async stagesAuthenticatorEndpointGdtcCreateRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcCreateRequest): Promise { + if (requestParameters['authenticatorEndpointGDTCStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorEndpointGDTCStageRequest', + 'Required parameter "authenticatorEndpointGDTCStageRequest" was null or undefined when calling stagesAuthenticatorEndpointGdtcCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorEndpointGDTCStageRequestToJSON(requestParameters['authenticatorEndpointGDTCStageRequest']), + }; + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcCreateRaw(requestParameters: StagesAuthenticatorEndpointGdtcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEndpointGDTCStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcCreate(requestParameters: StagesAuthenticatorEndpointGdtcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEndpointGdtcCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcDestroy without sending the request + */ + async stagesAuthenticatorEndpointGdtcDestroyRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEndpointGdtcDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcDestroyRaw(requestParameters: StagesAuthenticatorEndpointGdtcDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcDestroy(requestParameters: StagesAuthenticatorEndpointGdtcDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorEndpointGdtcDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcList without sending the request + */ + async stagesAuthenticatorEndpointGdtcListRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcListRaw(requestParameters: StagesAuthenticatorEndpointGdtcListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorEndpointGDTCStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcList(requestParameters: StagesAuthenticatorEndpointGdtcListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEndpointGdtcListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcPartialUpdate without sending the request + */ + async stagesAuthenticatorEndpointGdtcPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEndpointGdtcPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorEndpointGDTCStageRequestToJSON(requestParameters['patchedAuthenticatorEndpointGDTCStageRequest']), + }; + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcPartialUpdateRaw(requestParameters: StagesAuthenticatorEndpointGdtcPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEndpointGDTCStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcPartialUpdate(requestParameters: StagesAuthenticatorEndpointGdtcPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEndpointGdtcPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcRetrieve without sending the request + */ + async stagesAuthenticatorEndpointGdtcRetrieveRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEndpointGdtcRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcRetrieveRaw(requestParameters: StagesAuthenticatorEndpointGdtcRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEndpointGDTCStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcRetrieve(requestParameters: StagesAuthenticatorEndpointGdtcRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEndpointGdtcRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcUpdate without sending the request + */ + async stagesAuthenticatorEndpointGdtcUpdateRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEndpointGdtcUpdate().' + ); + } + + if (requestParameters['authenticatorEndpointGDTCStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorEndpointGDTCStageRequest', + 'Required parameter "authenticatorEndpointGDTCStageRequest" was null or undefined when calling stagesAuthenticatorEndpointGdtcUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorEndpointGDTCStageRequestToJSON(requestParameters['authenticatorEndpointGDTCStageRequest']), + }; + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcUpdateRaw(requestParameters: StagesAuthenticatorEndpointGdtcUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEndpointGDTCStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorEndpointGDTCStage Viewset + */ + async stagesAuthenticatorEndpointGdtcUpdate(requestParameters: StagesAuthenticatorEndpointGdtcUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorEndpointGdtcUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorEndpointGdtcUsedByList without sending the request + */ + async stagesAuthenticatorEndpointGdtcUsedByListRequestOpts(requestParameters: StagesAuthenticatorEndpointGdtcUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEndpointGdtcUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/endpoint_gdtc/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorEndpointGdtcUsedByListRaw(requestParameters: StagesAuthenticatorEndpointGdtcUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorEndpointGdtcUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorEndpointGdtcUsedByList(requestParameters: StagesAuthenticatorEndpointGdtcUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorEndpointGdtcUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorSmsCreate without sending the request + */ + async stagesAuthenticatorSmsCreateRequestOpts(requestParameters: StagesAuthenticatorSmsCreateRequest): Promise { + if (requestParameters['authenticatorSMSStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorSMSStageRequest', + 'Required parameter "authenticatorSMSStageRequest" was null or undefined when calling stagesAuthenticatorSmsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorSMSStageRequestToJSON(requestParameters['authenticatorSMSStageRequest']), + }; + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsCreateRaw(requestParameters: StagesAuthenticatorSmsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorSmsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorSMSStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsCreate(requestParameters: StagesAuthenticatorSmsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorSmsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorSmsDestroy without sending the request + */ + async stagesAuthenticatorSmsDestroyRequestOpts(requestParameters: StagesAuthenticatorSmsDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorSmsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsDestroyRaw(requestParameters: StagesAuthenticatorSmsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorSmsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsDestroy(requestParameters: StagesAuthenticatorSmsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorSmsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorSmsList without sending the request + */ + async stagesAuthenticatorSmsListRequestOpts(requestParameters: StagesAuthenticatorSmsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['accountSid'] != null) { + queryParameters['account_sid'] = requestParameters['accountSid']; + } + + if (requestParameters['auth'] != null) { + queryParameters['auth'] = requestParameters['auth']; + } + + if (requestParameters['authPassword'] != null) { + queryParameters['auth_password'] = requestParameters['authPassword']; + } + + if (requestParameters['authType'] != null) { + queryParameters['auth_type'] = requestParameters['authType']; + } + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['friendlyName'] != null) { + queryParameters['friendly_name'] = requestParameters['friendlyName']; + } + + if (requestParameters['fromNumber'] != null) { + queryParameters['from_number'] = requestParameters['fromNumber']; + } + + if (requestParameters['mapping'] != null) { + queryParameters['mapping'] = requestParameters['mapping']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['provider'] != null) { + queryParameters['provider'] = requestParameters['provider']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['verifyOnly'] != null) { + queryParameters['verify_only'] = requestParameters['verifyOnly']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsListRaw(requestParameters: StagesAuthenticatorSmsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorSmsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorSMSStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsList(requestParameters: StagesAuthenticatorSmsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorSmsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorSmsPartialUpdate without sending the request + */ + async stagesAuthenticatorSmsPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorSmsPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorSmsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorSMSStageRequestToJSON(requestParameters['patchedAuthenticatorSMSStageRequest']), + }; + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsPartialUpdateRaw(requestParameters: StagesAuthenticatorSmsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorSmsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorSMSStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsPartialUpdate(requestParameters: StagesAuthenticatorSmsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorSmsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorSmsRetrieve without sending the request + */ + async stagesAuthenticatorSmsRetrieveRequestOpts(requestParameters: StagesAuthenticatorSmsRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorSmsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsRetrieveRaw(requestParameters: StagesAuthenticatorSmsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorSmsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorSMSStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsRetrieve(requestParameters: StagesAuthenticatorSmsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorSmsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorSmsUpdate without sending the request + */ + async stagesAuthenticatorSmsUpdateRequestOpts(requestParameters: StagesAuthenticatorSmsUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorSmsUpdate().' + ); + } + + if (requestParameters['authenticatorSMSStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorSMSStageRequest', + 'Required parameter "authenticatorSMSStageRequest" was null or undefined when calling stagesAuthenticatorSmsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorSMSStageRequestToJSON(requestParameters['authenticatorSMSStageRequest']), + }; + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsUpdateRaw(requestParameters: StagesAuthenticatorSmsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorSmsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorSMSStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorSMSStage Viewset + */ + async stagesAuthenticatorSmsUpdate(requestParameters: StagesAuthenticatorSmsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorSmsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorSmsUsedByList without sending the request + */ + async stagesAuthenticatorSmsUsedByListRequestOpts(requestParameters: StagesAuthenticatorSmsUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorSmsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/sms/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorSmsUsedByListRaw(requestParameters: StagesAuthenticatorSmsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorSmsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorSmsUsedByList(requestParameters: StagesAuthenticatorSmsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorSmsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorStaticCreate without sending the request + */ + async stagesAuthenticatorStaticCreateRequestOpts(requestParameters: StagesAuthenticatorStaticCreateRequest): Promise { + if (requestParameters['authenticatorStaticStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorStaticStageRequest', + 'Required parameter "authenticatorStaticStageRequest" was null or undefined when calling stagesAuthenticatorStaticCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorStaticStageRequestToJSON(requestParameters['authenticatorStaticStageRequest']), + }; + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticCreateRaw(requestParameters: StagesAuthenticatorStaticCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorStaticCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorStaticStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticCreate(requestParameters: StagesAuthenticatorStaticCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorStaticCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorStaticDestroy without sending the request + */ + async stagesAuthenticatorStaticDestroyRequestOpts(requestParameters: StagesAuthenticatorStaticDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorStaticDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticDestroyRaw(requestParameters: StagesAuthenticatorStaticDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorStaticDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticDestroy(requestParameters: StagesAuthenticatorStaticDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorStaticDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorStaticList without sending the request + */ + async stagesAuthenticatorStaticListRequestOpts(requestParameters: StagesAuthenticatorStaticListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['friendlyName'] != null) { + queryParameters['friendly_name'] = requestParameters['friendlyName']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['tokenCount'] != null) { + queryParameters['token_count'] = requestParameters['tokenCount']; + } + + if (requestParameters['tokenLength'] != null) { + queryParameters['token_length'] = requestParameters['tokenLength']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticListRaw(requestParameters: StagesAuthenticatorStaticListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorStaticListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorStaticStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticList(requestParameters: StagesAuthenticatorStaticListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorStaticListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorStaticPartialUpdate without sending the request + */ + async stagesAuthenticatorStaticPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorStaticPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorStaticPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorStaticStageRequestToJSON(requestParameters['patchedAuthenticatorStaticStageRequest']), + }; + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticPartialUpdateRaw(requestParameters: StagesAuthenticatorStaticPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorStaticPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorStaticStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticPartialUpdate(requestParameters: StagesAuthenticatorStaticPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorStaticPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorStaticRetrieve without sending the request + */ + async stagesAuthenticatorStaticRetrieveRequestOpts(requestParameters: StagesAuthenticatorStaticRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorStaticRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticRetrieveRaw(requestParameters: StagesAuthenticatorStaticRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorStaticRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorStaticStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticRetrieve(requestParameters: StagesAuthenticatorStaticRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorStaticRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorStaticUpdate without sending the request + */ + async stagesAuthenticatorStaticUpdateRequestOpts(requestParameters: StagesAuthenticatorStaticUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorStaticUpdate().' + ); + } + + if (requestParameters['authenticatorStaticStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorStaticStageRequest', + 'Required parameter "authenticatorStaticStageRequest" was null or undefined when calling stagesAuthenticatorStaticUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorStaticStageRequestToJSON(requestParameters['authenticatorStaticStageRequest']), + }; + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticUpdateRaw(requestParameters: StagesAuthenticatorStaticUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorStaticUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorStaticStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorStaticStage Viewset + */ + async stagesAuthenticatorStaticUpdate(requestParameters: StagesAuthenticatorStaticUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorStaticUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorStaticUsedByList without sending the request + */ + async stagesAuthenticatorStaticUsedByListRequestOpts(requestParameters: StagesAuthenticatorStaticUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorStaticUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/static/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorStaticUsedByListRaw(requestParameters: StagesAuthenticatorStaticUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorStaticUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorStaticUsedByList(requestParameters: StagesAuthenticatorStaticUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorStaticUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorTotpCreate without sending the request + */ + async stagesAuthenticatorTotpCreateRequestOpts(requestParameters: StagesAuthenticatorTotpCreateRequest): Promise { + if (requestParameters['authenticatorTOTPStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorTOTPStageRequest', + 'Required parameter "authenticatorTOTPStageRequest" was null or undefined when calling stagesAuthenticatorTotpCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorTOTPStageRequestToJSON(requestParameters['authenticatorTOTPStageRequest']), + }; + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpCreateRaw(requestParameters: StagesAuthenticatorTotpCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorTotpCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorTOTPStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpCreate(requestParameters: StagesAuthenticatorTotpCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorTotpCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorTotpDestroy without sending the request + */ + async stagesAuthenticatorTotpDestroyRequestOpts(requestParameters: StagesAuthenticatorTotpDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorTotpDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpDestroyRaw(requestParameters: StagesAuthenticatorTotpDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorTotpDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpDestroy(requestParameters: StagesAuthenticatorTotpDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorTotpDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorTotpList without sending the request + */ + async stagesAuthenticatorTotpListRequestOpts(requestParameters: StagesAuthenticatorTotpListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['digits'] != null) { + queryParameters['digits'] = requestParameters['digits']; + } + + if (requestParameters['friendlyName'] != null) { + queryParameters['friendly_name'] = requestParameters['friendlyName']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpListRaw(requestParameters: StagesAuthenticatorTotpListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorTotpListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorTOTPStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpList(requestParameters: StagesAuthenticatorTotpListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorTotpListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorTotpPartialUpdate without sending the request + */ + async stagesAuthenticatorTotpPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorTotpPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorTotpPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorTOTPStageRequestToJSON(requestParameters['patchedAuthenticatorTOTPStageRequest']), + }; + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpPartialUpdateRaw(requestParameters: StagesAuthenticatorTotpPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorTotpPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorTOTPStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpPartialUpdate(requestParameters: StagesAuthenticatorTotpPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorTotpPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorTotpRetrieve without sending the request + */ + async stagesAuthenticatorTotpRetrieveRequestOpts(requestParameters: StagesAuthenticatorTotpRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorTotpRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpRetrieveRaw(requestParameters: StagesAuthenticatorTotpRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorTotpRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorTOTPStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpRetrieve(requestParameters: StagesAuthenticatorTotpRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorTotpRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorTotpUpdate without sending the request + */ + async stagesAuthenticatorTotpUpdateRequestOpts(requestParameters: StagesAuthenticatorTotpUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorTotpUpdate().' + ); + } + + if (requestParameters['authenticatorTOTPStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorTOTPStageRequest', + 'Required parameter "authenticatorTOTPStageRequest" was null or undefined when calling stagesAuthenticatorTotpUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorTOTPStageRequestToJSON(requestParameters['authenticatorTOTPStageRequest']), + }; + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpUpdateRaw(requestParameters: StagesAuthenticatorTotpUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorTotpUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorTOTPStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorTOTPStage Viewset + */ + async stagesAuthenticatorTotpUpdate(requestParameters: StagesAuthenticatorTotpUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorTotpUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorTotpUsedByList without sending the request + */ + async stagesAuthenticatorTotpUsedByListRequestOpts(requestParameters: StagesAuthenticatorTotpUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorTotpUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/totp/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorTotpUsedByListRaw(requestParameters: StagesAuthenticatorTotpUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorTotpUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorTotpUsedByList(requestParameters: StagesAuthenticatorTotpUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorTotpUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorValidateCreate without sending the request + */ + async stagesAuthenticatorValidateCreateRequestOpts(requestParameters: StagesAuthenticatorValidateCreateRequest): Promise { + if (requestParameters['authenticatorValidateStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorValidateStageRequest', + 'Required parameter "authenticatorValidateStageRequest" was null or undefined when calling stagesAuthenticatorValidateCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorValidateStageRequestToJSON(requestParameters['authenticatorValidateStageRequest']), + }; + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateCreateRaw(requestParameters: StagesAuthenticatorValidateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorValidateCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorValidateStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateCreate(requestParameters: StagesAuthenticatorValidateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorValidateCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorValidateDestroy without sending the request + */ + async stagesAuthenticatorValidateDestroyRequestOpts(requestParameters: StagesAuthenticatorValidateDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorValidateDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateDestroyRaw(requestParameters: StagesAuthenticatorValidateDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorValidateDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateDestroy(requestParameters: StagesAuthenticatorValidateDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorValidateDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorValidateList without sending the request + */ + async stagesAuthenticatorValidateListRequestOpts(requestParameters: StagesAuthenticatorValidateListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['configurationStages'] != null) { + queryParameters['configuration_stages'] = requestParameters['configurationStages']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['notConfiguredAction'] != null) { + queryParameters['not_configured_action'] = requestParameters['notConfiguredAction']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateListRaw(requestParameters: StagesAuthenticatorValidateListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorValidateListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorValidateStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateList(requestParameters: StagesAuthenticatorValidateListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorValidateListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorValidatePartialUpdate without sending the request + */ + async stagesAuthenticatorValidatePartialUpdateRequestOpts(requestParameters: StagesAuthenticatorValidatePartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorValidatePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorValidateStageRequestToJSON(requestParameters['patchedAuthenticatorValidateStageRequest']), + }; + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidatePartialUpdateRaw(requestParameters: StagesAuthenticatorValidatePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorValidatePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorValidateStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidatePartialUpdate(requestParameters: StagesAuthenticatorValidatePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorValidatePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorValidateRetrieve without sending the request + */ + async stagesAuthenticatorValidateRetrieveRequestOpts(requestParameters: StagesAuthenticatorValidateRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorValidateRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateRetrieveRaw(requestParameters: StagesAuthenticatorValidateRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorValidateRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorValidateStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateRetrieve(requestParameters: StagesAuthenticatorValidateRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorValidateRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorValidateUpdate without sending the request + */ + async stagesAuthenticatorValidateUpdateRequestOpts(requestParameters: StagesAuthenticatorValidateUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorValidateUpdate().' + ); + } + + if (requestParameters['authenticatorValidateStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorValidateStageRequest', + 'Required parameter "authenticatorValidateStageRequest" was null or undefined when calling stagesAuthenticatorValidateUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorValidateStageRequestToJSON(requestParameters['authenticatorValidateStageRequest']), + }; + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateUpdateRaw(requestParameters: StagesAuthenticatorValidateUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorValidateUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorValidateStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorValidateStage Viewset + */ + async stagesAuthenticatorValidateUpdate(requestParameters: StagesAuthenticatorValidateUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorValidateUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorValidateUsedByList without sending the request + */ + async stagesAuthenticatorValidateUsedByListRequestOpts(requestParameters: StagesAuthenticatorValidateUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorValidateUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/validate/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorValidateUsedByListRaw(requestParameters: StagesAuthenticatorValidateUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorValidateUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorValidateUsedByList(requestParameters: StagesAuthenticatorValidateUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorValidateUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnCreate without sending the request + */ + async stagesAuthenticatorWebauthnCreateRequestOpts(requestParameters: StagesAuthenticatorWebauthnCreateRequest): Promise { + if (requestParameters['authenticatorWebAuthnStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorWebAuthnStageRequest', + 'Required parameter "authenticatorWebAuthnStageRequest" was null or undefined when calling stagesAuthenticatorWebauthnCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorWebAuthnStageRequestToJSON(requestParameters['authenticatorWebAuthnStageRequest']), + }; + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnCreateRaw(requestParameters: StagesAuthenticatorWebauthnCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorWebAuthnStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnCreate(requestParameters: StagesAuthenticatorWebauthnCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnDestroy without sending the request + */ + async stagesAuthenticatorWebauthnDestroyRequestOpts(requestParameters: StagesAuthenticatorWebauthnDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorWebauthnDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnDestroyRaw(requestParameters: StagesAuthenticatorWebauthnDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnDestroy(requestParameters: StagesAuthenticatorWebauthnDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesAuthenticatorWebauthnDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnDeviceTypesList without sending the request + */ + async stagesAuthenticatorWebauthnDeviceTypesListRequestOpts(requestParameters: StagesAuthenticatorWebauthnDeviceTypesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['aaguid'] != null) { + queryParameters['aaguid'] = requestParameters['aaguid']; + } + + if (requestParameters['description'] != null) { + queryParameters['description'] = requestParameters['description']; + } + + if (requestParameters['icon'] != null) { + queryParameters['icon'] = requestParameters['icon']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn_device_types/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * WebAuthnDeviceType Viewset + */ + async stagesAuthenticatorWebauthnDeviceTypesListRaw(requestParameters: StagesAuthenticatorWebauthnDeviceTypesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnDeviceTypesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedWebAuthnDeviceTypeListFromJSON(jsonValue)); + } + + /** + * WebAuthnDeviceType Viewset + */ + async stagesAuthenticatorWebauthnDeviceTypesList(requestParameters: StagesAuthenticatorWebauthnDeviceTypesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnDeviceTypesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnDeviceTypesRetrieve without sending the request + */ + async stagesAuthenticatorWebauthnDeviceTypesRetrieveRequestOpts(requestParameters: StagesAuthenticatorWebauthnDeviceTypesRetrieveRequest): Promise { + if (requestParameters['aaguid'] == null) { + throw new runtime.RequiredError( + 'aaguid', + 'Required parameter "aaguid" was null or undefined when calling stagesAuthenticatorWebauthnDeviceTypesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn_device_types/{aaguid}/`; + urlPath = urlPath.replace(`{${"aaguid"}}`, encodeURIComponent(String(requestParameters['aaguid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * WebAuthnDeviceType Viewset + */ + async stagesAuthenticatorWebauthnDeviceTypesRetrieveRaw(requestParameters: StagesAuthenticatorWebauthnDeviceTypesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnDeviceTypesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WebAuthnDeviceTypeFromJSON(jsonValue)); + } + + /** + * WebAuthnDeviceType Viewset + */ + async stagesAuthenticatorWebauthnDeviceTypesRetrieve(requestParameters: StagesAuthenticatorWebauthnDeviceTypesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnDeviceTypesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnList without sending the request + */ + async stagesAuthenticatorWebauthnListRequestOpts(requestParameters: StagesAuthenticatorWebauthnListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['authenticatorAttachment'] != null) { + queryParameters['authenticator_attachment'] = requestParameters['authenticatorAttachment']; + } + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['deviceTypeRestrictions'] != null) { + queryParameters['device_type_restrictions'] = requestParameters['deviceTypeRestrictions']; + } + + if (requestParameters['maxAttempts'] != null) { + queryParameters['max_attempts'] = requestParameters['maxAttempts']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['residentKeyRequirement'] != null) { + queryParameters['resident_key_requirement'] = requestParameters['residentKeyRequirement']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['userVerification'] != null) { + queryParameters['user_verification'] = requestParameters['userVerification']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnListRaw(requestParameters: StagesAuthenticatorWebauthnListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorWebAuthnStageListFromJSON(jsonValue)); + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnList(requestParameters: StagesAuthenticatorWebauthnListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnPartialUpdate without sending the request + */ + async stagesAuthenticatorWebauthnPartialUpdateRequestOpts(requestParameters: StagesAuthenticatorWebauthnPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorWebauthnPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedAuthenticatorWebAuthnStageRequestToJSON(requestParameters['patchedAuthenticatorWebAuthnStageRequest']), + }; + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnPartialUpdateRaw(requestParameters: StagesAuthenticatorWebauthnPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorWebAuthnStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnPartialUpdate(requestParameters: StagesAuthenticatorWebauthnPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnRetrieve without sending the request + */ + async stagesAuthenticatorWebauthnRetrieveRequestOpts(requestParameters: StagesAuthenticatorWebauthnRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorWebauthnRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnRetrieveRaw(requestParameters: StagesAuthenticatorWebauthnRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorWebAuthnStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnRetrieve(requestParameters: StagesAuthenticatorWebauthnRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnUpdate without sending the request + */ + async stagesAuthenticatorWebauthnUpdateRequestOpts(requestParameters: StagesAuthenticatorWebauthnUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorWebauthnUpdate().' + ); + } + + if (requestParameters['authenticatorWebAuthnStageRequest'] == null) { + throw new runtime.RequiredError( + 'authenticatorWebAuthnStageRequest', + 'Required parameter "authenticatorWebAuthnStageRequest" was null or undefined when calling stagesAuthenticatorWebauthnUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AuthenticatorWebAuthnStageRequestToJSON(requestParameters['authenticatorWebAuthnStageRequest']), + }; + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnUpdateRaw(requestParameters: StagesAuthenticatorWebauthnUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesAuthenticatorWebauthnUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorWebAuthnStageFromJSON(jsonValue)); + } + + /** + * AuthenticatorWebAuthnStage Viewset + */ + async stagesAuthenticatorWebauthnUpdate(requestParameters: StagesAuthenticatorWebauthnUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesAuthenticatorWebauthnUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesAuthenticatorWebauthnUsedByList without sending the request + */ + async stagesAuthenticatorWebauthnUsedByListRequestOpts(requestParameters: StagesAuthenticatorWebauthnUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorWebauthnUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/authenticator/webauthn/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorWebauthnUsedByListRaw(requestParameters: StagesAuthenticatorWebauthnUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesAuthenticatorWebauthnUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesAuthenticatorWebauthnUsedByList(requestParameters: StagesAuthenticatorWebauthnUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesAuthenticatorWebauthnUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesCaptchaCreate without sending the request + */ + async stagesCaptchaCreateRequestOpts(requestParameters: StagesCaptchaCreateRequest): Promise { + if (requestParameters['captchaStageRequest'] == null) { + throw new runtime.RequiredError( + 'captchaStageRequest', + 'Required parameter "captchaStageRequest" was null or undefined when calling stagesCaptchaCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CaptchaStageRequestToJSON(requestParameters['captchaStageRequest']), + }; + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaCreateRaw(requestParameters: StagesCaptchaCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesCaptchaCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CaptchaStageFromJSON(jsonValue)); + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaCreate(requestParameters: StagesCaptchaCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesCaptchaCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesCaptchaDestroy without sending the request + */ + async stagesCaptchaDestroyRequestOpts(requestParameters: StagesCaptchaDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesCaptchaDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaDestroyRaw(requestParameters: StagesCaptchaDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesCaptchaDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaDestroy(requestParameters: StagesCaptchaDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesCaptchaDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesCaptchaList without sending the request + */ + async stagesCaptchaListRequestOpts(requestParameters: StagesCaptchaListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['publicKey'] != null) { + queryParameters['public_key'] = requestParameters['publicKey']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaListRaw(requestParameters: StagesCaptchaListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesCaptchaListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedCaptchaStageListFromJSON(jsonValue)); + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaList(requestParameters: StagesCaptchaListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesCaptchaListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesCaptchaPartialUpdate without sending the request + */ + async stagesCaptchaPartialUpdateRequestOpts(requestParameters: StagesCaptchaPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesCaptchaPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedCaptchaStageRequestToJSON(requestParameters['patchedCaptchaStageRequest']), + }; + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaPartialUpdateRaw(requestParameters: StagesCaptchaPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesCaptchaPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CaptchaStageFromJSON(jsonValue)); + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaPartialUpdate(requestParameters: StagesCaptchaPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesCaptchaPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesCaptchaRetrieve without sending the request + */ + async stagesCaptchaRetrieveRequestOpts(requestParameters: StagesCaptchaRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesCaptchaRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaRetrieveRaw(requestParameters: StagesCaptchaRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesCaptchaRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CaptchaStageFromJSON(jsonValue)); + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaRetrieve(requestParameters: StagesCaptchaRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesCaptchaRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesCaptchaUpdate without sending the request + */ + async stagesCaptchaUpdateRequestOpts(requestParameters: StagesCaptchaUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesCaptchaUpdate().' + ); + } + + if (requestParameters['captchaStageRequest'] == null) { + throw new runtime.RequiredError( + 'captchaStageRequest', + 'Required parameter "captchaStageRequest" was null or undefined when calling stagesCaptchaUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: CaptchaStageRequestToJSON(requestParameters['captchaStageRequest']), + }; + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaUpdateRaw(requestParameters: StagesCaptchaUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesCaptchaUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CaptchaStageFromJSON(jsonValue)); + } + + /** + * CaptchaStage Viewset + */ + async stagesCaptchaUpdate(requestParameters: StagesCaptchaUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesCaptchaUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesCaptchaUsedByList without sending the request + */ + async stagesCaptchaUsedByListRequestOpts(requestParameters: StagesCaptchaUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesCaptchaUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/captcha/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesCaptchaUsedByListRaw(requestParameters: StagesCaptchaUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesCaptchaUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesCaptchaUsedByList(requestParameters: StagesCaptchaUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesCaptchaUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesConsentCreate without sending the request + */ + async stagesConsentCreateRequestOpts(requestParameters: StagesConsentCreateRequest): Promise { + if (requestParameters['consentStageRequest'] == null) { + throw new runtime.RequiredError( + 'consentStageRequest', + 'Required parameter "consentStageRequest" was null or undefined when calling stagesConsentCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ConsentStageRequestToJSON(requestParameters['consentStageRequest']), + }; + } + + /** + * ConsentStage Viewset + */ + async stagesConsentCreateRaw(requestParameters: StagesConsentCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesConsentCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsentStageFromJSON(jsonValue)); + } + + /** + * ConsentStage Viewset + */ + async stagesConsentCreate(requestParameters: StagesConsentCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesConsentCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesConsentDestroy without sending the request + */ + async stagesConsentDestroyRequestOpts(requestParameters: StagesConsentDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesConsentDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ConsentStage Viewset + */ + async stagesConsentDestroyRaw(requestParameters: StagesConsentDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesConsentDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ConsentStage Viewset + */ + async stagesConsentDestroy(requestParameters: StagesConsentDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesConsentDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesConsentList without sending the request + */ + async stagesConsentListRequestOpts(requestParameters: StagesConsentListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['consentExpireIn'] != null) { + queryParameters['consent_expire_in'] = requestParameters['consentExpireIn']; + } + + if (requestParameters['mode'] != null) { + queryParameters['mode'] = requestParameters['mode']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ConsentStage Viewset + */ + async stagesConsentListRaw(requestParameters: StagesConsentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesConsentListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedConsentStageListFromJSON(jsonValue)); + } + + /** + * ConsentStage Viewset + */ + async stagesConsentList(requestParameters: StagesConsentListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesConsentListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesConsentPartialUpdate without sending the request + */ + async stagesConsentPartialUpdateRequestOpts(requestParameters: StagesConsentPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesConsentPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedConsentStageRequestToJSON(requestParameters['patchedConsentStageRequest']), + }; + } + + /** + * ConsentStage Viewset + */ + async stagesConsentPartialUpdateRaw(requestParameters: StagesConsentPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesConsentPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsentStageFromJSON(jsonValue)); + } + + /** + * ConsentStage Viewset + */ + async stagesConsentPartialUpdate(requestParameters: StagesConsentPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesConsentPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesConsentRetrieve without sending the request + */ + async stagesConsentRetrieveRequestOpts(requestParameters: StagesConsentRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesConsentRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * ConsentStage Viewset + */ + async stagesConsentRetrieveRaw(requestParameters: StagesConsentRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesConsentRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsentStageFromJSON(jsonValue)); + } + + /** + * ConsentStage Viewset + */ + async stagesConsentRetrieve(requestParameters: StagesConsentRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesConsentRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesConsentUpdate without sending the request + */ + async stagesConsentUpdateRequestOpts(requestParameters: StagesConsentUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesConsentUpdate().' + ); + } + + if (requestParameters['consentStageRequest'] == null) { + throw new runtime.RequiredError( + 'consentStageRequest', + 'Required parameter "consentStageRequest" was null or undefined when calling stagesConsentUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ConsentStageRequestToJSON(requestParameters['consentStageRequest']), + }; + } + + /** + * ConsentStage Viewset + */ + async stagesConsentUpdateRaw(requestParameters: StagesConsentUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesConsentUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsentStageFromJSON(jsonValue)); + } + + /** + * ConsentStage Viewset + */ + async stagesConsentUpdate(requestParameters: StagesConsentUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesConsentUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesConsentUsedByList without sending the request + */ + async stagesConsentUsedByListRequestOpts(requestParameters: StagesConsentUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesConsentUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/consent/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesConsentUsedByListRaw(requestParameters: StagesConsentUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesConsentUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesConsentUsedByList(requestParameters: StagesConsentUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesConsentUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDenyCreate without sending the request + */ + async stagesDenyCreateRequestOpts(requestParameters: StagesDenyCreateRequest): Promise { + if (requestParameters['denyStageRequest'] == null) { + throw new runtime.RequiredError( + 'denyStageRequest', + 'Required parameter "denyStageRequest" was null or undefined when calling stagesDenyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DenyStageRequestToJSON(requestParameters['denyStageRequest']), + }; + } + + /** + * DenyStage Viewset + */ + async stagesDenyCreateRaw(requestParameters: StagesDenyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDenyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DenyStageFromJSON(jsonValue)); + } + + /** + * DenyStage Viewset + */ + async stagesDenyCreate(requestParameters: StagesDenyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDenyCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDenyDestroy without sending the request + */ + async stagesDenyDestroyRequestOpts(requestParameters: StagesDenyDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDenyDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DenyStage Viewset + */ + async stagesDenyDestroyRaw(requestParameters: StagesDenyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDenyDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * DenyStage Viewset + */ + async stagesDenyDestroy(requestParameters: StagesDenyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesDenyDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesDenyList without sending the request + */ + async stagesDenyListRequestOpts(requestParameters: StagesDenyListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['denyMessage'] != null) { + queryParameters['deny_message'] = requestParameters['denyMessage']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DenyStage Viewset + */ + async stagesDenyListRaw(requestParameters: StagesDenyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDenyListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDenyStageListFromJSON(jsonValue)); + } + + /** + * DenyStage Viewset + */ + async stagesDenyList(requestParameters: StagesDenyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDenyListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDenyPartialUpdate without sending the request + */ + async stagesDenyPartialUpdateRequestOpts(requestParameters: StagesDenyPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDenyPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDenyStageRequestToJSON(requestParameters['patchedDenyStageRequest']), + }; + } + + /** + * DenyStage Viewset + */ + async stagesDenyPartialUpdateRaw(requestParameters: StagesDenyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDenyPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DenyStageFromJSON(jsonValue)); + } + + /** + * DenyStage Viewset + */ + async stagesDenyPartialUpdate(requestParameters: StagesDenyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDenyPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDenyRetrieve without sending the request + */ + async stagesDenyRetrieveRequestOpts(requestParameters: StagesDenyRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDenyRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DenyStage Viewset + */ + async stagesDenyRetrieveRaw(requestParameters: StagesDenyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDenyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DenyStageFromJSON(jsonValue)); + } + + /** + * DenyStage Viewset + */ + async stagesDenyRetrieve(requestParameters: StagesDenyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDenyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDenyUpdate without sending the request + */ + async stagesDenyUpdateRequestOpts(requestParameters: StagesDenyUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDenyUpdate().' + ); + } + + if (requestParameters['denyStageRequest'] == null) { + throw new runtime.RequiredError( + 'denyStageRequest', + 'Required parameter "denyStageRequest" was null or undefined when calling stagesDenyUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DenyStageRequestToJSON(requestParameters['denyStageRequest']), + }; + } + + /** + * DenyStage Viewset + */ + async stagesDenyUpdateRaw(requestParameters: StagesDenyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDenyUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DenyStageFromJSON(jsonValue)); + } + + /** + * DenyStage Viewset + */ + async stagesDenyUpdate(requestParameters: StagesDenyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDenyUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDenyUsedByList without sending the request + */ + async stagesDenyUsedByListRequestOpts(requestParameters: StagesDenyUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDenyUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/deny/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesDenyUsedByListRaw(requestParameters: StagesDenyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesDenyUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesDenyUsedByList(requestParameters: StagesDenyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesDenyUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDummyCreate without sending the request + */ + async stagesDummyCreateRequestOpts(requestParameters: StagesDummyCreateRequest): Promise { + if (requestParameters['dummyStageRequest'] == null) { + throw new runtime.RequiredError( + 'dummyStageRequest', + 'Required parameter "dummyStageRequest" was null or undefined when calling stagesDummyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DummyStageRequestToJSON(requestParameters['dummyStageRequest']), + }; + } + + /** + * DummyStage Viewset + */ + async stagesDummyCreateRaw(requestParameters: StagesDummyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDummyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyStageFromJSON(jsonValue)); + } + + /** + * DummyStage Viewset + */ + async stagesDummyCreate(requestParameters: StagesDummyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDummyCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDummyDestroy without sending the request + */ + async stagesDummyDestroyRequestOpts(requestParameters: StagesDummyDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDummyDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DummyStage Viewset + */ + async stagesDummyDestroyRaw(requestParameters: StagesDummyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDummyDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * DummyStage Viewset + */ + async stagesDummyDestroy(requestParameters: StagesDummyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesDummyDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesDummyList without sending the request + */ + async stagesDummyListRequestOpts(requestParameters: StagesDummyListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['throwError'] != null) { + queryParameters['throw_error'] = requestParameters['throwError']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DummyStage Viewset + */ + async stagesDummyListRaw(requestParameters: StagesDummyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDummyListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDummyStageListFromJSON(jsonValue)); + } + + /** + * DummyStage Viewset + */ + async stagesDummyList(requestParameters: StagesDummyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDummyListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDummyPartialUpdate without sending the request + */ + async stagesDummyPartialUpdateRequestOpts(requestParameters: StagesDummyPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDummyPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDummyStageRequestToJSON(requestParameters['patchedDummyStageRequest']), + }; + } + + /** + * DummyStage Viewset + */ + async stagesDummyPartialUpdateRaw(requestParameters: StagesDummyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDummyPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyStageFromJSON(jsonValue)); + } + + /** + * DummyStage Viewset + */ + async stagesDummyPartialUpdate(requestParameters: StagesDummyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDummyPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDummyRetrieve without sending the request + */ + async stagesDummyRetrieveRequestOpts(requestParameters: StagesDummyRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDummyRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * DummyStage Viewset + */ + async stagesDummyRetrieveRaw(requestParameters: StagesDummyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDummyRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyStageFromJSON(jsonValue)); + } + + /** + * DummyStage Viewset + */ + async stagesDummyRetrieve(requestParameters: StagesDummyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDummyRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDummyUpdate without sending the request + */ + async stagesDummyUpdateRequestOpts(requestParameters: StagesDummyUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDummyUpdate().' + ); + } + + if (requestParameters['dummyStageRequest'] == null) { + throw new runtime.RequiredError( + 'dummyStageRequest', + 'Required parameter "dummyStageRequest" was null or undefined when calling stagesDummyUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DummyStageRequestToJSON(requestParameters['dummyStageRequest']), + }; + } + + /** + * DummyStage Viewset + */ + async stagesDummyUpdateRaw(requestParameters: StagesDummyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesDummyUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DummyStageFromJSON(jsonValue)); + } + + /** + * DummyStage Viewset + */ + async stagesDummyUpdate(requestParameters: StagesDummyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesDummyUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesDummyUsedByList without sending the request + */ + async stagesDummyUsedByListRequestOpts(requestParameters: StagesDummyUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesDummyUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/dummy/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesDummyUsedByListRaw(requestParameters: StagesDummyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesDummyUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesDummyUsedByList(requestParameters: StagesDummyUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesDummyUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailCreate without sending the request + */ + async stagesEmailCreateRequestOpts(requestParameters: StagesEmailCreateRequest): Promise { + if (requestParameters['emailStageRequest'] == null) { + throw new runtime.RequiredError( + 'emailStageRequest', + 'Required parameter "emailStageRequest" was null or undefined when calling stagesEmailCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EmailStageRequestToJSON(requestParameters['emailStageRequest']), + }; + } + + /** + * EmailStage Viewset + */ + async stagesEmailCreateRaw(requestParameters: StagesEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEmailCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailStageFromJSON(jsonValue)); + } + + /** + * EmailStage Viewset + */ + async stagesEmailCreate(requestParameters: StagesEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEmailCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailDestroy without sending the request + */ + async stagesEmailDestroyRequestOpts(requestParameters: StagesEmailDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEmailDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * EmailStage Viewset + */ + async stagesEmailDestroyRaw(requestParameters: StagesEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEmailDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * EmailStage Viewset + */ + async stagesEmailDestroy(requestParameters: StagesEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesEmailDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesEmailList without sending the request + */ + async stagesEmailListRequestOpts(requestParameters: StagesEmailListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['activateUserOnSuccess'] != null) { + queryParameters['activate_user_on_success'] = requestParameters['activateUserOnSuccess']; + } + + if (requestParameters['fromAddress'] != null) { + queryParameters['from_address'] = requestParameters['fromAddress']; + } + + if (requestParameters['host'] != null) { + queryParameters['host'] = requestParameters['host']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['port'] != null) { + queryParameters['port'] = requestParameters['port']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['template'] != null) { + queryParameters['template'] = requestParameters['template']; + } + + if (requestParameters['timeout'] != null) { + queryParameters['timeout'] = requestParameters['timeout']; + } + + if (requestParameters['tokenExpiry'] != null) { + queryParameters['token_expiry'] = requestParameters['tokenExpiry']; + } + + if (requestParameters['useGlobalSettings'] != null) { + queryParameters['use_global_settings'] = requestParameters['useGlobalSettings']; + } + + if (requestParameters['useSsl'] != null) { + queryParameters['use_ssl'] = requestParameters['useSsl']; + } + + if (requestParameters['useTls'] != null) { + queryParameters['use_tls'] = requestParameters['useTls']; + } + + if (requestParameters['username'] != null) { + queryParameters['username'] = requestParameters['username']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * EmailStage Viewset + */ + async stagesEmailListRaw(requestParameters: StagesEmailListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEmailListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEmailStageListFromJSON(jsonValue)); + } + + /** + * EmailStage Viewset + */ + async stagesEmailList(requestParameters: StagesEmailListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEmailListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailPartialUpdate without sending the request + */ + async stagesEmailPartialUpdateRequestOpts(requestParameters: StagesEmailPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEmailPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEmailStageRequestToJSON(requestParameters['patchedEmailStageRequest']), + }; + } + + /** + * EmailStage Viewset + */ + async stagesEmailPartialUpdateRaw(requestParameters: StagesEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEmailPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailStageFromJSON(jsonValue)); + } + + /** + * EmailStage Viewset + */ + async stagesEmailPartialUpdate(requestParameters: StagesEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEmailPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailRetrieve without sending the request + */ + async stagesEmailRetrieveRequestOpts(requestParameters: StagesEmailRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEmailRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * EmailStage Viewset + */ + async stagesEmailRetrieveRaw(requestParameters: StagesEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEmailRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailStageFromJSON(jsonValue)); + } + + /** + * EmailStage Viewset + */ + async stagesEmailRetrieve(requestParameters: StagesEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEmailRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailTemplatesList without sending the request + */ + async stagesEmailTemplatesListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/templates/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get all available templates, including custom templates + */ + async stagesEmailTemplatesListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesEmailTemplatesListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TypeCreateFromJSON)); + } + + /** + * Get all available templates, including custom templates + */ + async stagesEmailTemplatesList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesEmailTemplatesListRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailUpdate without sending the request + */ + async stagesEmailUpdateRequestOpts(requestParameters: StagesEmailUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEmailUpdate().' + ); + } + + if (requestParameters['emailStageRequest'] == null) { + throw new runtime.RequiredError( + 'emailStageRequest', + 'Required parameter "emailStageRequest" was null or undefined when calling stagesEmailUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EmailStageRequestToJSON(requestParameters['emailStageRequest']), + }; + } + + /** + * EmailStage Viewset + */ + async stagesEmailUpdateRaw(requestParameters: StagesEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEmailUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailStageFromJSON(jsonValue)); + } + + /** + * EmailStage Viewset + */ + async stagesEmailUpdate(requestParameters: StagesEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEmailUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEmailUsedByList without sending the request + */ + async stagesEmailUsedByListRequestOpts(requestParameters: StagesEmailUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEmailUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/email/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesEmailUsedByListRaw(requestParameters: StagesEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesEmailUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesEmailUsedByList(requestParameters: StagesEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesEmailUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEndpointsCreate without sending the request + */ + async stagesEndpointsCreateRequestOpts(requestParameters: StagesEndpointsCreateRequest): Promise { + if (requestParameters['endpointStageRequest'] == null) { + throw new runtime.RequiredError( + 'endpointStageRequest', + 'Required parameter "endpointStageRequest" was null or undefined when calling stagesEndpointsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EndpointStageRequestToJSON(requestParameters['endpointStageRequest']), + }; + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsCreateRaw(requestParameters: StagesEndpointsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEndpointsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointStageFromJSON(jsonValue)); + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsCreate(requestParameters: StagesEndpointsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEndpointsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEndpointsDestroy without sending the request + */ + async stagesEndpointsDestroyRequestOpts(requestParameters: StagesEndpointsDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEndpointsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsDestroyRaw(requestParameters: StagesEndpointsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEndpointsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsDestroy(requestParameters: StagesEndpointsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesEndpointsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesEndpointsList without sending the request + */ + async stagesEndpointsListRequestOpts(requestParameters: StagesEndpointsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsListRaw(requestParameters: StagesEndpointsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEndpointsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEndpointStageListFromJSON(jsonValue)); + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsList(requestParameters: StagesEndpointsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEndpointsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEndpointsPartialUpdate without sending the request + */ + async stagesEndpointsPartialUpdateRequestOpts(requestParameters: StagesEndpointsPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEndpointsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedEndpointStageRequestToJSON(requestParameters['patchedEndpointStageRequest']), + }; + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsPartialUpdateRaw(requestParameters: StagesEndpointsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEndpointsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointStageFromJSON(jsonValue)); + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsPartialUpdate(requestParameters: StagesEndpointsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEndpointsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEndpointsRetrieve without sending the request + */ + async stagesEndpointsRetrieveRequestOpts(requestParameters: StagesEndpointsRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEndpointsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsRetrieveRaw(requestParameters: StagesEndpointsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEndpointsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointStageFromJSON(jsonValue)); + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsRetrieve(requestParameters: StagesEndpointsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEndpointsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEndpointsUpdate without sending the request + */ + async stagesEndpointsUpdateRequestOpts(requestParameters: StagesEndpointsUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEndpointsUpdate().' + ); + } + + if (requestParameters['endpointStageRequest'] == null) { + throw new runtime.RequiredError( + 'endpointStageRequest', + 'Required parameter "endpointStageRequest" was null or undefined when calling stagesEndpointsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: EndpointStageRequestToJSON(requestParameters['endpointStageRequest']), + }; + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsUpdateRaw(requestParameters: StagesEndpointsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesEndpointsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EndpointStageFromJSON(jsonValue)); + } + + /** + * EndpointStage Viewset + */ + async stagesEndpointsUpdate(requestParameters: StagesEndpointsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesEndpointsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesEndpointsUsedByList without sending the request + */ + async stagesEndpointsUsedByListRequestOpts(requestParameters: StagesEndpointsUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesEndpointsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/endpoints/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesEndpointsUsedByListRaw(requestParameters: StagesEndpointsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesEndpointsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesEndpointsUsedByList(requestParameters: StagesEndpointsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesEndpointsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesIdentificationCreate without sending the request + */ + async stagesIdentificationCreateRequestOpts(requestParameters: StagesIdentificationCreateRequest): Promise { + if (requestParameters['identificationStageRequest'] == null) { + throw new runtime.RequiredError( + 'identificationStageRequest', + 'Required parameter "identificationStageRequest" was null or undefined when calling stagesIdentificationCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: IdentificationStageRequestToJSON(requestParameters['identificationStageRequest']), + }; + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationCreateRaw(requestParameters: StagesIdentificationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesIdentificationCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdentificationStageFromJSON(jsonValue)); + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationCreate(requestParameters: StagesIdentificationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesIdentificationCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesIdentificationDestroy without sending the request + */ + async stagesIdentificationDestroyRequestOpts(requestParameters: StagesIdentificationDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesIdentificationDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationDestroyRaw(requestParameters: StagesIdentificationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesIdentificationDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationDestroy(requestParameters: StagesIdentificationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesIdentificationDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesIdentificationList without sending the request + */ + async stagesIdentificationListRequestOpts(requestParameters: StagesIdentificationListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['captchaStage'] != null) { + queryParameters['captcha_stage'] = requestParameters['captchaStage']; + } + + if (requestParameters['caseInsensitiveMatching'] != null) { + queryParameters['case_insensitive_matching'] = requestParameters['caseInsensitiveMatching']; + } + + if (requestParameters['enrollmentFlow'] != null) { + queryParameters['enrollment_flow'] = requestParameters['enrollmentFlow']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['passwordStage'] != null) { + queryParameters['password_stage'] = requestParameters['passwordStage']; + } + + if (requestParameters['passwordlessFlow'] != null) { + queryParameters['passwordless_flow'] = requestParameters['passwordlessFlow']; + } + + if (requestParameters['recoveryFlow'] != null) { + queryParameters['recovery_flow'] = requestParameters['recoveryFlow']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['showMatchedUser'] != null) { + queryParameters['show_matched_user'] = requestParameters['showMatchedUser']; + } + + if (requestParameters['showSourceLabels'] != null) { + queryParameters['show_source_labels'] = requestParameters['showSourceLabels']; + } + + if (requestParameters['webauthnStage'] != null) { + queryParameters['webauthn_stage'] = requestParameters['webauthnStage']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationListRaw(requestParameters: StagesIdentificationListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesIdentificationListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedIdentificationStageListFromJSON(jsonValue)); + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationList(requestParameters: StagesIdentificationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesIdentificationListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesIdentificationPartialUpdate without sending the request + */ + async stagesIdentificationPartialUpdateRequestOpts(requestParameters: StagesIdentificationPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesIdentificationPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedIdentificationStageRequestToJSON(requestParameters['patchedIdentificationStageRequest']), + }; + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationPartialUpdateRaw(requestParameters: StagesIdentificationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesIdentificationPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdentificationStageFromJSON(jsonValue)); + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationPartialUpdate(requestParameters: StagesIdentificationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesIdentificationPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesIdentificationRetrieve without sending the request + */ + async stagesIdentificationRetrieveRequestOpts(requestParameters: StagesIdentificationRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesIdentificationRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationRetrieveRaw(requestParameters: StagesIdentificationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesIdentificationRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdentificationStageFromJSON(jsonValue)); + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationRetrieve(requestParameters: StagesIdentificationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesIdentificationRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesIdentificationUpdate without sending the request + */ + async stagesIdentificationUpdateRequestOpts(requestParameters: StagesIdentificationUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesIdentificationUpdate().' + ); + } + + if (requestParameters['identificationStageRequest'] == null) { + throw new runtime.RequiredError( + 'identificationStageRequest', + 'Required parameter "identificationStageRequest" was null or undefined when calling stagesIdentificationUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: IdentificationStageRequestToJSON(requestParameters['identificationStageRequest']), + }; + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationUpdateRaw(requestParameters: StagesIdentificationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesIdentificationUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdentificationStageFromJSON(jsonValue)); + } + + /** + * IdentificationStage Viewset + */ + async stagesIdentificationUpdate(requestParameters: StagesIdentificationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesIdentificationUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesIdentificationUsedByList without sending the request + */ + async stagesIdentificationUsedByListRequestOpts(requestParameters: StagesIdentificationUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesIdentificationUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/identification/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesIdentificationUsedByListRaw(requestParameters: StagesIdentificationUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesIdentificationUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesIdentificationUsedByList(requestParameters: StagesIdentificationUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesIdentificationUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationInvitationsCreate without sending the request + */ + async stagesInvitationInvitationsCreateRequestOpts(requestParameters: StagesInvitationInvitationsCreateRequest): Promise { + if (requestParameters['invitationRequest'] == null) { + throw new runtime.RequiredError( + 'invitationRequest', + 'Required parameter "invitationRequest" was null or undefined when calling stagesInvitationInvitationsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: InvitationRequestToJSON(requestParameters['invitationRequest']), + }; + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsCreateRaw(requestParameters: StagesInvitationInvitationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue)); + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsCreate(requestParameters: StagesInvitationInvitationsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationInvitationsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationInvitationsDestroy without sending the request + */ + async stagesInvitationInvitationsDestroyRequestOpts(requestParameters: StagesInvitationInvitationsDestroyRequest): Promise { + if (requestParameters['inviteUuid'] == null) { + throw new runtime.RequiredError( + 'inviteUuid', + 'Required parameter "inviteUuid" was null or undefined when calling stagesInvitationInvitationsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/{invite_uuid}/`; + urlPath = urlPath.replace(`{${"invite_uuid"}}`, encodeURIComponent(String(requestParameters['inviteUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsDestroyRaw(requestParameters: StagesInvitationInvitationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsDestroy(requestParameters: StagesInvitationInvitationsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesInvitationInvitationsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesInvitationInvitationsList without sending the request + */ + async stagesInvitationInvitationsListRequestOpts(requestParameters: StagesInvitationInvitationsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['createdByUsername'] != null) { + queryParameters['created_by__username'] = requestParameters['createdByUsername']; + } + + if (requestParameters['expires'] != null) { + queryParameters['expires'] = (requestParameters['expires'] as any).toISOString(); + } + + if (requestParameters['flowSlug'] != null) { + queryParameters['flow__slug'] = requestParameters['flowSlug']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsListRaw(requestParameters: StagesInvitationInvitationsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedInvitationListFromJSON(jsonValue)); + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsList(requestParameters: StagesInvitationInvitationsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationInvitationsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationInvitationsPartialUpdate without sending the request + */ + async stagesInvitationInvitationsPartialUpdateRequestOpts(requestParameters: StagesInvitationInvitationsPartialUpdateRequest): Promise { + if (requestParameters['inviteUuid'] == null) { + throw new runtime.RequiredError( + 'inviteUuid', + 'Required parameter "inviteUuid" was null or undefined when calling stagesInvitationInvitationsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/{invite_uuid}/`; + urlPath = urlPath.replace(`{${"invite_uuid"}}`, encodeURIComponent(String(requestParameters['inviteUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedInvitationRequestToJSON(requestParameters['patchedInvitationRequest']), + }; + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsPartialUpdateRaw(requestParameters: StagesInvitationInvitationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue)); + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsPartialUpdate(requestParameters: StagesInvitationInvitationsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationInvitationsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationInvitationsRetrieve without sending the request + */ + async stagesInvitationInvitationsRetrieveRequestOpts(requestParameters: StagesInvitationInvitationsRetrieveRequest): Promise { + if (requestParameters['inviteUuid'] == null) { + throw new runtime.RequiredError( + 'inviteUuid', + 'Required parameter "inviteUuid" was null or undefined when calling stagesInvitationInvitationsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/{invite_uuid}/`; + urlPath = urlPath.replace(`{${"invite_uuid"}}`, encodeURIComponent(String(requestParameters['inviteUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsRetrieveRaw(requestParameters: StagesInvitationInvitationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue)); + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsRetrieve(requestParameters: StagesInvitationInvitationsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationInvitationsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationInvitationsSendEmailCreate without sending the request + */ + async stagesInvitationInvitationsSendEmailCreateRequestOpts(requestParameters: StagesInvitationInvitationsSendEmailCreateRequest): Promise { + if (requestParameters['inviteUuid'] == null) { + throw new runtime.RequiredError( + 'inviteUuid', + 'Required parameter "inviteUuid" was null or undefined when calling stagesInvitationInvitationsSendEmailCreate().' + ); + } + + if (requestParameters['invitationSendEmailRequest'] == null) { + throw new runtime.RequiredError( + 'invitationSendEmailRequest', + 'Required parameter "invitationSendEmailRequest" was null or undefined when calling stagesInvitationInvitationsSendEmailCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/{invite_uuid}/send_email/`; + urlPath = urlPath.replace(`{${"invite_uuid"}}`, encodeURIComponent(String(requestParameters['inviteUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: InvitationSendEmailRequestToJSON(requestParameters['invitationSendEmailRequest']), + }; + } + + /** + * Send invitation link via email to one or more addresses + */ + async stagesInvitationInvitationsSendEmailCreateRaw(requestParameters: StagesInvitationInvitationsSendEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsSendEmailCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Send invitation link via email to one or more addresses + */ + async stagesInvitationInvitationsSendEmailCreate(requestParameters: StagesInvitationInvitationsSendEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesInvitationInvitationsSendEmailCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesInvitationInvitationsUpdate without sending the request + */ + async stagesInvitationInvitationsUpdateRequestOpts(requestParameters: StagesInvitationInvitationsUpdateRequest): Promise { + if (requestParameters['inviteUuid'] == null) { + throw new runtime.RequiredError( + 'inviteUuid', + 'Required parameter "inviteUuid" was null or undefined when calling stagesInvitationInvitationsUpdate().' + ); + } + + if (requestParameters['invitationRequest'] == null) { + throw new runtime.RequiredError( + 'invitationRequest', + 'Required parameter "invitationRequest" was null or undefined when calling stagesInvitationInvitationsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/{invite_uuid}/`; + urlPath = urlPath.replace(`{${"invite_uuid"}}`, encodeURIComponent(String(requestParameters['inviteUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: InvitationRequestToJSON(requestParameters['invitationRequest']), + }; + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsUpdateRaw(requestParameters: StagesInvitationInvitationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationInvitationsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationFromJSON(jsonValue)); + } + + /** + * Invitation Viewset + */ + async stagesInvitationInvitationsUpdate(requestParameters: StagesInvitationInvitationsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationInvitationsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationInvitationsUsedByList without sending the request + */ + async stagesInvitationInvitationsUsedByListRequestOpts(requestParameters: StagesInvitationInvitationsUsedByListRequest): Promise { + if (requestParameters['inviteUuid'] == null) { + throw new runtime.RequiredError( + 'inviteUuid', + 'Required parameter "inviteUuid" was null or undefined when calling stagesInvitationInvitationsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/invitations/{invite_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"invite_uuid"}}`, encodeURIComponent(String(requestParameters['inviteUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesInvitationInvitationsUsedByListRaw(requestParameters: StagesInvitationInvitationsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesInvitationInvitationsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesInvitationInvitationsUsedByList(requestParameters: StagesInvitationInvitationsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesInvitationInvitationsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationStagesCreate without sending the request + */ + async stagesInvitationStagesCreateRequestOpts(requestParameters: StagesInvitationStagesCreateRequest): Promise { + if (requestParameters['invitationStageRequest'] == null) { + throw new runtime.RequiredError( + 'invitationStageRequest', + 'Required parameter "invitationStageRequest" was null or undefined when calling stagesInvitationStagesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: InvitationStageRequestToJSON(requestParameters['invitationStageRequest']), + }; + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesCreateRaw(requestParameters: StagesInvitationStagesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationStagesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationStageFromJSON(jsonValue)); + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesCreate(requestParameters: StagesInvitationStagesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationStagesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationStagesDestroy without sending the request + */ + async stagesInvitationStagesDestroyRequestOpts(requestParameters: StagesInvitationStagesDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesInvitationStagesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesDestroyRaw(requestParameters: StagesInvitationStagesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationStagesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesDestroy(requestParameters: StagesInvitationStagesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesInvitationStagesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesInvitationStagesList without sending the request + */ + async stagesInvitationStagesListRequestOpts(requestParameters: StagesInvitationStagesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['continueFlowWithoutInvitation'] != null) { + queryParameters['continue_flow_without_invitation'] = requestParameters['continueFlowWithoutInvitation']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['noFlows'] != null) { + queryParameters['no_flows'] = requestParameters['noFlows']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesListRaw(requestParameters: StagesInvitationStagesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationStagesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedInvitationStageListFromJSON(jsonValue)); + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesList(requestParameters: StagesInvitationStagesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationStagesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationStagesPartialUpdate without sending the request + */ + async stagesInvitationStagesPartialUpdateRequestOpts(requestParameters: StagesInvitationStagesPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesInvitationStagesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedInvitationStageRequestToJSON(requestParameters['patchedInvitationStageRequest']), + }; + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesPartialUpdateRaw(requestParameters: StagesInvitationStagesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationStagesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationStageFromJSON(jsonValue)); + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesPartialUpdate(requestParameters: StagesInvitationStagesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationStagesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationStagesRetrieve without sending the request + */ + async stagesInvitationStagesRetrieveRequestOpts(requestParameters: StagesInvitationStagesRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesInvitationStagesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesRetrieveRaw(requestParameters: StagesInvitationStagesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationStagesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationStageFromJSON(jsonValue)); + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesRetrieve(requestParameters: StagesInvitationStagesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationStagesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationStagesUpdate without sending the request + */ + async stagesInvitationStagesUpdateRequestOpts(requestParameters: StagesInvitationStagesUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesInvitationStagesUpdate().' + ); + } + + if (requestParameters['invitationStageRequest'] == null) { + throw new runtime.RequiredError( + 'invitationStageRequest', + 'Required parameter "invitationStageRequest" was null or undefined when calling stagesInvitationStagesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: InvitationStageRequestToJSON(requestParameters['invitationStageRequest']), + }; + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesUpdateRaw(requestParameters: StagesInvitationStagesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesInvitationStagesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InvitationStageFromJSON(jsonValue)); + } + + /** + * InvitationStage Viewset + */ + async stagesInvitationStagesUpdate(requestParameters: StagesInvitationStagesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesInvitationStagesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesInvitationStagesUsedByList without sending the request + */ + async stagesInvitationStagesUsedByListRequestOpts(requestParameters: StagesInvitationStagesUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesInvitationStagesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/invitation/stages/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesInvitationStagesUsedByListRaw(requestParameters: StagesInvitationStagesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesInvitationStagesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesInvitationStagesUsedByList(requestParameters: StagesInvitationStagesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesInvitationStagesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesMtlsCreate without sending the request + */ + async stagesMtlsCreateRequestOpts(requestParameters: StagesMtlsCreateRequest): Promise { + if (requestParameters['mutualTLSStageRequest'] == null) { + throw new runtime.RequiredError( + 'mutualTLSStageRequest', + 'Required parameter "mutualTLSStageRequest" was null or undefined when calling stagesMtlsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MutualTLSStageRequestToJSON(requestParameters['mutualTLSStageRequest']), + }; + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsCreateRaw(requestParameters: StagesMtlsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesMtlsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MutualTLSStageFromJSON(jsonValue)); + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsCreate(requestParameters: StagesMtlsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesMtlsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesMtlsDestroy without sending the request + */ + async stagesMtlsDestroyRequestOpts(requestParameters: StagesMtlsDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesMtlsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsDestroyRaw(requestParameters: StagesMtlsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesMtlsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsDestroy(requestParameters: StagesMtlsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesMtlsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesMtlsList without sending the request + */ + async stagesMtlsListRequestOpts(requestParameters: StagesMtlsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['certAttribute'] != null) { + queryParameters['cert_attribute'] = requestParameters['certAttribute']; + } + + if (requestParameters['certificateAuthorities'] != null) { + queryParameters['certificate_authorities'] = requestParameters['certificateAuthorities']; + } + + if (requestParameters['mode'] != null) { + queryParameters['mode'] = requestParameters['mode']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['userAttribute'] != null) { + queryParameters['user_attribute'] = requestParameters['userAttribute']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsListRaw(requestParameters: StagesMtlsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesMtlsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMutualTLSStageListFromJSON(jsonValue)); + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsList(requestParameters: StagesMtlsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesMtlsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesMtlsPartialUpdate without sending the request + */ + async stagesMtlsPartialUpdateRequestOpts(requestParameters: StagesMtlsPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesMtlsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedMutualTLSStageRequestToJSON(requestParameters['patchedMutualTLSStageRequest']), + }; + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsPartialUpdateRaw(requestParameters: StagesMtlsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesMtlsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MutualTLSStageFromJSON(jsonValue)); + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsPartialUpdate(requestParameters: StagesMtlsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesMtlsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesMtlsRetrieve without sending the request + */ + async stagesMtlsRetrieveRequestOpts(requestParameters: StagesMtlsRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesMtlsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsRetrieveRaw(requestParameters: StagesMtlsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesMtlsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MutualTLSStageFromJSON(jsonValue)); + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsRetrieve(requestParameters: StagesMtlsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesMtlsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesMtlsUpdate without sending the request + */ + async stagesMtlsUpdateRequestOpts(requestParameters: StagesMtlsUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesMtlsUpdate().' + ); + } + + if (requestParameters['mutualTLSStageRequest'] == null) { + throw new runtime.RequiredError( + 'mutualTLSStageRequest', + 'Required parameter "mutualTLSStageRequest" was null or undefined when calling stagesMtlsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: MutualTLSStageRequestToJSON(requestParameters['mutualTLSStageRequest']), + }; + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsUpdateRaw(requestParameters: StagesMtlsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesMtlsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MutualTLSStageFromJSON(jsonValue)); + } + + /** + * MutualTLSStage Viewset + */ + async stagesMtlsUpdate(requestParameters: StagesMtlsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesMtlsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesMtlsUsedByList without sending the request + */ + async stagesMtlsUsedByListRequestOpts(requestParameters: StagesMtlsUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesMtlsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/mtls/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesMtlsUsedByListRaw(requestParameters: StagesMtlsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesMtlsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesMtlsUsedByList(requestParameters: StagesMtlsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesMtlsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPasswordCreate without sending the request + */ + async stagesPasswordCreateRequestOpts(requestParameters: StagesPasswordCreateRequest): Promise { + if (requestParameters['passwordStageRequest'] == null) { + throw new runtime.RequiredError( + 'passwordStageRequest', + 'Required parameter "passwordStageRequest" was null or undefined when calling stagesPasswordCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PasswordStageRequestToJSON(requestParameters['passwordStageRequest']), + }; + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordCreateRaw(requestParameters: StagesPasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPasswordCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordStageFromJSON(jsonValue)); + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordCreate(requestParameters: StagesPasswordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPasswordCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPasswordDestroy without sending the request + */ + async stagesPasswordDestroyRequestOpts(requestParameters: StagesPasswordDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPasswordDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordDestroyRaw(requestParameters: StagesPasswordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPasswordDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordDestroy(requestParameters: StagesPasswordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesPasswordDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesPasswordList without sending the request + */ + async stagesPasswordListRequestOpts(requestParameters: StagesPasswordListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['allowShowPassword'] != null) { + queryParameters['allow_show_password'] = requestParameters['allowShowPassword']; + } + + if (requestParameters['configureFlow'] != null) { + queryParameters['configure_flow'] = requestParameters['configureFlow']; + } + + if (requestParameters['failedAttemptsBeforeCancel'] != null) { + queryParameters['failed_attempts_before_cancel'] = requestParameters['failedAttemptsBeforeCancel']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordListRaw(requestParameters: StagesPasswordListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPasswordListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPasswordStageListFromJSON(jsonValue)); + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordList(requestParameters: StagesPasswordListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPasswordListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPasswordPartialUpdate without sending the request + */ + async stagesPasswordPartialUpdateRequestOpts(requestParameters: StagesPasswordPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPasswordPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPasswordStageRequestToJSON(requestParameters['patchedPasswordStageRequest']), + }; + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordPartialUpdateRaw(requestParameters: StagesPasswordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPasswordPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordStageFromJSON(jsonValue)); + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordPartialUpdate(requestParameters: StagesPasswordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPasswordPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPasswordRetrieve without sending the request + */ + async stagesPasswordRetrieveRequestOpts(requestParameters: StagesPasswordRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPasswordRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordRetrieveRaw(requestParameters: StagesPasswordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPasswordRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordStageFromJSON(jsonValue)); + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordRetrieve(requestParameters: StagesPasswordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPasswordRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPasswordUpdate without sending the request + */ + async stagesPasswordUpdateRequestOpts(requestParameters: StagesPasswordUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPasswordUpdate().' + ); + } + + if (requestParameters['passwordStageRequest'] == null) { + throw new runtime.RequiredError( + 'passwordStageRequest', + 'Required parameter "passwordStageRequest" was null or undefined when calling stagesPasswordUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PasswordStageRequestToJSON(requestParameters['passwordStageRequest']), + }; + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordUpdateRaw(requestParameters: StagesPasswordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPasswordUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordStageFromJSON(jsonValue)); + } + + /** + * PasswordStage Viewset + */ + async stagesPasswordUpdate(requestParameters: StagesPasswordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPasswordUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPasswordUsedByList without sending the request + */ + async stagesPasswordUsedByListRequestOpts(requestParameters: StagesPasswordUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPasswordUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/password/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesPasswordUsedByListRaw(requestParameters: StagesPasswordUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesPasswordUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesPasswordUsedByList(requestParameters: StagesPasswordUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesPasswordUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsCreate without sending the request + */ + async stagesPromptPromptsCreateRequestOpts(requestParameters: StagesPromptPromptsCreateRequest): Promise { + if (requestParameters['promptRequest'] == null) { + throw new runtime.RequiredError( + 'promptRequest', + 'Required parameter "promptRequest" was null or undefined when calling stagesPromptPromptsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PromptRequestToJSON(requestParameters['promptRequest']), + }; + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsCreateRaw(requestParameters: StagesPromptPromptsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptFromJSON(jsonValue)); + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsCreate(requestParameters: StagesPromptPromptsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptPromptsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsDestroy without sending the request + */ + async stagesPromptPromptsDestroyRequestOpts(requestParameters: StagesPromptPromptsDestroyRequest): Promise { + if (requestParameters['promptUuid'] == null) { + throw new runtime.RequiredError( + 'promptUuid', + 'Required parameter "promptUuid" was null or undefined when calling stagesPromptPromptsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/{prompt_uuid}/`; + urlPath = urlPath.replace(`{${"prompt_uuid"}}`, encodeURIComponent(String(requestParameters['promptUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsDestroyRaw(requestParameters: StagesPromptPromptsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsDestroy(requestParameters: StagesPromptPromptsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesPromptPromptsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesPromptPromptsList without sending the request + */ + async stagesPromptPromptsListRequestOpts(requestParameters: StagesPromptPromptsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['fieldKey'] != null) { + queryParameters['field_key'] = requestParameters['fieldKey']; + } + + if (requestParameters['label'] != null) { + queryParameters['label'] = requestParameters['label']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['placeholder'] != null) { + queryParameters['placeholder'] = requestParameters['placeholder']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsListRaw(requestParameters: StagesPromptPromptsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPromptListFromJSON(jsonValue)); + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsList(requestParameters: StagesPromptPromptsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptPromptsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsPartialUpdate without sending the request + */ + async stagesPromptPromptsPartialUpdateRequestOpts(requestParameters: StagesPromptPromptsPartialUpdateRequest): Promise { + if (requestParameters['promptUuid'] == null) { + throw new runtime.RequiredError( + 'promptUuid', + 'Required parameter "promptUuid" was null or undefined when calling stagesPromptPromptsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/{prompt_uuid}/`; + urlPath = urlPath.replace(`{${"prompt_uuid"}}`, encodeURIComponent(String(requestParameters['promptUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPromptRequestToJSON(requestParameters['patchedPromptRequest']), + }; + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsPartialUpdateRaw(requestParameters: StagesPromptPromptsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptFromJSON(jsonValue)); + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsPartialUpdate(requestParameters: StagesPromptPromptsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptPromptsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsPreviewCreate without sending the request + */ + async stagesPromptPromptsPreviewCreateRequestOpts(requestParameters: StagesPromptPromptsPreviewCreateRequest): Promise { + if (requestParameters['promptRequest'] == null) { + throw new runtime.RequiredError( + 'promptRequest', + 'Required parameter "promptRequest" was null or undefined when calling stagesPromptPromptsPreviewCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/preview/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PromptRequestToJSON(requestParameters['promptRequest']), + }; + } + + /** + * Preview a prompt as a challenge, just like a flow would receive + */ + async stagesPromptPromptsPreviewCreateRaw(requestParameters: StagesPromptPromptsPreviewCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsPreviewCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptChallengeFromJSON(jsonValue)); + } + + /** + * Preview a prompt as a challenge, just like a flow would receive + */ + async stagesPromptPromptsPreviewCreate(requestParameters: StagesPromptPromptsPreviewCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptPromptsPreviewCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsRetrieve without sending the request + */ + async stagesPromptPromptsRetrieveRequestOpts(requestParameters: StagesPromptPromptsRetrieveRequest): Promise { + if (requestParameters['promptUuid'] == null) { + throw new runtime.RequiredError( + 'promptUuid', + 'Required parameter "promptUuid" was null or undefined when calling stagesPromptPromptsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/{prompt_uuid}/`; + urlPath = urlPath.replace(`{${"prompt_uuid"}}`, encodeURIComponent(String(requestParameters['promptUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsRetrieveRaw(requestParameters: StagesPromptPromptsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptFromJSON(jsonValue)); + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsRetrieve(requestParameters: StagesPromptPromptsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptPromptsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsUpdate without sending the request + */ + async stagesPromptPromptsUpdateRequestOpts(requestParameters: StagesPromptPromptsUpdateRequest): Promise { + if (requestParameters['promptUuid'] == null) { + throw new runtime.RequiredError( + 'promptUuid', + 'Required parameter "promptUuid" was null or undefined when calling stagesPromptPromptsUpdate().' + ); + } + + if (requestParameters['promptRequest'] == null) { + throw new runtime.RequiredError( + 'promptRequest', + 'Required parameter "promptRequest" was null or undefined when calling stagesPromptPromptsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/{prompt_uuid}/`; + urlPath = urlPath.replace(`{${"prompt_uuid"}}`, encodeURIComponent(String(requestParameters['promptUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PromptRequestToJSON(requestParameters['promptRequest']), + }; + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsUpdateRaw(requestParameters: StagesPromptPromptsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptPromptsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptFromJSON(jsonValue)); + } + + /** + * Prompt Viewset + */ + async stagesPromptPromptsUpdate(requestParameters: StagesPromptPromptsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptPromptsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptPromptsUsedByList without sending the request + */ + async stagesPromptPromptsUsedByListRequestOpts(requestParameters: StagesPromptPromptsUsedByListRequest): Promise { + if (requestParameters['promptUuid'] == null) { + throw new runtime.RequiredError( + 'promptUuid', + 'Required parameter "promptUuid" was null or undefined when calling stagesPromptPromptsUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/prompts/{prompt_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"prompt_uuid"}}`, encodeURIComponent(String(requestParameters['promptUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesPromptPromptsUsedByListRaw(requestParameters: StagesPromptPromptsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesPromptPromptsUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesPromptPromptsUsedByList(requestParameters: StagesPromptPromptsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesPromptPromptsUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptStagesCreate without sending the request + */ + async stagesPromptStagesCreateRequestOpts(requestParameters: StagesPromptStagesCreateRequest): Promise { + if (requestParameters['promptStageRequest'] == null) { + throw new runtime.RequiredError( + 'promptStageRequest', + 'Required parameter "promptStageRequest" was null or undefined when calling stagesPromptStagesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PromptStageRequestToJSON(requestParameters['promptStageRequest']), + }; + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesCreateRaw(requestParameters: StagesPromptStagesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptStagesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptStageFromJSON(jsonValue)); + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesCreate(requestParameters: StagesPromptStagesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptStagesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptStagesDestroy without sending the request + */ + async stagesPromptStagesDestroyRequestOpts(requestParameters: StagesPromptStagesDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPromptStagesDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesDestroyRaw(requestParameters: StagesPromptStagesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptStagesDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesDestroy(requestParameters: StagesPromptStagesDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesPromptStagesDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesPromptStagesList without sending the request + */ + async stagesPromptStagesListRequestOpts(requestParameters: StagesPromptStagesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['fields'] != null) { + queryParameters['fields'] = requestParameters['fields']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['validationPolicies'] != null) { + queryParameters['validation_policies'] = requestParameters['validationPolicies']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesListRaw(requestParameters: StagesPromptStagesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptStagesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPromptStageListFromJSON(jsonValue)); + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesList(requestParameters: StagesPromptStagesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptStagesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptStagesPartialUpdate without sending the request + */ + async stagesPromptStagesPartialUpdateRequestOpts(requestParameters: StagesPromptStagesPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPromptStagesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedPromptStageRequestToJSON(requestParameters['patchedPromptStageRequest']), + }; + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesPartialUpdateRaw(requestParameters: StagesPromptStagesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptStagesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptStageFromJSON(jsonValue)); + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesPartialUpdate(requestParameters: StagesPromptStagesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptStagesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptStagesRetrieve without sending the request + */ + async stagesPromptStagesRetrieveRequestOpts(requestParameters: StagesPromptStagesRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPromptStagesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesRetrieveRaw(requestParameters: StagesPromptStagesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptStagesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptStageFromJSON(jsonValue)); + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesRetrieve(requestParameters: StagesPromptStagesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptStagesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptStagesUpdate without sending the request + */ + async stagesPromptStagesUpdateRequestOpts(requestParameters: StagesPromptStagesUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPromptStagesUpdate().' + ); + } + + if (requestParameters['promptStageRequest'] == null) { + throw new runtime.RequiredError( + 'promptStageRequest', + 'Required parameter "promptStageRequest" was null or undefined when calling stagesPromptStagesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PromptStageRequestToJSON(requestParameters['promptStageRequest']), + }; + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesUpdateRaw(requestParameters: StagesPromptStagesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesPromptStagesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PromptStageFromJSON(jsonValue)); + } + + /** + * PromptStage Viewset + */ + async stagesPromptStagesUpdate(requestParameters: StagesPromptStagesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesPromptStagesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesPromptStagesUsedByList without sending the request + */ + async stagesPromptStagesUsedByListRequestOpts(requestParameters: StagesPromptStagesUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesPromptStagesUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/prompt/stages/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesPromptStagesUsedByListRaw(requestParameters: StagesPromptStagesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesPromptStagesUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesPromptStagesUsedByList(requestParameters: StagesPromptStagesUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesPromptStagesUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesRedirectCreate without sending the request + */ + async stagesRedirectCreateRequestOpts(requestParameters: StagesRedirectCreateRequest): Promise { + if (requestParameters['redirectStageRequest'] == null) { + throw new runtime.RequiredError( + 'redirectStageRequest', + 'Required parameter "redirectStageRequest" was null or undefined when calling stagesRedirectCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RedirectStageRequestToJSON(requestParameters['redirectStageRequest']), + }; + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectCreateRaw(requestParameters: StagesRedirectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesRedirectCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue)); + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectCreate(requestParameters: StagesRedirectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesRedirectCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesRedirectDestroy without sending the request + */ + async stagesRedirectDestroyRequestOpts(requestParameters: StagesRedirectDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesRedirectDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectDestroyRaw(requestParameters: StagesRedirectDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesRedirectDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectDestroy(requestParameters: StagesRedirectDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesRedirectDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesRedirectList without sending the request + */ + async stagesRedirectListRequestOpts(requestParameters: StagesRedirectListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectListRaw(requestParameters: StagesRedirectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesRedirectListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRedirectStageListFromJSON(jsonValue)); + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectList(requestParameters: StagesRedirectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesRedirectListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesRedirectPartialUpdate without sending the request + */ + async stagesRedirectPartialUpdateRequestOpts(requestParameters: StagesRedirectPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesRedirectPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedRedirectStageRequestToJSON(requestParameters['patchedRedirectStageRequest']), + }; + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectPartialUpdateRaw(requestParameters: StagesRedirectPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesRedirectPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue)); + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectPartialUpdate(requestParameters: StagesRedirectPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesRedirectPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesRedirectRetrieve without sending the request + */ + async stagesRedirectRetrieveRequestOpts(requestParameters: StagesRedirectRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesRedirectRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectRetrieveRaw(requestParameters: StagesRedirectRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesRedirectRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue)); + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectRetrieve(requestParameters: StagesRedirectRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesRedirectRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesRedirectUpdate without sending the request + */ + async stagesRedirectUpdateRequestOpts(requestParameters: StagesRedirectUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesRedirectUpdate().' + ); + } + + if (requestParameters['redirectStageRequest'] == null) { + throw new runtime.RequiredError( + 'redirectStageRequest', + 'Required parameter "redirectStageRequest" was null or undefined when calling stagesRedirectUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RedirectStageRequestToJSON(requestParameters['redirectStageRequest']), + }; + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectUpdateRaw(requestParameters: StagesRedirectUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesRedirectUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue)); + } + + /** + * RedirectStage Viewset + */ + async stagesRedirectUpdate(requestParameters: StagesRedirectUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesRedirectUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesRedirectUsedByList without sending the request + */ + async stagesRedirectUsedByListRequestOpts(requestParameters: StagesRedirectUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesRedirectUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/redirect/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesRedirectUsedByListRaw(requestParameters: StagesRedirectUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesRedirectUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesRedirectUsedByList(requestParameters: StagesRedirectUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesRedirectUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesSourceCreate without sending the request + */ + async stagesSourceCreateRequestOpts(requestParameters: StagesSourceCreateRequest): Promise { + if (requestParameters['sourceStageRequest'] == null) { + throw new runtime.RequiredError( + 'sourceStageRequest', + 'Required parameter "sourceStageRequest" was null or undefined when calling stagesSourceCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SourceStageRequestToJSON(requestParameters['sourceStageRequest']), + }; + } + + /** + * SourceStage Viewset + */ + async stagesSourceCreateRaw(requestParameters: StagesSourceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesSourceCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SourceStageFromJSON(jsonValue)); + } + + /** + * SourceStage Viewset + */ + async stagesSourceCreate(requestParameters: StagesSourceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesSourceCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesSourceDestroy without sending the request + */ + async stagesSourceDestroyRequestOpts(requestParameters: StagesSourceDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesSourceDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SourceStage Viewset + */ + async stagesSourceDestroyRaw(requestParameters: StagesSourceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesSourceDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * SourceStage Viewset + */ + async stagesSourceDestroy(requestParameters: StagesSourceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesSourceDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesSourceList without sending the request + */ + async stagesSourceListRequestOpts(requestParameters: StagesSourceListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['resumeTimeout'] != null) { + queryParameters['resume_timeout'] = requestParameters['resumeTimeout']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['source'] != null) { + queryParameters['source'] = requestParameters['source']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SourceStage Viewset + */ + async stagesSourceListRaw(requestParameters: StagesSourceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesSourceListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSourceStageListFromJSON(jsonValue)); + } + + /** + * SourceStage Viewset + */ + async stagesSourceList(requestParameters: StagesSourceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesSourceListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesSourcePartialUpdate without sending the request + */ + async stagesSourcePartialUpdateRequestOpts(requestParameters: StagesSourcePartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesSourcePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedSourceStageRequestToJSON(requestParameters['patchedSourceStageRequest']), + }; + } + + /** + * SourceStage Viewset + */ + async stagesSourcePartialUpdateRaw(requestParameters: StagesSourcePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesSourcePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SourceStageFromJSON(jsonValue)); + } + + /** + * SourceStage Viewset + */ + async stagesSourcePartialUpdate(requestParameters: StagesSourcePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesSourcePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesSourceRetrieve without sending the request + */ + async stagesSourceRetrieveRequestOpts(requestParameters: StagesSourceRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesSourceRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * SourceStage Viewset + */ + async stagesSourceRetrieveRaw(requestParameters: StagesSourceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesSourceRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SourceStageFromJSON(jsonValue)); + } + + /** + * SourceStage Viewset + */ + async stagesSourceRetrieve(requestParameters: StagesSourceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesSourceRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesSourceUpdate without sending the request + */ + async stagesSourceUpdateRequestOpts(requestParameters: StagesSourceUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesSourceUpdate().' + ); + } + + if (requestParameters['sourceStageRequest'] == null) { + throw new runtime.RequiredError( + 'sourceStageRequest', + 'Required parameter "sourceStageRequest" was null or undefined when calling stagesSourceUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: SourceStageRequestToJSON(requestParameters['sourceStageRequest']), + }; + } + + /** + * SourceStage Viewset + */ + async stagesSourceUpdateRaw(requestParameters: StagesSourceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesSourceUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SourceStageFromJSON(jsonValue)); + } + + /** + * SourceStage Viewset + */ + async stagesSourceUpdate(requestParameters: StagesSourceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesSourceUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesSourceUsedByList without sending the request + */ + async stagesSourceUsedByListRequestOpts(requestParameters: StagesSourceUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesSourceUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/source/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesSourceUsedByListRaw(requestParameters: StagesSourceUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesSourceUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesSourceUsedByList(requestParameters: StagesSourceUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesSourceUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserDeleteCreate without sending the request + */ + async stagesUserDeleteCreateRequestOpts(requestParameters: StagesUserDeleteCreateRequest): Promise { + if (requestParameters['userDeleteStageRequest'] == null) { + throw new runtime.RequiredError( + 'userDeleteStageRequest', + 'Required parameter "userDeleteStageRequest" was null or undefined when calling stagesUserDeleteCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserDeleteStageRequestToJSON(requestParameters['userDeleteStageRequest']), + }; + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteCreateRaw(requestParameters: StagesUserDeleteCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserDeleteCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserDeleteStageFromJSON(jsonValue)); + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteCreate(requestParameters: StagesUserDeleteCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserDeleteCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserDeleteDestroy without sending the request + */ + async stagesUserDeleteDestroyRequestOpts(requestParameters: StagesUserDeleteDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserDeleteDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteDestroyRaw(requestParameters: StagesUserDeleteDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserDeleteDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteDestroy(requestParameters: StagesUserDeleteDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesUserDeleteDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesUserDeleteList without sending the request + */ + async stagesUserDeleteListRequestOpts(requestParameters: StagesUserDeleteListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteListRaw(requestParameters: StagesUserDeleteListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserDeleteListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserDeleteStageListFromJSON(jsonValue)); + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteList(requestParameters: StagesUserDeleteListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserDeleteListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserDeletePartialUpdate without sending the request + */ + async stagesUserDeletePartialUpdateRequestOpts(requestParameters: StagesUserDeletePartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserDeletePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserDeleteStageRequestToJSON(requestParameters['patchedUserDeleteStageRequest']), + }; + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeletePartialUpdateRaw(requestParameters: StagesUserDeletePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserDeletePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserDeleteStageFromJSON(jsonValue)); + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeletePartialUpdate(requestParameters: StagesUserDeletePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserDeletePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserDeleteRetrieve without sending the request + */ + async stagesUserDeleteRetrieveRequestOpts(requestParameters: StagesUserDeleteRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserDeleteRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteRetrieveRaw(requestParameters: StagesUserDeleteRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserDeleteRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserDeleteStageFromJSON(jsonValue)); + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteRetrieve(requestParameters: StagesUserDeleteRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserDeleteRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserDeleteUpdate without sending the request + */ + async stagesUserDeleteUpdateRequestOpts(requestParameters: StagesUserDeleteUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserDeleteUpdate().' + ); + } + + if (requestParameters['userDeleteStageRequest'] == null) { + throw new runtime.RequiredError( + 'userDeleteStageRequest', + 'Required parameter "userDeleteStageRequest" was null or undefined when calling stagesUserDeleteUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserDeleteStageRequestToJSON(requestParameters['userDeleteStageRequest']), + }; + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteUpdateRaw(requestParameters: StagesUserDeleteUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserDeleteUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserDeleteStageFromJSON(jsonValue)); + } + + /** + * UserDeleteStage Viewset + */ + async stagesUserDeleteUpdate(requestParameters: StagesUserDeleteUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserDeleteUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserDeleteUsedByList without sending the request + */ + async stagesUserDeleteUsedByListRequestOpts(requestParameters: StagesUserDeleteUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserDeleteUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_delete/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserDeleteUsedByListRaw(requestParameters: StagesUserDeleteUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesUserDeleteUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserDeleteUsedByList(requestParameters: StagesUserDeleteUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesUserDeleteUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLoginCreate without sending the request + */ + async stagesUserLoginCreateRequestOpts(requestParameters: StagesUserLoginCreateRequest): Promise { + if (requestParameters['userLoginStageRequest'] == null) { + throw new runtime.RequiredError( + 'userLoginStageRequest', + 'Required parameter "userLoginStageRequest" was null or undefined when calling stagesUserLoginCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserLoginStageRequestToJSON(requestParameters['userLoginStageRequest']), + }; + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginCreateRaw(requestParameters: StagesUserLoginCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLoginCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLoginStageFromJSON(jsonValue)); + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginCreate(requestParameters: StagesUserLoginCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLoginCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLoginDestroy without sending the request + */ + async stagesUserLoginDestroyRequestOpts(requestParameters: StagesUserLoginDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLoginDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginDestroyRaw(requestParameters: StagesUserLoginDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLoginDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginDestroy(requestParameters: StagesUserLoginDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesUserLoginDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesUserLoginList without sending the request + */ + async stagesUserLoginListRequestOpts(requestParameters: StagesUserLoginListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['geoipBinding'] != null) { + queryParameters['geoip_binding'] = requestParameters['geoipBinding']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['networkBinding'] != null) { + queryParameters['network_binding'] = requestParameters['networkBinding']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['rememberDevice'] != null) { + queryParameters['remember_device'] = requestParameters['rememberDevice']; + } + + if (requestParameters['rememberMeOffset'] != null) { + queryParameters['remember_me_offset'] = requestParameters['rememberMeOffset']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['sessionDuration'] != null) { + queryParameters['session_duration'] = requestParameters['sessionDuration']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['terminateOtherSessions'] != null) { + queryParameters['terminate_other_sessions'] = requestParameters['terminateOtherSessions']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginListRaw(requestParameters: StagesUserLoginListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLoginListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserLoginStageListFromJSON(jsonValue)); + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginList(requestParameters: StagesUserLoginListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLoginListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLoginPartialUpdate without sending the request + */ + async stagesUserLoginPartialUpdateRequestOpts(requestParameters: StagesUserLoginPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLoginPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserLoginStageRequestToJSON(requestParameters['patchedUserLoginStageRequest']), + }; + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginPartialUpdateRaw(requestParameters: StagesUserLoginPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLoginPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLoginStageFromJSON(jsonValue)); + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginPartialUpdate(requestParameters: StagesUserLoginPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLoginPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLoginRetrieve without sending the request + */ + async stagesUserLoginRetrieveRequestOpts(requestParameters: StagesUserLoginRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLoginRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginRetrieveRaw(requestParameters: StagesUserLoginRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLoginRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLoginStageFromJSON(jsonValue)); + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginRetrieve(requestParameters: StagesUserLoginRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLoginRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLoginUpdate without sending the request + */ + async stagesUserLoginUpdateRequestOpts(requestParameters: StagesUserLoginUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLoginUpdate().' + ); + } + + if (requestParameters['userLoginStageRequest'] == null) { + throw new runtime.RequiredError( + 'userLoginStageRequest', + 'Required parameter "userLoginStageRequest" was null or undefined when calling stagesUserLoginUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserLoginStageRequestToJSON(requestParameters['userLoginStageRequest']), + }; + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginUpdateRaw(requestParameters: StagesUserLoginUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLoginUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLoginStageFromJSON(jsonValue)); + } + + /** + * UserLoginStage Viewset + */ + async stagesUserLoginUpdate(requestParameters: StagesUserLoginUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLoginUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLoginUsedByList without sending the request + */ + async stagesUserLoginUsedByListRequestOpts(requestParameters: StagesUserLoginUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLoginUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_login/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserLoginUsedByListRaw(requestParameters: StagesUserLoginUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesUserLoginUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserLoginUsedByList(requestParameters: StagesUserLoginUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesUserLoginUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLogoutCreate without sending the request + */ + async stagesUserLogoutCreateRequestOpts(requestParameters: StagesUserLogoutCreateRequest): Promise { + if (requestParameters['userLogoutStageRequest'] == null) { + throw new runtime.RequiredError( + 'userLogoutStageRequest', + 'Required parameter "userLogoutStageRequest" was null or undefined when calling stagesUserLogoutCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserLogoutStageRequestToJSON(requestParameters['userLogoutStageRequest']), + }; + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutCreateRaw(requestParameters: StagesUserLogoutCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLogoutCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLogoutStageFromJSON(jsonValue)); + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutCreate(requestParameters: StagesUserLogoutCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLogoutCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLogoutDestroy without sending the request + */ + async stagesUserLogoutDestroyRequestOpts(requestParameters: StagesUserLogoutDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLogoutDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutDestroyRaw(requestParameters: StagesUserLogoutDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLogoutDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutDestroy(requestParameters: StagesUserLogoutDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesUserLogoutDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesUserLogoutList without sending the request + */ + async stagesUserLogoutListRequestOpts(requestParameters: StagesUserLogoutListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutListRaw(requestParameters: StagesUserLogoutListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLogoutListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserLogoutStageListFromJSON(jsonValue)); + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutList(requestParameters: StagesUserLogoutListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLogoutListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLogoutPartialUpdate without sending the request + */ + async stagesUserLogoutPartialUpdateRequestOpts(requestParameters: StagesUserLogoutPartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLogoutPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserLogoutStageRequestToJSON(requestParameters['patchedUserLogoutStageRequest']), + }; + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutPartialUpdateRaw(requestParameters: StagesUserLogoutPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLogoutPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLogoutStageFromJSON(jsonValue)); + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutPartialUpdate(requestParameters: StagesUserLogoutPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLogoutPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLogoutRetrieve without sending the request + */ + async stagesUserLogoutRetrieveRequestOpts(requestParameters: StagesUserLogoutRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLogoutRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutRetrieveRaw(requestParameters: StagesUserLogoutRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLogoutRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLogoutStageFromJSON(jsonValue)); + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutRetrieve(requestParameters: StagesUserLogoutRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLogoutRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLogoutUpdate without sending the request + */ + async stagesUserLogoutUpdateRequestOpts(requestParameters: StagesUserLogoutUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLogoutUpdate().' + ); + } + + if (requestParameters['userLogoutStageRequest'] == null) { + throw new runtime.RequiredError( + 'userLogoutStageRequest', + 'Required parameter "userLogoutStageRequest" was null or undefined when calling stagesUserLogoutUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserLogoutStageRequestToJSON(requestParameters['userLogoutStageRequest']), + }; + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutUpdateRaw(requestParameters: StagesUserLogoutUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserLogoutUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserLogoutStageFromJSON(jsonValue)); + } + + /** + * UserLogoutStage Viewset + */ + async stagesUserLogoutUpdate(requestParameters: StagesUserLogoutUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserLogoutUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserLogoutUsedByList without sending the request + */ + async stagesUserLogoutUsedByListRequestOpts(requestParameters: StagesUserLogoutUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserLogoutUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_logout/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserLogoutUsedByListRaw(requestParameters: StagesUserLogoutUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesUserLogoutUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserLogoutUsedByList(requestParameters: StagesUserLogoutUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesUserLogoutUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserWriteCreate without sending the request + */ + async stagesUserWriteCreateRequestOpts(requestParameters: StagesUserWriteCreateRequest): Promise { + if (requestParameters['userWriteStageRequest'] == null) { + throw new runtime.RequiredError( + 'userWriteStageRequest', + 'Required parameter "userWriteStageRequest" was null or undefined when calling stagesUserWriteCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserWriteStageRequestToJSON(requestParameters['userWriteStageRequest']), + }; + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteCreateRaw(requestParameters: StagesUserWriteCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserWriteCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserWriteStageFromJSON(jsonValue)); + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteCreate(requestParameters: StagesUserWriteCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserWriteCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserWriteDestroy without sending the request + */ + async stagesUserWriteDestroyRequestOpts(requestParameters: StagesUserWriteDestroyRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserWriteDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteDestroyRaw(requestParameters: StagesUserWriteDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserWriteDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteDestroy(requestParameters: StagesUserWriteDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stagesUserWriteDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for stagesUserWriteList without sending the request + */ + async stagesUserWriteListRequestOpts(requestParameters: StagesUserWriteListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['createUsersAsInactive'] != null) { + queryParameters['create_users_as_inactive'] = requestParameters['createUsersAsInactive']; + } + + if (requestParameters['createUsersGroup'] != null) { + queryParameters['create_users_group'] = requestParameters['createUsersGroup']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['stageUuid'] != null) { + queryParameters['stage_uuid'] = requestParameters['stageUuid']; + } + + if (requestParameters['userCreationMode'] != null) { + queryParameters['user_creation_mode'] = requestParameters['userCreationMode']; + } + + if (requestParameters['userPathTemplate'] != null) { + queryParameters['user_path_template'] = requestParameters['userPathTemplate']; + } + + if (requestParameters['userType'] != null) { + queryParameters['user_type'] = requestParameters['userType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteListRaw(requestParameters: StagesUserWriteListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserWriteListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserWriteStageListFromJSON(jsonValue)); + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteList(requestParameters: StagesUserWriteListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserWriteListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserWritePartialUpdate without sending the request + */ + async stagesUserWritePartialUpdateRequestOpts(requestParameters: StagesUserWritePartialUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserWritePartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserWriteStageRequestToJSON(requestParameters['patchedUserWriteStageRequest']), + }; + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWritePartialUpdateRaw(requestParameters: StagesUserWritePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserWritePartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserWriteStageFromJSON(jsonValue)); + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWritePartialUpdate(requestParameters: StagesUserWritePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserWritePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserWriteRetrieve without sending the request + */ + async stagesUserWriteRetrieveRequestOpts(requestParameters: StagesUserWriteRetrieveRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserWriteRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteRetrieveRaw(requestParameters: StagesUserWriteRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserWriteRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserWriteStageFromJSON(jsonValue)); + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteRetrieve(requestParameters: StagesUserWriteRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserWriteRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserWriteUpdate without sending the request + */ + async stagesUserWriteUpdateRequestOpts(requestParameters: StagesUserWriteUpdateRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserWriteUpdate().' + ); + } + + if (requestParameters['userWriteStageRequest'] == null) { + throw new runtime.RequiredError( + 'userWriteStageRequest', + 'Required parameter "userWriteStageRequest" was null or undefined when calling stagesUserWriteUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/{stage_uuid}/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserWriteStageRequestToJSON(requestParameters['userWriteStageRequest']), + }; + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteUpdateRaw(requestParameters: StagesUserWriteUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.stagesUserWriteUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserWriteStageFromJSON(jsonValue)); + } + + /** + * UserWriteStage Viewset + */ + async stagesUserWriteUpdate(requestParameters: StagesUserWriteUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.stagesUserWriteUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for stagesUserWriteUsedByList without sending the request + */ + async stagesUserWriteUsedByListRequestOpts(requestParameters: StagesUserWriteUsedByListRequest): Promise { + if (requestParameters['stageUuid'] == null) { + throw new runtime.RequiredError( + 'stageUuid', + 'Required parameter "stageUuid" was null or undefined when calling stagesUserWriteUsedByList().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/stages/user_write/{stage_uuid}/used_by/`; + urlPath = urlPath.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserWriteUsedByListRaw(requestParameters: StagesUserWriteUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.stagesUserWriteUsedByListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON)); + } + + /** + * Get a list of all objects that use this object + */ + async stagesUserWriteUsedByList(requestParameters: StagesUserWriteUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.stagesUserWriteUsedByListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const StagesAuthenticatorSmsListAuthTypeEnum = { + Basic: 'basic', + Bearer: 'bearer', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorSmsListAuthTypeEnum = typeof StagesAuthenticatorSmsListAuthTypeEnum[keyof typeof StagesAuthenticatorSmsListAuthTypeEnum]; +/** + * @export + */ +export const StagesAuthenticatorSmsListProviderEnum = { + Generic: 'generic', + Twilio: 'twilio', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorSmsListProviderEnum = typeof StagesAuthenticatorSmsListProviderEnum[keyof typeof StagesAuthenticatorSmsListProviderEnum]; +/** + * @export + */ +export const StagesAuthenticatorTotpListDigitsEnum = { + _6: '6', + _8: '8', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorTotpListDigitsEnum = typeof StagesAuthenticatorTotpListDigitsEnum[keyof typeof StagesAuthenticatorTotpListDigitsEnum]; +/** + * @export + */ +export const StagesAuthenticatorValidateListNotConfiguredActionEnum = { + Configure: 'configure', + Deny: 'deny', + Skip: 'skip', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorValidateListNotConfiguredActionEnum = typeof StagesAuthenticatorValidateListNotConfiguredActionEnum[keyof typeof StagesAuthenticatorValidateListNotConfiguredActionEnum]; +/** + * @export + */ +export const StagesAuthenticatorWebauthnListAuthenticatorAttachmentEnum = { + CrossPlatform: 'cross-platform', + Platform: 'platform', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorWebauthnListAuthenticatorAttachmentEnum = typeof StagesAuthenticatorWebauthnListAuthenticatorAttachmentEnum[keyof typeof StagesAuthenticatorWebauthnListAuthenticatorAttachmentEnum]; +/** + * @export + */ +export const StagesAuthenticatorWebauthnListResidentKeyRequirementEnum = { + Discouraged: 'discouraged', + Preferred: 'preferred', + Required: 'required', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorWebauthnListResidentKeyRequirementEnum = typeof StagesAuthenticatorWebauthnListResidentKeyRequirementEnum[keyof typeof StagesAuthenticatorWebauthnListResidentKeyRequirementEnum]; +/** + * @export + */ +export const StagesAuthenticatorWebauthnListUserVerificationEnum = { + Discouraged: 'discouraged', + Preferred: 'preferred', + Required: 'required', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesAuthenticatorWebauthnListUserVerificationEnum = typeof StagesAuthenticatorWebauthnListUserVerificationEnum[keyof typeof StagesAuthenticatorWebauthnListUserVerificationEnum]; +/** + * @export + */ +export const StagesConsentListModeEnum = { + AlwaysRequire: 'always_require', + Expiring: 'expiring', + Permanent: 'permanent', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesConsentListModeEnum = typeof StagesConsentListModeEnum[keyof typeof StagesConsentListModeEnum]; +/** + * @export + */ +export const StagesMtlsListCertAttributeEnum = { + CommonName: 'common_name', + Email: 'email', + Subject: 'subject', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesMtlsListCertAttributeEnum = typeof StagesMtlsListCertAttributeEnum[keyof typeof StagesMtlsListCertAttributeEnum]; +/** + * @export + */ +export const StagesMtlsListModeEnum = { + Optional: 'optional', + Required: 'required', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesMtlsListModeEnum = typeof StagesMtlsListModeEnum[keyof typeof StagesMtlsListModeEnum]; +/** + * @export + */ +export const StagesMtlsListUserAttributeEnum = { + Email: 'email', + Username: 'username', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesMtlsListUserAttributeEnum = typeof StagesMtlsListUserAttributeEnum[keyof typeof StagesMtlsListUserAttributeEnum]; +/** + * @export + */ +export const StagesPromptPromptsListTypeEnum = { + AkLocale: 'ak-locale', + Checkbox: 'checkbox', + Date: 'date', + DateTime: 'date-time', + Dropdown: 'dropdown', + Email: 'email', + File: 'file', + Hidden: 'hidden', + Number: 'number', + Password: 'password', + RadioButtonGroup: 'radio-button-group', + Separator: 'separator', + Static: 'static', + Text: 'text', + TextArea: 'text_area', + TextAreaReadOnly: 'text_area_read_only', + TextReadOnly: 'text_read_only', + Username: 'username', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesPromptPromptsListTypeEnum = typeof StagesPromptPromptsListTypeEnum[keyof typeof StagesPromptPromptsListTypeEnum]; +/** + * @export + */ +export const StagesUserLoginListGeoipBindingEnum = { + BindContinent: 'bind_continent', + BindContinentCountry: 'bind_continent_country', + BindContinentCountryCity: 'bind_continent_country_city', + NoBinding: 'no_binding', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesUserLoginListGeoipBindingEnum = typeof StagesUserLoginListGeoipBindingEnum[keyof typeof StagesUserLoginListGeoipBindingEnum]; +/** + * @export + */ +export const StagesUserLoginListNetworkBindingEnum = { + BindAsn: 'bind_asn', + BindAsnNetwork: 'bind_asn_network', + BindAsnNetworkIp: 'bind_asn_network_ip', + NoBinding: 'no_binding', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesUserLoginListNetworkBindingEnum = typeof StagesUserLoginListNetworkBindingEnum[keyof typeof StagesUserLoginListNetworkBindingEnum]; +/** + * @export + */ +export const StagesUserWriteListUserCreationModeEnum = { + AlwaysCreate: 'always_create', + CreateWhenRequired: 'create_when_required', + NeverCreate: 'never_create', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesUserWriteListUserCreationModeEnum = typeof StagesUserWriteListUserCreationModeEnum[keyof typeof StagesUserWriteListUserCreationModeEnum]; +/** + * @export + */ +export const StagesUserWriteListUserTypeEnum = { + External: 'external', + Internal: 'internal', + InternalServiceAccount: 'internal_service_account', + ServiceAccount: 'service_account', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StagesUserWriteListUserTypeEnum = typeof StagesUserWriteListUserTypeEnum[keyof typeof StagesUserWriteListUserTypeEnum]; diff --git a/packages/client-ts/src/apis/TasksApi.ts b/packages/client-ts/src/apis/TasksApi.ts new file mode 100644 index 0000000000..4981463af4 --- /dev/null +++ b/packages/client-ts/src/apis/TasksApi.ts @@ -0,0 +1,728 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + GenericError, + GlobalTaskStatus, + PaginatedScheduleList, + PaginatedTaskList, + PatchedScheduleRequest, + Schedule, + ScheduleRequest, + Task, + ValidationError, + Worker, +} from '../models/index'; +import { + GenericErrorFromJSON, + GenericErrorToJSON, + GlobalTaskStatusFromJSON, + GlobalTaskStatusToJSON, + PaginatedScheduleListFromJSON, + PaginatedScheduleListToJSON, + PaginatedTaskListFromJSON, + PaginatedTaskListToJSON, + PatchedScheduleRequestFromJSON, + PatchedScheduleRequestToJSON, + ScheduleFromJSON, + ScheduleToJSON, + ScheduleRequestFromJSON, + ScheduleRequestToJSON, + TaskFromJSON, + TaskToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, + WorkerFromJSON, + WorkerToJSON, +} from '../models/index'; + +export interface TasksSchedulesListRequest { + actorName?: string; + ordering?: string; + page?: number; + pageSize?: number; + paused?: boolean; + relObjContentTypeAppLabel?: string; + relObjContentTypeModel?: string; + relObjId?: string; + relObjIdIsnull?: boolean; + search?: string; +} + +export interface TasksSchedulesPartialUpdateRequest { + id: string; + patchedScheduleRequest?: PatchedScheduleRequest; +} + +export interface TasksSchedulesRetrieveRequest { + id: string; +} + +export interface TasksSchedulesSendCreateRequest { + id: string; +} + +export interface TasksSchedulesUpdateRequest { + id: string; + scheduleRequest: ScheduleRequest; +} + +export interface TasksTasksListRequest { + actorName?: string; + aggregatedStatus?: Array; + ordering?: string; + page?: number; + pageSize?: number; + queueName?: string; + relObjContentTypeAppLabel?: string; + relObjContentTypeModel?: string; + relObjId?: string; + relObjIdIsnull?: boolean; + search?: string; + state?: TasksTasksListStateEnum; +} + +export interface TasksTasksRetrieveRequest { + messageId: string; +} + +export interface TasksTasksRetryCreateRequest { + messageId: string; +} + +/** + * + */ +export class TasksApi extends runtime.BaseAPI { + + /** + * Creates request options for tasksSchedulesList without sending the request + */ + async tasksSchedulesListRequestOpts(requestParameters: TasksSchedulesListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['actorName'] != null) { + queryParameters['actor_name'] = requestParameters['actorName']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['paused'] != null) { + queryParameters['paused'] = requestParameters['paused']; + } + + if (requestParameters['relObjContentTypeAppLabel'] != null) { + queryParameters['rel_obj_content_type__app_label'] = requestParameters['relObjContentTypeAppLabel']; + } + + if (requestParameters['relObjContentTypeModel'] != null) { + queryParameters['rel_obj_content_type__model'] = requestParameters['relObjContentTypeModel']; + } + + if (requestParameters['relObjId'] != null) { + queryParameters['rel_obj_id'] = requestParameters['relObjId']; + } + + if (requestParameters['relObjIdIsnull'] != null) { + queryParameters['rel_obj_id__isnull'] = requestParameters['relObjIdIsnull']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/schedules/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async tasksSchedulesListRaw(requestParameters: TasksSchedulesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksSchedulesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedScheduleListFromJSON(jsonValue)); + } + + /** + */ + async tasksSchedulesList(requestParameters: TasksSchedulesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksSchedulesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksSchedulesPartialUpdate without sending the request + */ + async tasksSchedulesPartialUpdateRequestOpts(requestParameters: TasksSchedulesPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tasksSchedulesPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/schedules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedScheduleRequestToJSON(requestParameters['patchedScheduleRequest']), + }; + } + + /** + */ + async tasksSchedulesPartialUpdateRaw(requestParameters: TasksSchedulesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksSchedulesPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScheduleFromJSON(jsonValue)); + } + + /** + */ + async tasksSchedulesPartialUpdate(requestParameters: TasksSchedulesPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksSchedulesPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksSchedulesRetrieve without sending the request + */ + async tasksSchedulesRetrieveRequestOpts(requestParameters: TasksSchedulesRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tasksSchedulesRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/schedules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async tasksSchedulesRetrieveRaw(requestParameters: TasksSchedulesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksSchedulesRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScheduleFromJSON(jsonValue)); + } + + /** + */ + async tasksSchedulesRetrieve(requestParameters: TasksSchedulesRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksSchedulesRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksSchedulesSendCreate without sending the request + */ + async tasksSchedulesSendCreateRequestOpts(requestParameters: TasksSchedulesSendCreateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tasksSchedulesSendCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/schedules/{id}/send/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Trigger this schedule now + */ + async tasksSchedulesSendCreateRaw(requestParameters: TasksSchedulesSendCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksSchedulesSendCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Trigger this schedule now + */ + async tasksSchedulesSendCreate(requestParameters: TasksSchedulesSendCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.tasksSchedulesSendCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for tasksSchedulesUpdate without sending the request + */ + async tasksSchedulesUpdateRequestOpts(requestParameters: TasksSchedulesUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tasksSchedulesUpdate().' + ); + } + + if (requestParameters['scheduleRequest'] == null) { + throw new runtime.RequiredError( + 'scheduleRequest', + 'Required parameter "scheduleRequest" was null or undefined when calling tasksSchedulesUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/schedules/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ScheduleRequestToJSON(requestParameters['scheduleRequest']), + }; + } + + /** + */ + async tasksSchedulesUpdateRaw(requestParameters: TasksSchedulesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksSchedulesUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScheduleFromJSON(jsonValue)); + } + + /** + */ + async tasksSchedulesUpdate(requestParameters: TasksSchedulesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksSchedulesUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksTasksList without sending the request + */ + async tasksTasksListRequestOpts(requestParameters: TasksTasksListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['actorName'] != null) { + queryParameters['actor_name'] = requestParameters['actorName']; + } + + if (requestParameters['aggregatedStatus'] != null) { + queryParameters['aggregated_status'] = requestParameters['aggregatedStatus']; + } + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['queueName'] != null) { + queryParameters['queue_name'] = requestParameters['queueName']; + } + + if (requestParameters['relObjContentTypeAppLabel'] != null) { + queryParameters['rel_obj_content_type__app_label'] = requestParameters['relObjContentTypeAppLabel']; + } + + if (requestParameters['relObjContentTypeModel'] != null) { + queryParameters['rel_obj_content_type__model'] = requestParameters['relObjContentTypeModel']; + } + + if (requestParameters['relObjId'] != null) { + queryParameters['rel_obj_id'] = requestParameters['relObjId']; + } + + if (requestParameters['relObjIdIsnull'] != null) { + queryParameters['rel_obj_id__isnull'] = requestParameters['relObjIdIsnull']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['state'] != null) { + queryParameters['state'] = requestParameters['state']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/tasks/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async tasksTasksListRaw(requestParameters: TasksTasksListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksTasksListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTaskListFromJSON(jsonValue)); + } + + /** + */ + async tasksTasksList(requestParameters: TasksTasksListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksTasksListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksTasksRetrieve without sending the request + */ + async tasksTasksRetrieveRequestOpts(requestParameters: TasksTasksRetrieveRequest): Promise { + if (requestParameters['messageId'] == null) { + throw new runtime.RequiredError( + 'messageId', + 'Required parameter "messageId" was null or undefined when calling tasksTasksRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/tasks/{message_id}/`; + urlPath = urlPath.replace(`{${"message_id"}}`, encodeURIComponent(String(requestParameters['messageId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + */ + async tasksTasksRetrieveRaw(requestParameters: TasksTasksRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksTasksRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TaskFromJSON(jsonValue)); + } + + /** + */ + async tasksTasksRetrieve(requestParameters: TasksTasksRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksTasksRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksTasksRetryCreate without sending the request + */ + async tasksTasksRetryCreateRequestOpts(requestParameters: TasksTasksRetryCreateRequest): Promise { + if (requestParameters['messageId'] == null) { + throw new runtime.RequiredError( + 'messageId', + 'Required parameter "messageId" was null or undefined when calling tasksTasksRetryCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/tasks/{message_id}/retry/`; + urlPath = urlPath.replace(`{${"message_id"}}`, encodeURIComponent(String(requestParameters['messageId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Retry task + */ + async tasksTasksRetryCreateRaw(requestParameters: TasksTasksRetryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksTasksRetryCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Retry task + */ + async tasksTasksRetryCreate(requestParameters: TasksTasksRetryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.tasksTasksRetryCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for tasksTasksStatusRetrieve without sending the request + */ + async tasksTasksStatusRetrieveRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/tasks/status/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Global status summary for all tasks + */ + async tasksTasksStatusRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tasksTasksStatusRetrieveRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GlobalTaskStatusFromJSON(jsonValue)); + } + + /** + * Global status summary for all tasks + */ + async tasksTasksStatusRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tasksTasksStatusRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Creates request options for tasksWorkersList without sending the request + */ + async tasksWorkersListRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("authentik", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/tasks/workers/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Get currently connected worker count. + */ + async tasksWorkersListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const requestOptions = await this.tasksWorkersListRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(WorkerFromJSON)); + } + + /** + * Get currently connected worker count. + */ + async tasksWorkersList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.tasksWorkersListRaw(initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const TasksTasksListAggregatedStatusEnum = { + Consumed: 'consumed', + Done: 'done', + Error: 'error', + Info: 'info', + Postprocess: 'postprocess', + Preprocess: 'preprocess', + Queued: 'queued', + Rejected: 'rejected', + Running: 'running', + Warning: 'warning', + UnknownDefaultOpenApi: '11184809' +} as const; +export type TasksTasksListAggregatedStatusEnum = typeof TasksTasksListAggregatedStatusEnum[keyof typeof TasksTasksListAggregatedStatusEnum]; +/** + * @export + */ +export const TasksTasksListStateEnum = { + Consumed: 'consumed', + Done: 'done', + Postprocess: 'postprocess', + Preprocess: 'preprocess', + Queued: 'queued', + Rejected: 'rejected', + Running: 'running', + UnknownDefaultOpenApi: '11184809' +} as const; +export type TasksTasksListStateEnum = typeof TasksTasksListStateEnum[keyof typeof TasksTasksListStateEnum]; diff --git a/packages/client-ts/src/apis/TenantsApi.ts b/packages/client-ts/src/apis/TenantsApi.ts new file mode 100644 index 0000000000..ef828f875a --- /dev/null +++ b/packages/client-ts/src/apis/TenantsApi.ts @@ -0,0 +1,827 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Domain, + DomainRequest, + GenericError, + PaginatedDomainList, + PaginatedTenantList, + PatchedDomainRequest, + PatchedTenantRequest, + Tenant, + TenantAdminGroupRequestRequest, + TenantRecoveryKeyRequestRequest, + TenantRecoveryKeyResponse, + TenantRequest, + ValidationError, +} from '../models/index'; +import { + DomainFromJSON, + DomainToJSON, + DomainRequestFromJSON, + DomainRequestToJSON, + GenericErrorFromJSON, + GenericErrorToJSON, + PaginatedDomainListFromJSON, + PaginatedDomainListToJSON, + PaginatedTenantListFromJSON, + PaginatedTenantListToJSON, + PatchedDomainRequestFromJSON, + PatchedDomainRequestToJSON, + PatchedTenantRequestFromJSON, + PatchedTenantRequestToJSON, + TenantFromJSON, + TenantToJSON, + TenantAdminGroupRequestRequestFromJSON, + TenantAdminGroupRequestRequestToJSON, + TenantRecoveryKeyRequestRequestFromJSON, + TenantRecoveryKeyRequestRequestToJSON, + TenantRecoveryKeyResponseFromJSON, + TenantRecoveryKeyResponseToJSON, + TenantRequestFromJSON, + TenantRequestToJSON, + ValidationErrorFromJSON, + ValidationErrorToJSON, +} from '../models/index'; + +export interface TenantsDomainsCreateRequest { + domainRequest: DomainRequest; +} + +export interface TenantsDomainsDestroyRequest { + id: number; +} + +export interface TenantsDomainsListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface TenantsDomainsPartialUpdateRequest { + id: number; + patchedDomainRequest?: PatchedDomainRequest; +} + +export interface TenantsDomainsRetrieveRequest { + id: number; +} + +export interface TenantsDomainsUpdateRequest { + id: number; + domainRequest: DomainRequest; +} + +export interface TenantsTenantsCreateRequest { + tenantRequest: TenantRequest; +} + +export interface TenantsTenantsCreateAdminGroupCreateRequest { + tenantUuid: string; + tenantAdminGroupRequestRequest: TenantAdminGroupRequestRequest; +} + +export interface TenantsTenantsCreateRecoveryKeyCreateRequest { + tenantUuid: string; + tenantRecoveryKeyRequestRequest: TenantRecoveryKeyRequestRequest; +} + +export interface TenantsTenantsDestroyRequest { + tenantUuid: string; +} + +export interface TenantsTenantsListRequest { + ordering?: string; + page?: number; + pageSize?: number; + search?: string; +} + +export interface TenantsTenantsPartialUpdateRequest { + tenantUuid: string; + patchedTenantRequest?: PatchedTenantRequest; +} + +export interface TenantsTenantsRetrieveRequest { + tenantUuid: string; +} + +export interface TenantsTenantsUpdateRequest { + tenantUuid: string; + tenantRequest: TenantRequest; +} + +/** + * + */ +export class TenantsApi extends runtime.BaseAPI { + + /** + * Creates request options for tenantsDomainsCreate without sending the request + */ + async tenantsDomainsCreateRequestOpts(requestParameters: TenantsDomainsCreateRequest): Promise { + if (requestParameters['domainRequest'] == null) { + throw new runtime.RequiredError( + 'domainRequest', + 'Required parameter "domainRequest" was null or undefined when calling tenantsDomainsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/domains/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DomainRequestToJSON(requestParameters['domainRequest']), + }; + } + + /** + * Domain ViewSet + */ + async tenantsDomainsCreateRaw(requestParameters: TenantsDomainsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsDomainsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DomainFromJSON(jsonValue)); + } + + /** + * Domain ViewSet + */ + async tenantsDomainsCreate(requestParameters: TenantsDomainsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsDomainsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsDomainsDestroy without sending the request + */ + async tenantsDomainsDestroyRequestOpts(requestParameters: TenantsDomainsDestroyRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tenantsDomainsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/tenants/domains/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Domain ViewSet + */ + async tenantsDomainsDestroyRaw(requestParameters: TenantsDomainsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsDomainsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Domain ViewSet + */ + async tenantsDomainsDestroy(requestParameters: TenantsDomainsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.tenantsDomainsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for tenantsDomainsList without sending the request + */ + async tenantsDomainsListRequestOpts(requestParameters: TenantsDomainsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/tenants/domains/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Domain ViewSet + */ + async tenantsDomainsListRaw(requestParameters: TenantsDomainsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsDomainsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedDomainListFromJSON(jsonValue)); + } + + /** + * Domain ViewSet + */ + async tenantsDomainsList(requestParameters: TenantsDomainsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsDomainsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsDomainsPartialUpdate without sending the request + */ + async tenantsDomainsPartialUpdateRequestOpts(requestParameters: TenantsDomainsPartialUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tenantsDomainsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/domains/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedDomainRequestToJSON(requestParameters['patchedDomainRequest']), + }; + } + + /** + * Domain ViewSet + */ + async tenantsDomainsPartialUpdateRaw(requestParameters: TenantsDomainsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsDomainsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DomainFromJSON(jsonValue)); + } + + /** + * Domain ViewSet + */ + async tenantsDomainsPartialUpdate(requestParameters: TenantsDomainsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsDomainsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsDomainsRetrieve without sending the request + */ + async tenantsDomainsRetrieveRequestOpts(requestParameters: TenantsDomainsRetrieveRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tenantsDomainsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/tenants/domains/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Domain ViewSet + */ + async tenantsDomainsRetrieveRaw(requestParameters: TenantsDomainsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsDomainsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DomainFromJSON(jsonValue)); + } + + /** + * Domain ViewSet + */ + async tenantsDomainsRetrieve(requestParameters: TenantsDomainsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsDomainsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsDomainsUpdate without sending the request + */ + async tenantsDomainsUpdateRequestOpts(requestParameters: TenantsDomainsUpdateRequest): Promise { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling tenantsDomainsUpdate().' + ); + } + + if (requestParameters['domainRequest'] == null) { + throw new runtime.RequiredError( + 'domainRequest', + 'Required parameter "domainRequest" was null or undefined when calling tenantsDomainsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/domains/{id}/`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DomainRequestToJSON(requestParameters['domainRequest']), + }; + } + + /** + * Domain ViewSet + */ + async tenantsDomainsUpdateRaw(requestParameters: TenantsDomainsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsDomainsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DomainFromJSON(jsonValue)); + } + + /** + * Domain ViewSet + */ + async tenantsDomainsUpdate(requestParameters: TenantsDomainsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsDomainsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsTenantsCreate without sending the request + */ + async tenantsTenantsCreateRequestOpts(requestParameters: TenantsTenantsCreateRequest): Promise { + if (requestParameters['tenantRequest'] == null) { + throw new runtime.RequiredError( + 'tenantRequest', + 'Required parameter "tenantRequest" was null or undefined when calling tenantsTenantsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/tenants/`; + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TenantRequestToJSON(requestParameters['tenantRequest']), + }; + } + + /** + * Tenant Viewset + */ + async tenantsTenantsCreateRaw(requestParameters: TenantsTenantsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TenantFromJSON(jsonValue)); + } + + /** + * Tenant Viewset + */ + async tenantsTenantsCreate(requestParameters: TenantsTenantsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsTenantsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsTenantsCreateAdminGroupCreate without sending the request + */ + async tenantsTenantsCreateAdminGroupCreateRequestOpts(requestParameters: TenantsTenantsCreateAdminGroupCreateRequest): Promise { + if (requestParameters['tenantUuid'] == null) { + throw new runtime.RequiredError( + 'tenantUuid', + 'Required parameter "tenantUuid" was null or undefined when calling tenantsTenantsCreateAdminGroupCreate().' + ); + } + + if (requestParameters['tenantAdminGroupRequestRequest'] == null) { + throw new runtime.RequiredError( + 'tenantAdminGroupRequestRequest', + 'Required parameter "tenantAdminGroupRequestRequest" was null or undefined when calling tenantsTenantsCreateAdminGroupCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/tenants/{tenant_uuid}/create_admin_group/`; + urlPath = urlPath.replace(`{${"tenant_uuid"}}`, encodeURIComponent(String(requestParameters['tenantUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TenantAdminGroupRequestRequestToJSON(requestParameters['tenantAdminGroupRequestRequest']), + }; + } + + /** + * Create admin group and add user to it. + */ + async tenantsTenantsCreateAdminGroupCreateRaw(requestParameters: TenantsTenantsCreateAdminGroupCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsCreateAdminGroupCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Create admin group and add user to it. + */ + async tenantsTenantsCreateAdminGroupCreate(requestParameters: TenantsTenantsCreateAdminGroupCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.tenantsTenantsCreateAdminGroupCreateRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for tenantsTenantsCreateRecoveryKeyCreate without sending the request + */ + async tenantsTenantsCreateRecoveryKeyCreateRequestOpts(requestParameters: TenantsTenantsCreateRecoveryKeyCreateRequest): Promise { + if (requestParameters['tenantUuid'] == null) { + throw new runtime.RequiredError( + 'tenantUuid', + 'Required parameter "tenantUuid" was null or undefined when calling tenantsTenantsCreateRecoveryKeyCreate().' + ); + } + + if (requestParameters['tenantRecoveryKeyRequestRequest'] == null) { + throw new runtime.RequiredError( + 'tenantRecoveryKeyRequestRequest', + 'Required parameter "tenantRecoveryKeyRequestRequest" was null or undefined when calling tenantsTenantsCreateRecoveryKeyCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/tenants/{tenant_uuid}/create_recovery_key/`; + urlPath = urlPath.replace(`{${"tenant_uuid"}}`, encodeURIComponent(String(requestParameters['tenantUuid']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TenantRecoveryKeyRequestRequestToJSON(requestParameters['tenantRecoveryKeyRequestRequest']), + }; + } + + /** + * Create recovery key for user. + */ + async tenantsTenantsCreateRecoveryKeyCreateRaw(requestParameters: TenantsTenantsCreateRecoveryKeyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsCreateRecoveryKeyCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TenantRecoveryKeyResponseFromJSON(jsonValue)); + } + + /** + * Create recovery key for user. + */ + async tenantsTenantsCreateRecoveryKeyCreate(requestParameters: TenantsTenantsCreateRecoveryKeyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsTenantsCreateRecoveryKeyCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsTenantsDestroy without sending the request + */ + async tenantsTenantsDestroyRequestOpts(requestParameters: TenantsTenantsDestroyRequest): Promise { + if (requestParameters['tenantUuid'] == null) { + throw new runtime.RequiredError( + 'tenantUuid', + 'Required parameter "tenantUuid" was null or undefined when calling tenantsTenantsDestroy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/tenants/tenants/{tenant_uuid}/`; + urlPath = urlPath.replace(`{${"tenant_uuid"}}`, encodeURIComponent(String(requestParameters['tenantUuid']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Tenant Viewset + */ + async tenantsTenantsDestroyRaw(requestParameters: TenantsTenantsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsDestroyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Tenant Viewset + */ + async tenantsTenantsDestroy(requestParameters: TenantsTenantsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.tenantsTenantsDestroyRaw(requestParameters, initOverrides); + } + + /** + * Creates request options for tenantsTenantsList without sending the request + */ + async tenantsTenantsListRequestOpts(requestParameters: TenantsTenantsListRequest): Promise { + const queryParameters: any = {}; + + if (requestParameters['ordering'] != null) { + queryParameters['ordering'] = requestParameters['ordering']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/tenants/tenants/`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Tenant Viewset + */ + async tenantsTenantsListRaw(requestParameters: TenantsTenantsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTenantListFromJSON(jsonValue)); + } + + /** + * Tenant Viewset + */ + async tenantsTenantsList(requestParameters: TenantsTenantsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsTenantsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsTenantsPartialUpdate without sending the request + */ + async tenantsTenantsPartialUpdateRequestOpts(requestParameters: TenantsTenantsPartialUpdateRequest): Promise { + if (requestParameters['tenantUuid'] == null) { + throw new runtime.RequiredError( + 'tenantUuid', + 'Required parameter "tenantUuid" was null or undefined when calling tenantsTenantsPartialUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/tenants/{tenant_uuid}/`; + urlPath = urlPath.replace(`{${"tenant_uuid"}}`, encodeURIComponent(String(requestParameters['tenantUuid']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTenantRequestToJSON(requestParameters['patchedTenantRequest']), + }; + } + + /** + * Tenant Viewset + */ + async tenantsTenantsPartialUpdateRaw(requestParameters: TenantsTenantsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsPartialUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TenantFromJSON(jsonValue)); + } + + /** + * Tenant Viewset + */ + async tenantsTenantsPartialUpdate(requestParameters: TenantsTenantsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsTenantsPartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsTenantsRetrieve without sending the request + */ + async tenantsTenantsRetrieveRequestOpts(requestParameters: TenantsTenantsRetrieveRequest): Promise { + if (requestParameters['tenantUuid'] == null) { + throw new runtime.RequiredError( + 'tenantUuid', + 'Required parameter "tenantUuid" was null or undefined when calling tenantsTenantsRetrieve().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/tenants/tenants/{tenant_uuid}/`; + urlPath = urlPath.replace(`{${"tenant_uuid"}}`, encodeURIComponent(String(requestParameters['tenantUuid']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Tenant Viewset + */ + async tenantsTenantsRetrieveRaw(requestParameters: TenantsTenantsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsRetrieveRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TenantFromJSON(jsonValue)); + } + + /** + * Tenant Viewset + */ + async tenantsTenantsRetrieve(requestParameters: TenantsTenantsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsTenantsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for tenantsTenantsUpdate without sending the request + */ + async tenantsTenantsUpdateRequestOpts(requestParameters: TenantsTenantsUpdateRequest): Promise { + if (requestParameters['tenantUuid'] == null) { + throw new runtime.RequiredError( + 'tenantUuid', + 'Required parameter "tenantUuid" was null or undefined when calling tenantsTenantsUpdate().' + ); + } + + if (requestParameters['tenantRequest'] == null) { + throw new runtime.RequiredError( + 'tenantRequest', + 'Required parameter "tenantRequest" was null or undefined when calling tenantsTenantsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/tenants/tenants/{tenant_uuid}/`; + urlPath = urlPath.replace(`{${"tenant_uuid"}}`, encodeURIComponent(String(requestParameters['tenantUuid']))); + + return { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TenantRequestToJSON(requestParameters['tenantRequest']), + }; + } + + /** + * Tenant Viewset + */ + async tenantsTenantsUpdateRaw(requestParameters: TenantsTenantsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.tenantsTenantsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TenantFromJSON(jsonValue)); + } + + /** + * Tenant Viewset + */ + async tenantsTenantsUpdate(requestParameters: TenantsTenantsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tenantsTenantsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/client-ts/src/apis/index.ts b/packages/client-ts/src/apis/index.ts new file mode 100644 index 0000000000..d350d7c359 --- /dev/null +++ b/packages/client-ts/src/apis/index.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AdminApi'; +export * from './AuthenticatorsApi'; +export * from './CoreApi'; +export * from './CryptoApi'; +export * from './EndpointsApi'; +export * from './EnterpriseApi'; +export * from './EventsApi'; +export * from './FlowsApi'; +export * from './LifecycleApi'; +export * from './ManagedApi'; +export * from './Oauth2Api'; +export * from './OutpostsApi'; +export * from './PoliciesApi'; +export * from './PropertymappingsApi'; +export * from './ProvidersApi'; +export * from './RacApi'; +export * from './RbacApi'; +export * from './ReportsApi'; +export * from './RootApi'; +export * from './SchemaApi'; +export * from './SourcesApi'; +export * from './SsfApi'; +export * from './StagesApi'; +export * from './TasksApi'; +export * from './TenantsApi'; diff --git a/packages/client-ts/src/index.ts b/packages/client-ts/src/index.ts new file mode 100644 index 0000000000..bebe8bbbe2 --- /dev/null +++ b/packages/client-ts/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/packages/client-ts/src/models/AccessDeniedChallenge.ts b/packages/client-ts/src/models/AccessDeniedChallenge.ts new file mode 100644 index 0000000000..d805d73ead --- /dev/null +++ b/packages/client-ts/src/models/AccessDeniedChallenge.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge when a flow's active stage calls `stage_invalid()`. + * @export + * @interface AccessDeniedChallenge + */ +export interface AccessDeniedChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AccessDeniedChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AccessDeniedChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AccessDeniedChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AccessDeniedChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AccessDeniedChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof AccessDeniedChallenge + */ + errorMessage?: string; +} + +/** + * Check if a given object implements the AccessDeniedChallenge interface. + */ +export function instanceOfAccessDeniedChallenge(value: object): value is AccessDeniedChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + return true; +} + +export function AccessDeniedChallengeFromJSON(json: any): AccessDeniedChallenge { + return AccessDeniedChallengeFromJSONTyped(json, false); +} + +export function AccessDeniedChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessDeniedChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'errorMessage': json['error_message'] == null ? undefined : json['error_message'], + }; +} + +export function AccessDeniedChallengeToJSON(json: any): AccessDeniedChallenge { + return AccessDeniedChallengeToJSONTyped(json, false); +} + +export function AccessDeniedChallengeToJSONTyped(value?: AccessDeniedChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'error_message': value['errorMessage'], + }; +} + diff --git a/packages/client-ts/src/models/AgentAuthenticationResponse.ts b/packages/client-ts/src/models/AgentAuthenticationResponse.ts new file mode 100644 index 0000000000..34b00fb408 --- /dev/null +++ b/packages/client-ts/src/models/AgentAuthenticationResponse.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface AgentAuthenticationResponse + */ +export interface AgentAuthenticationResponse { + /** + * + * @type {string} + * @memberof AgentAuthenticationResponse + */ + url: string; +} + +/** + * Check if a given object implements the AgentAuthenticationResponse interface. + */ +export function instanceOfAgentAuthenticationResponse(value: object): value is AgentAuthenticationResponse { + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function AgentAuthenticationResponseFromJSON(json: any): AgentAuthenticationResponse { + return AgentAuthenticationResponseFromJSONTyped(json, false); +} + +export function AgentAuthenticationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentAuthenticationResponse { + if (json == null) { + return json; + } + return { + + 'url': json['url'], + }; +} + +export function AgentAuthenticationResponseToJSON(json: any): AgentAuthenticationResponse { + return AgentAuthenticationResponseToJSONTyped(json, false); +} + +export function AgentAuthenticationResponseToJSONTyped(value?: AgentAuthenticationResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'url': value['url'], + }; +} + diff --git a/packages/client-ts/src/models/AgentConfig.ts b/packages/client-ts/src/models/AgentConfig.ts new file mode 100644 index 0000000000..e8b87baa79 --- /dev/null +++ b/packages/client-ts/src/models/AgentConfig.ts @@ -0,0 +1,157 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LicenseStatusEnum } from './LicenseStatusEnum'; +import { + LicenseStatusEnumFromJSON, + LicenseStatusEnumFromJSONTyped, + LicenseStatusEnumToJSON, + LicenseStatusEnumToJSONTyped, +} from './LicenseStatusEnum'; +import type { Config } from './Config'; +import { + ConfigFromJSON, + ConfigFromJSONTyped, + ConfigToJSON, + ConfigToJSONTyped, +} from './Config'; + +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface AgentConfig + */ +export interface AgentConfig { + /** + * + * @type {string} + * @memberof AgentConfig + */ + readonly deviceId: string; + /** + * + * @type {number} + * @memberof AgentConfig + */ + readonly refreshInterval: number; + /** + * + * @type {string} + * @memberof AgentConfig + */ + readonly authorizationFlow: string | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AgentConfig + */ + readonly jwksAuth: { [key: string]: any; }; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AgentConfig + */ + readonly jwksChallenge: { [key: string]: any; } | null; + /** + * + * @type {number} + * @memberof AgentConfig + */ + nssUidOffset: number; + /** + * + * @type {number} + * @memberof AgentConfig + */ + nssGidOffset: number; + /** + * + * @type {boolean} + * @memberof AgentConfig + */ + authTerminateSessionOnExpiry: boolean; + /** + * + * @type {Config} + * @memberof AgentConfig + */ + readonly systemConfig: Config; + /** + * + * @type {LicenseStatusEnum} + * @memberof AgentConfig + */ + readonly licenseStatus: LicenseStatusEnum | null; +} + + + +/** + * Check if a given object implements the AgentConfig interface. + */ +export function instanceOfAgentConfig(value: object): value is AgentConfig { + if (!('deviceId' in value) || value['deviceId'] === undefined) return false; + if (!('refreshInterval' in value) || value['refreshInterval'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('jwksAuth' in value) || value['jwksAuth'] === undefined) return false; + if (!('jwksChallenge' in value) || value['jwksChallenge'] === undefined) return false; + if (!('nssUidOffset' in value) || value['nssUidOffset'] === undefined) return false; + if (!('nssGidOffset' in value) || value['nssGidOffset'] === undefined) return false; + if (!('authTerminateSessionOnExpiry' in value) || value['authTerminateSessionOnExpiry'] === undefined) return false; + if (!('systemConfig' in value) || value['systemConfig'] === undefined) return false; + if (!('licenseStatus' in value) || value['licenseStatus'] === undefined) return false; + return true; +} + +export function AgentConfigFromJSON(json: any): AgentConfig { + return AgentConfigFromJSONTyped(json, false); +} + +export function AgentConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentConfig { + if (json == null) { + return json; + } + return { + + 'deviceId': json['device_id'], + 'refreshInterval': json['refresh_interval'], + 'authorizationFlow': json['authorization_flow'], + 'jwksAuth': json['jwks_auth'], + 'jwksChallenge': json['jwks_challenge'], + 'nssUidOffset': json['nss_uid_offset'], + 'nssGidOffset': json['nss_gid_offset'], + 'authTerminateSessionOnExpiry': json['auth_terminate_session_on_expiry'], + 'systemConfig': ConfigFromJSON(json['system_config']), + 'licenseStatus': LicenseStatusEnumFromJSON(json['license_status']), + }; +} + +export function AgentConfigToJSON(json: any): AgentConfig { + return AgentConfigToJSONTyped(json, false); +} + +export function AgentConfigToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'nss_uid_offset': value['nssUidOffset'], + 'nss_gid_offset': value['nssGidOffset'], + 'auth_terminate_session_on_expiry': value['authTerminateSessionOnExpiry'], + }; +} + diff --git a/packages/client-ts/src/models/AgentConnector.ts b/packages/client-ts/src/models/AgentConnector.ts new file mode 100644 index 0000000000..e0aea96ca7 --- /dev/null +++ b/packages/client-ts/src/models/AgentConnector.ts @@ -0,0 +1,202 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AgentConnector + */ +export interface AgentConnector { + /** + * + * @type {string} + * @memberof AgentConnector + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof AgentConnector + */ + name: string; + /** + * + * @type {boolean} + * @memberof AgentConnector + */ + enabled?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof AgentConnector + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AgentConnector + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AgentConnector + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AgentConnector + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof AgentConnector + */ + snapshotExpiry?: string; + /** + * + * @type {string} + * @memberof AgentConnector + */ + authSessionDuration?: string; + /** + * + * @type {boolean} + * @memberof AgentConnector + */ + authTerminateSessionOnExpiry?: boolean; + /** + * + * @type {string} + * @memberof AgentConnector + */ + refreshInterval?: string; + /** + * + * @type {string} + * @memberof AgentConnector + */ + authorizationFlow?: string | null; + /** + * + * @type {number} + * @memberof AgentConnector + */ + nssUidOffset?: number; + /** + * + * @type {number} + * @memberof AgentConnector + */ + nssGidOffset?: number; + /** + * + * @type {string} + * @memberof AgentConnector + */ + challengeKey?: string | null; + /** + * + * @type {string} + * @memberof AgentConnector + */ + challengeIdleTimeout?: string; + /** + * + * @type {boolean} + * @memberof AgentConnector + */ + challengeTriggerCheckIn?: boolean; + /** + * + * @type {Array} + * @memberof AgentConnector + */ + jwtFederationProviders?: Array; +} + +/** + * Check if a given object implements the AgentConnector interface. + */ +export function instanceOfAgentConnector(value: object): value is AgentConnector { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function AgentConnectorFromJSON(json: any): AgentConnector { + return AgentConnectorFromJSONTyped(json, false); +} + +export function AgentConnectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentConnector { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'snapshotExpiry': json['snapshot_expiry'] == null ? undefined : json['snapshot_expiry'], + 'authSessionDuration': json['auth_session_duration'] == null ? undefined : json['auth_session_duration'], + 'authTerminateSessionOnExpiry': json['auth_terminate_session_on_expiry'] == null ? undefined : json['auth_terminate_session_on_expiry'], + 'refreshInterval': json['refresh_interval'] == null ? undefined : json['refresh_interval'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'nssUidOffset': json['nss_uid_offset'] == null ? undefined : json['nss_uid_offset'], + 'nssGidOffset': json['nss_gid_offset'] == null ? undefined : json['nss_gid_offset'], + 'challengeKey': json['challenge_key'] == null ? undefined : json['challenge_key'], + 'challengeIdleTimeout': json['challenge_idle_timeout'] == null ? undefined : json['challenge_idle_timeout'], + 'challengeTriggerCheckIn': json['challenge_trigger_check_in'] == null ? undefined : json['challenge_trigger_check_in'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + }; +} + +export function AgentConnectorToJSON(json: any): AgentConnector { + return AgentConnectorToJSONTyped(json, false); +} + +export function AgentConnectorToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'snapshot_expiry': value['snapshotExpiry'], + 'auth_session_duration': value['authSessionDuration'], + 'auth_terminate_session_on_expiry': value['authTerminateSessionOnExpiry'], + 'refresh_interval': value['refreshInterval'], + 'authorization_flow': value['authorizationFlow'], + 'nss_uid_offset': value['nssUidOffset'], + 'nss_gid_offset': value['nssGidOffset'], + 'challenge_key': value['challengeKey'], + 'challenge_idle_timeout': value['challengeIdleTimeout'], + 'challenge_trigger_check_in': value['challengeTriggerCheckIn'], + 'jwt_federation_providers': value['jwtFederationProviders'], + }; +} + diff --git a/packages/client-ts/src/models/AgentConnectorRequest.ts b/packages/client-ts/src/models/AgentConnectorRequest.ts new file mode 100644 index 0000000000..530a900b64 --- /dev/null +++ b/packages/client-ts/src/models/AgentConnectorRequest.ts @@ -0,0 +1,170 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AgentConnectorRequest + */ +export interface AgentConnectorRequest { + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof AgentConnectorRequest + */ + enabled?: boolean; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + snapshotExpiry?: string; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + authSessionDuration?: string; + /** + * + * @type {boolean} + * @memberof AgentConnectorRequest + */ + authTerminateSessionOnExpiry?: boolean; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + refreshInterval?: string; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + authorizationFlow?: string | null; + /** + * + * @type {number} + * @memberof AgentConnectorRequest + */ + nssUidOffset?: number; + /** + * + * @type {number} + * @memberof AgentConnectorRequest + */ + nssGidOffset?: number; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + challengeKey?: string | null; + /** + * + * @type {string} + * @memberof AgentConnectorRequest + */ + challengeIdleTimeout?: string; + /** + * + * @type {boolean} + * @memberof AgentConnectorRequest + */ + challengeTriggerCheckIn?: boolean; + /** + * + * @type {Array} + * @memberof AgentConnectorRequest + */ + jwtFederationProviders?: Array; +} + +/** + * Check if a given object implements the AgentConnectorRequest interface. + */ +export function instanceOfAgentConnectorRequest(value: object): value is AgentConnectorRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function AgentConnectorRequestFromJSON(json: any): AgentConnectorRequest { + return AgentConnectorRequestFromJSONTyped(json, false); +} + +export function AgentConnectorRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentConnectorRequest { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'snapshotExpiry': json['snapshot_expiry'] == null ? undefined : json['snapshot_expiry'], + 'authSessionDuration': json['auth_session_duration'] == null ? undefined : json['auth_session_duration'], + 'authTerminateSessionOnExpiry': json['auth_terminate_session_on_expiry'] == null ? undefined : json['auth_terminate_session_on_expiry'], + 'refreshInterval': json['refresh_interval'] == null ? undefined : json['refresh_interval'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'nssUidOffset': json['nss_uid_offset'] == null ? undefined : json['nss_uid_offset'], + 'nssGidOffset': json['nss_gid_offset'] == null ? undefined : json['nss_gid_offset'], + 'challengeKey': json['challenge_key'] == null ? undefined : json['challenge_key'], + 'challengeIdleTimeout': json['challenge_idle_timeout'] == null ? undefined : json['challenge_idle_timeout'], + 'challengeTriggerCheckIn': json['challenge_trigger_check_in'] == null ? undefined : json['challenge_trigger_check_in'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + }; +} + +export function AgentConnectorRequestToJSON(json: any): AgentConnectorRequest { + return AgentConnectorRequestToJSONTyped(json, false); +} + +export function AgentConnectorRequestToJSONTyped(value?: AgentConnectorRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'snapshot_expiry': value['snapshotExpiry'], + 'auth_session_duration': value['authSessionDuration'], + 'auth_terminate_session_on_expiry': value['authTerminateSessionOnExpiry'], + 'refresh_interval': value['refreshInterval'], + 'authorization_flow': value['authorizationFlow'], + 'nss_uid_offset': value['nssUidOffset'], + 'nss_gid_offset': value['nssGidOffset'], + 'challenge_key': value['challengeKey'], + 'challenge_idle_timeout': value['challengeIdleTimeout'], + 'challenge_trigger_check_in': value['challengeTriggerCheckIn'], + 'jwt_federation_providers': value['jwtFederationProviders'], + }; +} + diff --git a/packages/client-ts/src/models/AgentPSSODeviceRegistrationRequest.ts b/packages/client-ts/src/models/AgentPSSODeviceRegistrationRequest.ts new file mode 100644 index 0000000000..338b0d8d13 --- /dev/null +++ b/packages/client-ts/src/models/AgentPSSODeviceRegistrationRequest.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Register Apple device via Platform SSO + * @export + * @interface AgentPSSODeviceRegistrationRequest + */ +export interface AgentPSSODeviceRegistrationRequest { + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationRequest + */ + deviceSigningKey: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationRequest + */ + deviceEncryptionKey: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationRequest + */ + signKeyId: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationRequest + */ + encKeyId: string; +} + +/** + * Check if a given object implements the AgentPSSODeviceRegistrationRequest interface. + */ +export function instanceOfAgentPSSODeviceRegistrationRequest(value: object): value is AgentPSSODeviceRegistrationRequest { + if (!('deviceSigningKey' in value) || value['deviceSigningKey'] === undefined) return false; + if (!('deviceEncryptionKey' in value) || value['deviceEncryptionKey'] === undefined) return false; + if (!('signKeyId' in value) || value['signKeyId'] === undefined) return false; + if (!('encKeyId' in value) || value['encKeyId'] === undefined) return false; + return true; +} + +export function AgentPSSODeviceRegistrationRequestFromJSON(json: any): AgentPSSODeviceRegistrationRequest { + return AgentPSSODeviceRegistrationRequestFromJSONTyped(json, false); +} + +export function AgentPSSODeviceRegistrationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentPSSODeviceRegistrationRequest { + if (json == null) { + return json; + } + return { + + 'deviceSigningKey': json['device_signing_key'], + 'deviceEncryptionKey': json['device_encryption_key'], + 'signKeyId': json['sign_key_id'], + 'encKeyId': json['enc_key_id'], + }; +} + +export function AgentPSSODeviceRegistrationRequestToJSON(json: any): AgentPSSODeviceRegistrationRequest { + return AgentPSSODeviceRegistrationRequestToJSONTyped(json, false); +} + +export function AgentPSSODeviceRegistrationRequestToJSONTyped(value?: AgentPSSODeviceRegistrationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_signing_key': value['deviceSigningKey'], + 'device_encryption_key': value['deviceEncryptionKey'], + 'sign_key_id': value['signKeyId'], + 'enc_key_id': value['encKeyId'], + }; +} + diff --git a/packages/client-ts/src/models/AgentPSSODeviceRegistrationResponse.ts b/packages/client-ts/src/models/AgentPSSODeviceRegistrationResponse.ts new file mode 100644 index 0000000000..79898b1264 --- /dev/null +++ b/packages/client-ts/src/models/AgentPSSODeviceRegistrationResponse.ts @@ -0,0 +1,111 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * authentik settings for Platform SSO tokens + * @export + * @interface AgentPSSODeviceRegistrationResponse + */ +export interface AgentPSSODeviceRegistrationResponse { + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationResponse + */ + clientId: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationResponse + */ + issuer: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationResponse + */ + tokenEndpoint: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationResponse + */ + jwksEndpoint: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationResponse + */ + audience: string; + /** + * + * @type {string} + * @memberof AgentPSSODeviceRegistrationResponse + */ + nonceEndpoint: string; +} + +/** + * Check if a given object implements the AgentPSSODeviceRegistrationResponse interface. + */ +export function instanceOfAgentPSSODeviceRegistrationResponse(value: object): value is AgentPSSODeviceRegistrationResponse { + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('issuer' in value) || value['issuer'] === undefined) return false; + if (!('tokenEndpoint' in value) || value['tokenEndpoint'] === undefined) return false; + if (!('jwksEndpoint' in value) || value['jwksEndpoint'] === undefined) return false; + if (!('audience' in value) || value['audience'] === undefined) return false; + if (!('nonceEndpoint' in value) || value['nonceEndpoint'] === undefined) return false; + return true; +} + +export function AgentPSSODeviceRegistrationResponseFromJSON(json: any): AgentPSSODeviceRegistrationResponse { + return AgentPSSODeviceRegistrationResponseFromJSONTyped(json, false); +} + +export function AgentPSSODeviceRegistrationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentPSSODeviceRegistrationResponse { + if (json == null) { + return json; + } + return { + + 'clientId': json['client_id'], + 'issuer': json['issuer'], + 'tokenEndpoint': json['token_endpoint'], + 'jwksEndpoint': json['jwks_endpoint'], + 'audience': json['audience'], + 'nonceEndpoint': json['nonce_endpoint'], + }; +} + +export function AgentPSSODeviceRegistrationResponseToJSON(json: any): AgentPSSODeviceRegistrationResponse { + return AgentPSSODeviceRegistrationResponseToJSONTyped(json, false); +} + +export function AgentPSSODeviceRegistrationResponseToJSONTyped(value?: AgentPSSODeviceRegistrationResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'client_id': value['clientId'], + 'issuer': value['issuer'], + 'token_endpoint': value['tokenEndpoint'], + 'jwks_endpoint': value['jwksEndpoint'], + 'audience': value['audience'], + 'nonce_endpoint': value['nonceEndpoint'], + }; +} + diff --git a/packages/client-ts/src/models/AgentPSSOUserRegistrationRequest.ts b/packages/client-ts/src/models/AgentPSSOUserRegistrationRequest.ts new file mode 100644 index 0000000000..16a3d25d35 --- /dev/null +++ b/packages/client-ts/src/models/AgentPSSOUserRegistrationRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Register Apple device user via Platform SSO + * @export + * @interface AgentPSSOUserRegistrationRequest + */ +export interface AgentPSSOUserRegistrationRequest { + /** + * + * @type {string} + * @memberof AgentPSSOUserRegistrationRequest + */ + userAuth: string; + /** + * + * @type {string} + * @memberof AgentPSSOUserRegistrationRequest + */ + userSecureEnclaveKey: string; + /** + * + * @type {string} + * @memberof AgentPSSOUserRegistrationRequest + */ + enclaveKeyId: string; +} + +/** + * Check if a given object implements the AgentPSSOUserRegistrationRequest interface. + */ +export function instanceOfAgentPSSOUserRegistrationRequest(value: object): value is AgentPSSOUserRegistrationRequest { + if (!('userAuth' in value) || value['userAuth'] === undefined) return false; + if (!('userSecureEnclaveKey' in value) || value['userSecureEnclaveKey'] === undefined) return false; + if (!('enclaveKeyId' in value) || value['enclaveKeyId'] === undefined) return false; + return true; +} + +export function AgentPSSOUserRegistrationRequestFromJSON(json: any): AgentPSSOUserRegistrationRequest { + return AgentPSSOUserRegistrationRequestFromJSONTyped(json, false); +} + +export function AgentPSSOUserRegistrationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentPSSOUserRegistrationRequest { + if (json == null) { + return json; + } + return { + + 'userAuth': json['user_auth'], + 'userSecureEnclaveKey': json['user_secure_enclave_key'], + 'enclaveKeyId': json['enclave_key_id'], + }; +} + +export function AgentPSSOUserRegistrationRequestToJSON(json: any): AgentPSSOUserRegistrationRequest { + return AgentPSSOUserRegistrationRequestToJSONTyped(json, false); +} + +export function AgentPSSOUserRegistrationRequestToJSONTyped(value?: AgentPSSOUserRegistrationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user_auth': value['userAuth'], + 'user_secure_enclave_key': value['userSecureEnclaveKey'], + 'enclave_key_id': value['enclaveKeyId'], + }; +} + diff --git a/packages/client-ts/src/models/AgentTokenResponse.ts b/packages/client-ts/src/models/AgentTokenResponse.ts new file mode 100644 index 0000000000..9a0c6e15ba --- /dev/null +++ b/packages/client-ts/src/models/AgentTokenResponse.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface AgentTokenResponse + */ +export interface AgentTokenResponse { + /** + * + * @type {string} + * @memberof AgentTokenResponse + */ + token: string; + /** + * + * @type {number} + * @memberof AgentTokenResponse + */ + expiresIn?: number; +} + +/** + * Check if a given object implements the AgentTokenResponse interface. + */ +export function instanceOfAgentTokenResponse(value: object): value is AgentTokenResponse { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function AgentTokenResponseFromJSON(json: any): AgentTokenResponse { + return AgentTokenResponseFromJSONTyped(json, false); +} + +export function AgentTokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTokenResponse { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + 'expiresIn': json['expires_in'] == null ? undefined : json['expires_in'], + }; +} + +export function AgentTokenResponseToJSON(json: any): AgentTokenResponse { + return AgentTokenResponseToJSONTyped(json, false); +} + +export function AgentTokenResponseToJSONTyped(value?: AgentTokenResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + 'expires_in': value['expiresIn'], + }; +} + diff --git a/packages/client-ts/src/models/AlgEnum.ts b/packages/client-ts/src/models/AlgEnum.ts new file mode 100644 index 0000000000..d938f306b4 --- /dev/null +++ b/packages/client-ts/src/models/AlgEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const AlgEnum = { + Rsa: 'rsa', + Ecdsa: 'ecdsa', + Ed25519: 'ed25519', + Ed448: 'ed448', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AlgEnum = typeof AlgEnum[keyof typeof AlgEnum]; + + +export function instanceOfAlgEnum(value: any): boolean { + for (const key in AlgEnum) { + if (Object.prototype.hasOwnProperty.call(AlgEnum, key)) { + if (AlgEnum[key as keyof typeof AlgEnum] === value) { + return true; + } + } + } + return false; +} + +export function AlgEnumFromJSON(json: any): AlgEnum { + return AlgEnumFromJSONTyped(json, false); +} + +export function AlgEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlgEnum { + return json as AlgEnum; +} + +export function AlgEnumToJSON(value?: AlgEnum | null): any { + return value as any; +} + +export function AlgEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AlgEnum { + return value as AlgEnum; +} + diff --git a/packages/client-ts/src/models/App.ts b/packages/client-ts/src/models/App.ts new file mode 100644 index 0000000000..f91899b6c2 --- /dev/null +++ b/packages/client-ts/src/models/App.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serialize Application info + * @export + * @interface App + */ +export interface App { + /** + * + * @type {string} + * @memberof App + */ + name: string; + /** + * + * @type {string} + * @memberof App + */ + label: string; +} + +/** + * Check if a given object implements the App interface. + */ +export function instanceOfApp(value: object): value is App { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('label' in value) || value['label'] === undefined) return false; + return true; +} + +export function AppFromJSON(json: any): App { + return AppFromJSONTyped(json, false); +} + +export function AppFromJSONTyped(json: any, ignoreDiscriminator: boolean): App { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'label': json['label'], + }; +} + +export function AppToJSON(json: any): App { + return AppToJSONTyped(json, false); +} + +export function AppToJSONTyped(value?: App | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'label': value['label'], + }; +} + diff --git a/packages/client-ts/src/models/AppEnum.ts b/packages/client-ts/src/models/AppEnum.ts new file mode 100644 index 0000000000..ed4445789a --- /dev/null +++ b/packages/client-ts/src/models/AppEnum.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const AppEnum = { + AuthentikCommands: 'authentik.commands', + AuthentikTenants: 'authentik.tenants', + AuthentikTasks: 'authentik.tasks', + AuthentikAdmin: 'authentik.admin', + AuthentikApi: 'authentik.api', + AuthentikCore: 'authentik.core', + AuthentikCrypto: 'authentik.crypto', + AuthentikEndpoints: 'authentik.endpoints', + AuthentikEndpointsConnectorsAgent: 'authentik.endpoints.connectors.agent', + AuthentikEnterprise: 'authentik.enterprise', + AuthentikEvents: 'authentik.events', + AuthentikAdminFiles: 'authentik.admin.files', + AuthentikFlows: 'authentik.flows', + AuthentikOutposts: 'authentik.outposts', + AuthentikPoliciesDummy: 'authentik.policies.dummy', + AuthentikPoliciesEventMatcher: 'authentik.policies.event_matcher', + AuthentikPoliciesExpiry: 'authentik.policies.expiry', + AuthentikPoliciesExpression: 'authentik.policies.expression', + AuthentikPoliciesGeoip: 'authentik.policies.geoip', + AuthentikPoliciesPassword: 'authentik.policies.password', + AuthentikPoliciesReputation: 'authentik.policies.reputation', + AuthentikPolicies: 'authentik.policies', + AuthentikProvidersLdap: 'authentik.providers.ldap', + AuthentikProvidersOauth2: 'authentik.providers.oauth2', + AuthentikProvidersProxy: 'authentik.providers.proxy', + AuthentikProvidersRac: 'authentik.providers.rac', + AuthentikProvidersRadius: 'authentik.providers.radius', + AuthentikProvidersSaml: 'authentik.providers.saml', + AuthentikProvidersScim: 'authentik.providers.scim', + AuthentikRbac: 'authentik.rbac', + AuthentikRecovery: 'authentik.recovery', + AuthentikSourcesKerberos: 'authentik.sources.kerberos', + AuthentikSourcesLdap: 'authentik.sources.ldap', + AuthentikSourcesOauth: 'authentik.sources.oauth', + AuthentikSourcesPlex: 'authentik.sources.plex', + AuthentikSourcesSaml: 'authentik.sources.saml', + AuthentikSourcesScim: 'authentik.sources.scim', + AuthentikSourcesTelegram: 'authentik.sources.telegram', + AuthentikStagesAuthenticator: 'authentik.stages.authenticator', + AuthentikStagesAuthenticatorDuo: 'authentik.stages.authenticator_duo', + AuthentikStagesAuthenticatorEmail: 'authentik.stages.authenticator_email', + AuthentikStagesAuthenticatorSms: 'authentik.stages.authenticator_sms', + AuthentikStagesAuthenticatorStatic: 'authentik.stages.authenticator_static', + AuthentikStagesAuthenticatorTotp: 'authentik.stages.authenticator_totp', + AuthentikStagesAuthenticatorValidate: 'authentik.stages.authenticator_validate', + AuthentikStagesAuthenticatorWebauthn: 'authentik.stages.authenticator_webauthn', + AuthentikStagesCaptcha: 'authentik.stages.captcha', + AuthentikStagesConsent: 'authentik.stages.consent', + AuthentikStagesDeny: 'authentik.stages.deny', + AuthentikStagesDummy: 'authentik.stages.dummy', + AuthentikStagesEmail: 'authentik.stages.email', + AuthentikStagesIdentification: 'authentik.stages.identification', + AuthentikStagesInvitation: 'authentik.stages.invitation', + AuthentikStagesPassword: 'authentik.stages.password', + AuthentikStagesPrompt: 'authentik.stages.prompt', + AuthentikStagesRedirect: 'authentik.stages.redirect', + AuthentikStagesUserDelete: 'authentik.stages.user_delete', + AuthentikStagesUserLogin: 'authentik.stages.user_login', + AuthentikStagesUserLogout: 'authentik.stages.user_logout', + AuthentikStagesUserWrite: 'authentik.stages.user_write', + AuthentikTasksSchedules: 'authentik.tasks.schedules', + AuthentikBrands: 'authentik.brands', + AuthentikBlueprints: 'authentik.blueprints', + AuthentikEnterpriseAudit: 'authentik.enterprise.audit', + AuthentikEnterpriseEndpointsConnectorsAgent: 'authentik.enterprise.endpoints.connectors.agent', + AuthentikEnterpriseEndpointsConnectorsFleet: 'authentik.enterprise.endpoints.connectors.fleet', + AuthentikEnterpriseEndpointsConnectorsGoogleChrome: 'authentik.enterprise.endpoints.connectors.google_chrome', + AuthentikEnterpriseLifecycle: 'authentik.enterprise.lifecycle', + AuthentikEnterprisePoliciesUniquePassword: 'authentik.enterprise.policies.unique_password', + AuthentikEnterpriseProvidersGoogleWorkspace: 'authentik.enterprise.providers.google_workspace', + AuthentikEnterpriseProvidersMicrosoftEntra: 'authentik.enterprise.providers.microsoft_entra', + AuthentikEnterpriseProvidersRadius: 'authentik.enterprise.providers.radius', + AuthentikEnterpriseProvidersScim: 'authentik.enterprise.providers.scim', + AuthentikEnterpriseProvidersSsf: 'authentik.enterprise.providers.ssf', + AuthentikEnterpriseProvidersWsFederation: 'authentik.enterprise.providers.ws_federation', + AuthentikEnterpriseReports: 'authentik.enterprise.reports', + AuthentikEnterpriseSearch: 'authentik.enterprise.search', + AuthentikEnterpriseStagesAuthenticatorEndpointGdtc: 'authentik.enterprise.stages.authenticator_endpoint_gdtc', + AuthentikEnterpriseStagesMtls: 'authentik.enterprise.stages.mtls', + AuthentikEnterpriseStagesSource: 'authentik.enterprise.stages.source', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AppEnum = typeof AppEnum[keyof typeof AppEnum]; + + +export function instanceOfAppEnum(value: any): boolean { + for (const key in AppEnum) { + if (Object.prototype.hasOwnProperty.call(AppEnum, key)) { + if (AppEnum[key as keyof typeof AppEnum] === value) { + return true; + } + } + } + return false; +} + +export function AppEnumFromJSON(json: any): AppEnum { + return AppEnumFromJSONTyped(json, false); +} + +export function AppEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppEnum { + return json as AppEnum; +} + +export function AppEnumToJSON(value?: AppEnum | null): any { + return value as any; +} + +export function AppEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AppEnum { + return value as AppEnum; +} + diff --git a/packages/client-ts/src/models/AppleChallengeResponseRequest.ts b/packages/client-ts/src/models/AppleChallengeResponseRequest.ts new file mode 100644 index 0000000000..ceb021241a --- /dev/null +++ b/packages/client-ts/src/models/AppleChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Pseudo class for apple response + * @export + * @interface AppleChallengeResponseRequest + */ +export interface AppleChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AppleChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the AppleChallengeResponseRequest interface. + */ +export function instanceOfAppleChallengeResponseRequest(value: object): value is AppleChallengeResponseRequest { + return true; +} + +export function AppleChallengeResponseRequestFromJSON(json: any): AppleChallengeResponseRequest { + return AppleChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AppleChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppleChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function AppleChallengeResponseRequestToJSON(json: any): AppleChallengeResponseRequest { + return AppleChallengeResponseRequestToJSONTyped(json, false); +} + +export function AppleChallengeResponseRequestToJSONTyped(value?: AppleChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/AppleLoginChallenge.ts b/packages/client-ts/src/models/AppleLoginChallenge.ts new file mode 100644 index 0000000000..99a8702080 --- /dev/null +++ b/packages/client-ts/src/models/AppleLoginChallenge.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Special challenge for apple-native authentication flow, which happens on the client. + * @export + * @interface AppleLoginChallenge + */ +export interface AppleLoginChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AppleLoginChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AppleLoginChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AppleLoginChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AppleLoginChallenge + */ + clientId: string; + /** + * + * @type {string} + * @memberof AppleLoginChallenge + */ + scope: string; + /** + * + * @type {string} + * @memberof AppleLoginChallenge + */ + redirectUri: string; + /** + * + * @type {string} + * @memberof AppleLoginChallenge + */ + state: string; +} + +/** + * Check if a given object implements the AppleLoginChallenge interface. + */ +export function instanceOfAppleLoginChallenge(value: object): value is AppleLoginChallenge { + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('scope' in value) || value['scope'] === undefined) return false; + if (!('redirectUri' in value) || value['redirectUri'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; + return true; +} + +export function AppleLoginChallengeFromJSON(json: any): AppleLoginChallenge { + return AppleLoginChallengeFromJSONTyped(json, false); +} + +export function AppleLoginChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppleLoginChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'clientId': json['client_id'], + 'scope': json['scope'], + 'redirectUri': json['redirect_uri'], + 'state': json['state'], + }; +} + +export function AppleLoginChallengeToJSON(json: any): AppleLoginChallenge { + return AppleLoginChallengeToJSONTyped(json, false); +} + +export function AppleLoginChallengeToJSONTyped(value?: AppleLoginChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'client_id': value['clientId'], + 'scope': value['scope'], + 'redirect_uri': value['redirectUri'], + 'state': value['state'], + }; +} + diff --git a/packages/client-ts/src/models/Application.ts b/packages/client-ts/src/models/Application.ts new file mode 100644 index 0000000000..0ef18805d1 --- /dev/null +++ b/packages/client-ts/src/models/Application.ts @@ -0,0 +1,219 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { Provider } from './Provider'; +import { + ProviderFromJSON, + ProviderFromJSONTyped, + ProviderToJSON, + ProviderToJSONTyped, +} from './Provider'; + +/** + * Application Serializer + * @export + * @interface Application + */ +export interface Application { + /** + * + * @type {string} + * @memberof Application + */ + readonly pk: string; + /** + * Application's display Name. + * @type {string} + * @memberof Application + */ + name: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof Application + */ + slug: string; + /** + * + * @type {number} + * @memberof Application + */ + provider?: number | null; + /** + * + * @type {Provider} + * @memberof Application + */ + readonly providerObj: Provider; + /** + * + * @type {Array} + * @memberof Application + */ + backchannelProviders?: Array; + /** + * + * @type {Array} + * @memberof Application + */ + readonly backchannelProvidersObj: Array; + /** + * Allow formatting of launch URL + * @type {string} + * @memberof Application + */ + readonly launchUrl: string | null; + /** + * Open launch URL in a new browser tab or window. + * @type {boolean} + * @memberof Application + */ + openInNewTab?: boolean; + /** + * + * @type {string} + * @memberof Application + */ + metaLaunchUrl?: string; + /** + * + * @type {string} + * @memberof Application + */ + metaIcon?: string; + /** + * Get the URL to the App Icon image + * @type {string} + * @memberof Application + */ + readonly metaIconUrl: string | null; + /** + * + * @type {ThemedUrls} + * @memberof Application + */ + readonly metaIconThemedUrls: ThemedUrls | null; + /** + * + * @type {string} + * @memberof Application + */ + metaDescription?: string; + /** + * + * @type {string} + * @memberof Application + */ + metaPublisher?: string; + /** + * + * @type {PolicyEngineMode} + * @memberof Application + */ + policyEngineMode?: PolicyEngineMode; + /** + * + * @type {string} + * @memberof Application + */ + group?: string; +} + + + +/** + * Check if a given object implements the Application interface. + */ +export function instanceOfApplication(value: object): value is Application { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('providerObj' in value) || value['providerObj'] === undefined) return false; + if (!('backchannelProvidersObj' in value) || value['backchannelProvidersObj'] === undefined) return false; + if (!('launchUrl' in value) || value['launchUrl'] === undefined) return false; + if (!('metaIconUrl' in value) || value['metaIconUrl'] === undefined) return false; + if (!('metaIconThemedUrls' in value) || value['metaIconThemedUrls'] === undefined) return false; + return true; +} + +export function ApplicationFromJSON(json: any): Application { + return ApplicationFromJSONTyped(json, false); +} + +export function ApplicationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Application { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'provider': json['provider'] == null ? undefined : json['provider'], + 'providerObj': ProviderFromJSON(json['provider_obj']), + 'backchannelProviders': json['backchannel_providers'] == null ? undefined : json['backchannel_providers'], + 'backchannelProvidersObj': ((json['backchannel_providers_obj'] as Array).map(ProviderFromJSON)), + 'launchUrl': json['launch_url'], + 'openInNewTab': json['open_in_new_tab'] == null ? undefined : json['open_in_new_tab'], + 'metaLaunchUrl': json['meta_launch_url'] == null ? undefined : json['meta_launch_url'], + 'metaIcon': json['meta_icon'] == null ? undefined : json['meta_icon'], + 'metaIconUrl': json['meta_icon_url'], + 'metaIconThemedUrls': ThemedUrlsFromJSON(json['meta_icon_themed_urls']), + 'metaDescription': json['meta_description'] == null ? undefined : json['meta_description'], + 'metaPublisher': json['meta_publisher'] == null ? undefined : json['meta_publisher'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'group': json['group'] == null ? undefined : json['group'], + }; +} + +export function ApplicationToJSON(json: any): Application { + return ApplicationToJSONTyped(json, false); +} + +export function ApplicationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'provider': value['provider'], + 'backchannel_providers': value['backchannelProviders'], + 'open_in_new_tab': value['openInNewTab'], + 'meta_launch_url': value['metaLaunchUrl'], + 'meta_icon': value['metaIcon'], + 'meta_description': value['metaDescription'], + 'meta_publisher': value['metaPublisher'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'group': value['group'], + }; +} + diff --git a/packages/client-ts/src/models/ApplicationEntitlement.ts b/packages/client-ts/src/models/ApplicationEntitlement.ts new file mode 100644 index 0000000000..e3e1245865 --- /dev/null +++ b/packages/client-ts/src/models/ApplicationEntitlement.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ApplicationEntitlement Serializer + * @export + * @interface ApplicationEntitlement + */ +export interface ApplicationEntitlement { + /** + * + * @type {string} + * @memberof ApplicationEntitlement + */ + readonly pbmUuid: string; + /** + * + * @type {string} + * @memberof ApplicationEntitlement + */ + name: string; + /** + * + * @type {string} + * @memberof ApplicationEntitlement + */ + app: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof ApplicationEntitlement + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the ApplicationEntitlement interface. + */ +export function instanceOfApplicationEntitlement(value: object): value is ApplicationEntitlement { + if (!('pbmUuid' in value) || value['pbmUuid'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('app' in value) || value['app'] === undefined) return false; + return true; +} + +export function ApplicationEntitlementFromJSON(json: any): ApplicationEntitlement { + return ApplicationEntitlementFromJSONTyped(json, false); +} + +export function ApplicationEntitlementFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationEntitlement { + if (json == null) { + return json; + } + return { + + 'pbmUuid': json['pbm_uuid'], + 'name': json['name'], + 'app': json['app'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ApplicationEntitlementToJSON(json: any): ApplicationEntitlement { + return ApplicationEntitlementToJSONTyped(json, false); +} + +export function ApplicationEntitlementToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'app': value['app'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/ApplicationEntitlementRequest.ts b/packages/client-ts/src/models/ApplicationEntitlementRequest.ts new file mode 100644 index 0000000000..59604b05b9 --- /dev/null +++ b/packages/client-ts/src/models/ApplicationEntitlementRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ApplicationEntitlement Serializer + * @export + * @interface ApplicationEntitlementRequest + */ +export interface ApplicationEntitlementRequest { + /** + * + * @type {string} + * @memberof ApplicationEntitlementRequest + */ + name: string; + /** + * + * @type {string} + * @memberof ApplicationEntitlementRequest + */ + app: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof ApplicationEntitlementRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the ApplicationEntitlementRequest interface. + */ +export function instanceOfApplicationEntitlementRequest(value: object): value is ApplicationEntitlementRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('app' in value) || value['app'] === undefined) return false; + return true; +} + +export function ApplicationEntitlementRequestFromJSON(json: any): ApplicationEntitlementRequest { + return ApplicationEntitlementRequestFromJSONTyped(json, false); +} + +export function ApplicationEntitlementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationEntitlementRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'app': json['app'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ApplicationEntitlementRequestToJSON(json: any): ApplicationEntitlementRequest { + return ApplicationEntitlementRequestToJSONTyped(json, false); +} + +export function ApplicationEntitlementRequestToJSONTyped(value?: ApplicationEntitlementRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'app': value['app'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/ApplicationRequest.ts b/packages/client-ts/src/models/ApplicationRequest.ts new file mode 100644 index 0000000000..2b4ca6c595 --- /dev/null +++ b/packages/client-ts/src/models/ApplicationRequest.ts @@ -0,0 +1,157 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; + +/** + * Application Serializer + * @export + * @interface ApplicationRequest + */ +export interface ApplicationRequest { + /** + * Application's display Name. + * @type {string} + * @memberof ApplicationRequest + */ + name: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof ApplicationRequest + */ + slug: string; + /** + * + * @type {number} + * @memberof ApplicationRequest + */ + provider?: number | null; + /** + * + * @type {Array} + * @memberof ApplicationRequest + */ + backchannelProviders?: Array; + /** + * Open launch URL in a new browser tab or window. + * @type {boolean} + * @memberof ApplicationRequest + */ + openInNewTab?: boolean; + /** + * + * @type {string} + * @memberof ApplicationRequest + */ + metaLaunchUrl?: string; + /** + * + * @type {string} + * @memberof ApplicationRequest + */ + metaIcon?: string; + /** + * + * @type {string} + * @memberof ApplicationRequest + */ + metaDescription?: string; + /** + * + * @type {string} + * @memberof ApplicationRequest + */ + metaPublisher?: string; + /** + * + * @type {PolicyEngineMode} + * @memberof ApplicationRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * + * @type {string} + * @memberof ApplicationRequest + */ + group?: string; +} + + + +/** + * Check if a given object implements the ApplicationRequest interface. + */ +export function instanceOfApplicationRequest(value: object): value is ApplicationRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + return true; +} + +export function ApplicationRequestFromJSON(json: any): ApplicationRequest { + return ApplicationRequestFromJSONTyped(json, false); +} + +export function ApplicationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'provider': json['provider'] == null ? undefined : json['provider'], + 'backchannelProviders': json['backchannel_providers'] == null ? undefined : json['backchannel_providers'], + 'openInNewTab': json['open_in_new_tab'] == null ? undefined : json['open_in_new_tab'], + 'metaLaunchUrl': json['meta_launch_url'] == null ? undefined : json['meta_launch_url'], + 'metaIcon': json['meta_icon'] == null ? undefined : json['meta_icon'], + 'metaDescription': json['meta_description'] == null ? undefined : json['meta_description'], + 'metaPublisher': json['meta_publisher'] == null ? undefined : json['meta_publisher'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'group': json['group'] == null ? undefined : json['group'], + }; +} + +export function ApplicationRequestToJSON(json: any): ApplicationRequest { + return ApplicationRequestToJSONTyped(json, false); +} + +export function ApplicationRequestToJSONTyped(value?: ApplicationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'provider': value['provider'], + 'backchannel_providers': value['backchannelProviders'], + 'open_in_new_tab': value['openInNewTab'], + 'meta_launch_url': value['metaLaunchUrl'], + 'meta_icon': value['metaIcon'], + 'meta_description': value['metaDescription'], + 'meta_publisher': value['metaPublisher'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'group': value['group'], + }; +} + diff --git a/packages/client-ts/src/models/AuthTypeEnum.ts b/packages/client-ts/src/models/AuthTypeEnum.ts new file mode 100644 index 0000000000..fb91257a5f --- /dev/null +++ b/packages/client-ts/src/models/AuthTypeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const AuthTypeEnum = { + Basic: 'basic', + Bearer: 'bearer', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AuthTypeEnum = typeof AuthTypeEnum[keyof typeof AuthTypeEnum]; + + +export function instanceOfAuthTypeEnum(value: any): boolean { + for (const key in AuthTypeEnum) { + if (Object.prototype.hasOwnProperty.call(AuthTypeEnum, key)) { + if (AuthTypeEnum[key as keyof typeof AuthTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function AuthTypeEnumFromJSON(json: any): AuthTypeEnum { + return AuthTypeEnumFromJSONTyped(json, false); +} + +export function AuthTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthTypeEnum { + return json as AuthTypeEnum; +} + +export function AuthTypeEnumToJSON(value?: AuthTypeEnum | null): any { + return value as any; +} + +export function AuthTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuthTypeEnum { + return value as AuthTypeEnum; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSession.ts b/packages/client-ts/src/models/AuthenticatedSession.ts new file mode 100644 index 0000000000..edcd3c2be3 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSession.ts @@ -0,0 +1,163 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { AuthenticatedSessionGeoIp } from './AuthenticatedSessionGeoIp'; +import { + AuthenticatedSessionGeoIpFromJSON, + AuthenticatedSessionGeoIpFromJSONTyped, + AuthenticatedSessionGeoIpToJSON, + AuthenticatedSessionGeoIpToJSONTyped, +} from './AuthenticatedSessionGeoIp'; +import type { AuthenticatedSessionAsn } from './AuthenticatedSessionAsn'; +import { + AuthenticatedSessionAsnFromJSON, + AuthenticatedSessionAsnFromJSONTyped, + AuthenticatedSessionAsnToJSON, + AuthenticatedSessionAsnToJSONTyped, +} from './AuthenticatedSessionAsn'; +import type { AuthenticatedSessionUserAgent } from './AuthenticatedSessionUserAgent'; +import { + AuthenticatedSessionUserAgentFromJSON, + AuthenticatedSessionUserAgentFromJSONTyped, + AuthenticatedSessionUserAgentToJSON, + AuthenticatedSessionUserAgentToJSONTyped, +} from './AuthenticatedSessionUserAgent'; + +/** + * AuthenticatedSession Serializer + * @export + * @interface AuthenticatedSession + */ +export interface AuthenticatedSession { + /** + * + * @type {string} + * @memberof AuthenticatedSession + */ + uuid?: string; + /** + * Check if session is currently active session + * @type {boolean} + * @memberof AuthenticatedSession + */ + readonly current: boolean; + /** + * + * @type {AuthenticatedSessionUserAgent} + * @memberof AuthenticatedSession + */ + userAgent: AuthenticatedSessionUserAgent; + /** + * + * @type {AuthenticatedSessionGeoIp} + * @memberof AuthenticatedSession + */ + geoIp: AuthenticatedSessionGeoIp | null; + /** + * + * @type {AuthenticatedSessionAsn} + * @memberof AuthenticatedSession + */ + asn: AuthenticatedSessionAsn | null; + /** + * + * @type {number} + * @memberof AuthenticatedSession + */ + user: number; + /** + * + * @type {string} + * @memberof AuthenticatedSession + */ + readonly lastIp: string; + /** + * + * @type {string} + * @memberof AuthenticatedSession + */ + readonly lastUserAgent: string; + /** + * + * @type {Date} + * @memberof AuthenticatedSession + */ + readonly lastUsed: Date; + /** + * + * @type {Date} + * @memberof AuthenticatedSession + */ + readonly expires: Date; +} + +/** + * Check if a given object implements the AuthenticatedSession interface. + */ +export function instanceOfAuthenticatedSession(value: object): value is AuthenticatedSession { + if (!('current' in value) || value['current'] === undefined) return false; + if (!('userAgent' in value) || value['userAgent'] === undefined) return false; + if (!('geoIp' in value) || value['geoIp'] === undefined) return false; + if (!('asn' in value) || value['asn'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('lastIp' in value) || value['lastIp'] === undefined) return false; + if (!('lastUserAgent' in value) || value['lastUserAgent'] === undefined) return false; + if (!('lastUsed' in value) || value['lastUsed'] === undefined) return false; + if (!('expires' in value) || value['expires'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionFromJSON(json: any): AuthenticatedSession { + return AuthenticatedSessionFromJSONTyped(json, false); +} + +export function AuthenticatedSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSession { + if (json == null) { + return json; + } + return { + + 'uuid': json['uuid'] == null ? undefined : json['uuid'], + 'current': json['current'], + 'userAgent': AuthenticatedSessionUserAgentFromJSON(json['user_agent']), + 'geoIp': AuthenticatedSessionGeoIpFromJSON(json['geo_ip']), + 'asn': AuthenticatedSessionAsnFromJSON(json['asn']), + 'user': json['user'], + 'lastIp': json['last_ip'], + 'lastUserAgent': json['last_user_agent'], + 'lastUsed': (new Date(json['last_used'])), + 'expires': (new Date(json['expires'])), + }; +} + +export function AuthenticatedSessionToJSON(json: any): AuthenticatedSession { + return AuthenticatedSessionToJSONTyped(json, false); +} + +export function AuthenticatedSessionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uuid': value['uuid'], + 'user_agent': AuthenticatedSessionUserAgentToJSON(value['userAgent']), + 'geo_ip': AuthenticatedSessionGeoIpToJSON(value['geoIp']), + 'asn': AuthenticatedSessionAsnToJSON(value['asn']), + 'user': value['user'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSessionAsn.ts b/packages/client-ts/src/models/AuthenticatedSessionAsn.ts new file mode 100644 index 0000000000..de848d9a40 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSessionAsn.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Get ASN Data + * @export + * @interface AuthenticatedSessionAsn + */ +export interface AuthenticatedSessionAsn { + /** + * + * @type {number} + * @memberof AuthenticatedSessionAsn + */ + asn: number | null; + /** + * + * @type {string} + * @memberof AuthenticatedSessionAsn + */ + asOrg: string | null; + /** + * + * @type {string} + * @memberof AuthenticatedSessionAsn + */ + network: string | null; +} + +/** + * Check if a given object implements the AuthenticatedSessionAsn interface. + */ +export function instanceOfAuthenticatedSessionAsn(value: object): value is AuthenticatedSessionAsn { + if (!('asn' in value) || value['asn'] === undefined) return false; + if (!('asOrg' in value) || value['asOrg'] === undefined) return false; + if (!('network' in value) || value['network'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionAsnFromJSON(json: any): AuthenticatedSessionAsn { + return AuthenticatedSessionAsnFromJSONTyped(json, false); +} + +export function AuthenticatedSessionAsnFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSessionAsn { + if (json == null) { + return json; + } + return { + + 'asn': json['asn'], + 'asOrg': json['as_org'], + 'network': json['network'], + }; +} + +export function AuthenticatedSessionAsnToJSON(json: any): AuthenticatedSessionAsn { + return AuthenticatedSessionAsnToJSONTyped(json, false); +} + +export function AuthenticatedSessionAsnToJSONTyped(value?: AuthenticatedSessionAsn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'asn': value['asn'], + 'as_org': value['asOrg'], + 'network': value['network'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSessionGeoIp.ts b/packages/client-ts/src/models/AuthenticatedSessionGeoIp.ts new file mode 100644 index 0000000000..b9bb800eaa --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSessionGeoIp.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Get GeoIP Data + * @export + * @interface AuthenticatedSessionGeoIp + */ +export interface AuthenticatedSessionGeoIp { + /** + * + * @type {string} + * @memberof AuthenticatedSessionGeoIp + */ + continent: string | null; + /** + * + * @type {string} + * @memberof AuthenticatedSessionGeoIp + */ + country: string | null; + /** + * + * @type {number} + * @memberof AuthenticatedSessionGeoIp + */ + lat: number | null; + /** + * + * @type {number} + * @memberof AuthenticatedSessionGeoIp + */ + _long: number | null; + /** + * + * @type {string} + * @memberof AuthenticatedSessionGeoIp + */ + city: string; +} + +/** + * Check if a given object implements the AuthenticatedSessionGeoIp interface. + */ +export function instanceOfAuthenticatedSessionGeoIp(value: object): value is AuthenticatedSessionGeoIp { + if (!('continent' in value) || value['continent'] === undefined) return false; + if (!('country' in value) || value['country'] === undefined) return false; + if (!('lat' in value) || value['lat'] === undefined) return false; + if (!('_long' in value) || value['_long'] === undefined) return false; + if (!('city' in value) || value['city'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionGeoIpFromJSON(json: any): AuthenticatedSessionGeoIp { + return AuthenticatedSessionGeoIpFromJSONTyped(json, false); +} + +export function AuthenticatedSessionGeoIpFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSessionGeoIp { + if (json == null) { + return json; + } + return { + + 'continent': json['continent'], + 'country': json['country'], + 'lat': json['lat'], + '_long': json['long'], + 'city': json['city'], + }; +} + +export function AuthenticatedSessionGeoIpToJSON(json: any): AuthenticatedSessionGeoIp { + return AuthenticatedSessionGeoIpToJSONTyped(json, false); +} + +export function AuthenticatedSessionGeoIpToJSONTyped(value?: AuthenticatedSessionGeoIp | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'continent': value['continent'], + 'country': value['country'], + 'lat': value['lat'], + 'long': value['_long'], + 'city': value['city'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSessionUserAgent.ts b/packages/client-ts/src/models/AuthenticatedSessionUserAgent.ts new file mode 100644 index 0000000000..c6ffca9ba4 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSessionUserAgent.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { AuthenticatedSessionUserAgentDevice } from './AuthenticatedSessionUserAgentDevice'; +import { + AuthenticatedSessionUserAgentDeviceFromJSON, + AuthenticatedSessionUserAgentDeviceFromJSONTyped, + AuthenticatedSessionUserAgentDeviceToJSON, + AuthenticatedSessionUserAgentDeviceToJSONTyped, +} from './AuthenticatedSessionUserAgentDevice'; +import type { AuthenticatedSessionUserAgentUserAgent } from './AuthenticatedSessionUserAgentUserAgent'; +import { + AuthenticatedSessionUserAgentUserAgentFromJSON, + AuthenticatedSessionUserAgentUserAgentFromJSONTyped, + AuthenticatedSessionUserAgentUserAgentToJSON, + AuthenticatedSessionUserAgentUserAgentToJSONTyped, +} from './AuthenticatedSessionUserAgentUserAgent'; +import type { AuthenticatedSessionUserAgentOs } from './AuthenticatedSessionUserAgentOs'; +import { + AuthenticatedSessionUserAgentOsFromJSON, + AuthenticatedSessionUserAgentOsFromJSONTyped, + AuthenticatedSessionUserAgentOsToJSON, + AuthenticatedSessionUserAgentOsToJSONTyped, +} from './AuthenticatedSessionUserAgentOs'; + +/** + * Get parsed user agent + * @export + * @interface AuthenticatedSessionUserAgent + */ +export interface AuthenticatedSessionUserAgent { + /** + * + * @type {AuthenticatedSessionUserAgentDevice} + * @memberof AuthenticatedSessionUserAgent + */ + device: AuthenticatedSessionUserAgentDevice; + /** + * + * @type {AuthenticatedSessionUserAgentOs} + * @memberof AuthenticatedSessionUserAgent + */ + os: AuthenticatedSessionUserAgentOs; + /** + * + * @type {AuthenticatedSessionUserAgentUserAgent} + * @memberof AuthenticatedSessionUserAgent + */ + userAgent: AuthenticatedSessionUserAgentUserAgent; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgent + */ + string: string; +} + +/** + * Check if a given object implements the AuthenticatedSessionUserAgent interface. + */ +export function instanceOfAuthenticatedSessionUserAgent(value: object): value is AuthenticatedSessionUserAgent { + if (!('device' in value) || value['device'] === undefined) return false; + if (!('os' in value) || value['os'] === undefined) return false; + if (!('userAgent' in value) || value['userAgent'] === undefined) return false; + if (!('string' in value) || value['string'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionUserAgentFromJSON(json: any): AuthenticatedSessionUserAgent { + return AuthenticatedSessionUserAgentFromJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSessionUserAgent { + if (json == null) { + return json; + } + return { + + 'device': AuthenticatedSessionUserAgentDeviceFromJSON(json['device']), + 'os': AuthenticatedSessionUserAgentOsFromJSON(json['os']), + 'userAgent': AuthenticatedSessionUserAgentUserAgentFromJSON(json['user_agent']), + 'string': json['string'], + }; +} + +export function AuthenticatedSessionUserAgentToJSON(json: any): AuthenticatedSessionUserAgent { + return AuthenticatedSessionUserAgentToJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentToJSONTyped(value?: AuthenticatedSessionUserAgent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device': AuthenticatedSessionUserAgentDeviceToJSON(value['device']), + 'os': AuthenticatedSessionUserAgentOsToJSON(value['os']), + 'user_agent': AuthenticatedSessionUserAgentUserAgentToJSON(value['userAgent']), + 'string': value['string'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSessionUserAgentDevice.ts b/packages/client-ts/src/models/AuthenticatedSessionUserAgentDevice.ts new file mode 100644 index 0000000000..97984e67bd --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSessionUserAgentDevice.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User agent device + * @export + * @interface AuthenticatedSessionUserAgentDevice + */ +export interface AuthenticatedSessionUserAgentDevice { + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentDevice + */ + brand: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentDevice + */ + family: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentDevice + */ + model: string; +} + +/** + * Check if a given object implements the AuthenticatedSessionUserAgentDevice interface. + */ +export function instanceOfAuthenticatedSessionUserAgentDevice(value: object): value is AuthenticatedSessionUserAgentDevice { + if (!('brand' in value) || value['brand'] === undefined) return false; + if (!('family' in value) || value['family'] === undefined) return false; + if (!('model' in value) || value['model'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionUserAgentDeviceFromJSON(json: any): AuthenticatedSessionUserAgentDevice { + return AuthenticatedSessionUserAgentDeviceFromJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSessionUserAgentDevice { + if (json == null) { + return json; + } + return { + + 'brand': json['brand'], + 'family': json['family'], + 'model': json['model'], + }; +} + +export function AuthenticatedSessionUserAgentDeviceToJSON(json: any): AuthenticatedSessionUserAgentDevice { + return AuthenticatedSessionUserAgentDeviceToJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentDeviceToJSONTyped(value?: AuthenticatedSessionUserAgentDevice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'brand': value['brand'], + 'family': value['family'], + 'model': value['model'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSessionUserAgentOs.ts b/packages/client-ts/src/models/AuthenticatedSessionUserAgentOs.ts new file mode 100644 index 0000000000..3bcbe1b32e --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSessionUserAgentOs.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User agent os + * @export + * @interface AuthenticatedSessionUserAgentOs + */ +export interface AuthenticatedSessionUserAgentOs { + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentOs + */ + family: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentOs + */ + major: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentOs + */ + minor: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentOs + */ + patch: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentOs + */ + patchMinor: string; +} + +/** + * Check if a given object implements the AuthenticatedSessionUserAgentOs interface. + */ +export function instanceOfAuthenticatedSessionUserAgentOs(value: object): value is AuthenticatedSessionUserAgentOs { + if (!('family' in value) || value['family'] === undefined) return false; + if (!('major' in value) || value['major'] === undefined) return false; + if (!('minor' in value) || value['minor'] === undefined) return false; + if (!('patch' in value) || value['patch'] === undefined) return false; + if (!('patchMinor' in value) || value['patchMinor'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionUserAgentOsFromJSON(json: any): AuthenticatedSessionUserAgentOs { + return AuthenticatedSessionUserAgentOsFromJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentOsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSessionUserAgentOs { + if (json == null) { + return json; + } + return { + + 'family': json['family'], + 'major': json['major'], + 'minor': json['minor'], + 'patch': json['patch'], + 'patchMinor': json['patch_minor'], + }; +} + +export function AuthenticatedSessionUserAgentOsToJSON(json: any): AuthenticatedSessionUserAgentOs { + return AuthenticatedSessionUserAgentOsToJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentOsToJSONTyped(value?: AuthenticatedSessionUserAgentOs | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'family': value['family'], + 'major': value['major'], + 'minor': value['minor'], + 'patch': value['patch'], + 'patch_minor': value['patchMinor'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatedSessionUserAgentUserAgent.ts b/packages/client-ts/src/models/AuthenticatedSessionUserAgentUserAgent.ts new file mode 100644 index 0000000000..14ed38a522 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatedSessionUserAgentUserAgent.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User agent browser + * @export + * @interface AuthenticatedSessionUserAgentUserAgent + */ +export interface AuthenticatedSessionUserAgentUserAgent { + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentUserAgent + */ + family: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentUserAgent + */ + major: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentUserAgent + */ + minor: string; + /** + * + * @type {string} + * @memberof AuthenticatedSessionUserAgentUserAgent + */ + patch: string; +} + +/** + * Check if a given object implements the AuthenticatedSessionUserAgentUserAgent interface. + */ +export function instanceOfAuthenticatedSessionUserAgentUserAgent(value: object): value is AuthenticatedSessionUserAgentUserAgent { + if (!('family' in value) || value['family'] === undefined) return false; + if (!('major' in value) || value['major'] === undefined) return false; + if (!('minor' in value) || value['minor'] === undefined) return false; + if (!('patch' in value) || value['patch'] === undefined) return false; + return true; +} + +export function AuthenticatedSessionUserAgentUserAgentFromJSON(json: any): AuthenticatedSessionUserAgentUserAgent { + return AuthenticatedSessionUserAgentUserAgentFromJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentUserAgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatedSessionUserAgentUserAgent { + if (json == null) { + return json; + } + return { + + 'family': json['family'], + 'major': json['major'], + 'minor': json['minor'], + 'patch': json['patch'], + }; +} + +export function AuthenticatedSessionUserAgentUserAgentToJSON(json: any): AuthenticatedSessionUserAgentUserAgent { + return AuthenticatedSessionUserAgentUserAgentToJSONTyped(json, false); +} + +export function AuthenticatedSessionUserAgentUserAgentToJSONTyped(value?: AuthenticatedSessionUserAgentUserAgent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'family': value['family'], + 'major': value['major'], + 'minor': value['minor'], + 'patch': value['patch'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticationEnum.ts b/packages/client-ts/src/models/AuthenticationEnum.ts new file mode 100644 index 0000000000..a8388a69a8 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticationEnum.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const AuthenticationEnum = { + None: 'none', + RequireAuthenticated: 'require_authenticated', + RequireUnauthenticated: 'require_unauthenticated', + RequireSuperuser: 'require_superuser', + RequireRedirect: 'require_redirect', + RequireOutpost: 'require_outpost', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AuthenticationEnum = typeof AuthenticationEnum[keyof typeof AuthenticationEnum]; + + +export function instanceOfAuthenticationEnum(value: any): boolean { + for (const key in AuthenticationEnum) { + if (Object.prototype.hasOwnProperty.call(AuthenticationEnum, key)) { + if (AuthenticationEnum[key as keyof typeof AuthenticationEnum] === value) { + return true; + } + } + } + return false; +} + +export function AuthenticationEnumFromJSON(json: any): AuthenticationEnum { + return AuthenticationEnumFromJSONTyped(json, false); +} + +export function AuthenticationEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticationEnum { + return json as AuthenticationEnum; +} + +export function AuthenticationEnumToJSON(value?: AuthenticationEnum | null): any { + return value as any; +} + +export function AuthenticationEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuthenticationEnum { + return value as AuthenticationEnum; +} + diff --git a/packages/client-ts/src/models/AuthenticatorAttachmentEnum.ts b/packages/client-ts/src/models/AuthenticatorAttachmentEnum.ts new file mode 100644 index 0000000000..4d201b80a1 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorAttachmentEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const AuthenticatorAttachmentEnum = { + Platform: 'platform', + CrossPlatform: 'cross-platform', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AuthenticatorAttachmentEnum = typeof AuthenticatorAttachmentEnum[keyof typeof AuthenticatorAttachmentEnum]; + + +export function instanceOfAuthenticatorAttachmentEnum(value: any): boolean { + for (const key in AuthenticatorAttachmentEnum) { + if (Object.prototype.hasOwnProperty.call(AuthenticatorAttachmentEnum, key)) { + if (AuthenticatorAttachmentEnum[key as keyof typeof AuthenticatorAttachmentEnum] === value) { + return true; + } + } + } + return false; +} + +export function AuthenticatorAttachmentEnumFromJSON(json: any): AuthenticatorAttachmentEnum { + return AuthenticatorAttachmentEnumFromJSONTyped(json, false); +} + +export function AuthenticatorAttachmentEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorAttachmentEnum { + return json as AuthenticatorAttachmentEnum; +} + +export function AuthenticatorAttachmentEnumToJSON(value?: AuthenticatorAttachmentEnum | null): any { + return value as any; +} + +export function AuthenticatorAttachmentEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuthenticatorAttachmentEnum { + return value as AuthenticatorAttachmentEnum; +} + diff --git a/packages/client-ts/src/models/AuthenticatorDuoChallenge.ts b/packages/client-ts/src/models/AuthenticatorDuoChallenge.ts new file mode 100644 index 0000000000..068bf00b0e --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorDuoChallenge.ts @@ -0,0 +1,141 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Duo Challenge + * @export + * @interface AuthenticatorDuoChallenge + */ +export interface AuthenticatorDuoChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorDuoChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorDuoChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallenge + */ + activationBarcode: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallenge + */ + activationCode: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallenge + */ + stageUuid: string; +} + +/** + * Check if a given object implements the AuthenticatorDuoChallenge interface. + */ +export function instanceOfAuthenticatorDuoChallenge(value: object): value is AuthenticatorDuoChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('activationBarcode' in value) || value['activationBarcode'] === undefined) return false; + if (!('activationCode' in value) || value['activationCode'] === undefined) return false; + if (!('stageUuid' in value) || value['stageUuid'] === undefined) return false; + return true; +} + +export function AuthenticatorDuoChallengeFromJSON(json: any): AuthenticatorDuoChallenge { + return AuthenticatorDuoChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorDuoChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorDuoChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'activationBarcode': json['activation_barcode'], + 'activationCode': json['activation_code'], + 'stageUuid': json['stage_uuid'], + }; +} + +export function AuthenticatorDuoChallengeToJSON(json: any): AuthenticatorDuoChallenge { + return AuthenticatorDuoChallengeToJSONTyped(json, false); +} + +export function AuthenticatorDuoChallengeToJSONTyped(value?: AuthenticatorDuoChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'activation_barcode': value['activationBarcode'], + 'activation_code': value['activationCode'], + 'stage_uuid': value['stageUuid'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorDuoChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorDuoChallengeResponseRequest.ts new file mode 100644 index 0000000000..3eca634af8 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorDuoChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Pseudo class for duo response + * @export + * @interface AuthenticatorDuoChallengeResponseRequest + */ +export interface AuthenticatorDuoChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorDuoChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the AuthenticatorDuoChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorDuoChallengeResponseRequest(value: object): value is AuthenticatorDuoChallengeResponseRequest { + return true; +} + +export function AuthenticatorDuoChallengeResponseRequestFromJSON(json: any): AuthenticatorDuoChallengeResponseRequest { + return AuthenticatorDuoChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorDuoChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorDuoChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function AuthenticatorDuoChallengeResponseRequestToJSON(json: any): AuthenticatorDuoChallengeResponseRequest { + return AuthenticatorDuoChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorDuoChallengeResponseRequestToJSONTyped(value?: AuthenticatorDuoChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorDuoStage.ts b/packages/client-ts/src/models/AuthenticatorDuoStage.ts new file mode 100644 index 0000000000..0421b6eaa7 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorDuoStage.ts @@ -0,0 +1,164 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * AuthenticatorDuoStage Serializer + * @export + * @interface AuthenticatorDuoStage + */ +export interface AuthenticatorDuoStage { + /** + * + * @type {string} + * @memberof AuthenticatorDuoStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorDuoStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorDuoStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorDuoStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorDuoStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorDuoStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorDuoStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStage + */ + friendlyName?: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStage + */ + clientId: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStage + */ + apiHostname: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStage + */ + adminIntegrationKey?: string; +} + +/** + * Check if a given object implements the AuthenticatorDuoStage interface. + */ +export function instanceOfAuthenticatorDuoStage(value: object): value is AuthenticatorDuoStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('apiHostname' in value) || value['apiHostname'] === undefined) return false; + return true; +} + +export function AuthenticatorDuoStageFromJSON(json: any): AuthenticatorDuoStage { + return AuthenticatorDuoStageFromJSONTyped(json, false); +} + +export function AuthenticatorDuoStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorDuoStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'clientId': json['client_id'], + 'apiHostname': json['api_hostname'], + 'adminIntegrationKey': json['admin_integration_key'] == null ? undefined : json['admin_integration_key'], + }; +} + +export function AuthenticatorDuoStageToJSON(json: any): AuthenticatorDuoStage { + return AuthenticatorDuoStageToJSONTyped(json, false); +} + +export function AuthenticatorDuoStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'client_id': value['clientId'], + 'api_hostname': value['apiHostname'], + 'admin_integration_key': value['adminIntegrationKey'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorDuoStageDeviceImportResponse.ts b/packages/client-ts/src/models/AuthenticatorDuoStageDeviceImportResponse.ts new file mode 100644 index 0000000000..a35b786073 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorDuoStageDeviceImportResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AuthenticatorDuoStageDeviceImportResponse + */ +export interface AuthenticatorDuoStageDeviceImportResponse { + /** + * + * @type {number} + * @memberof AuthenticatorDuoStageDeviceImportResponse + */ + readonly count: number; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageDeviceImportResponse + */ + readonly error: string; +} + +/** + * Check if a given object implements the AuthenticatorDuoStageDeviceImportResponse interface. + */ +export function instanceOfAuthenticatorDuoStageDeviceImportResponse(value: object): value is AuthenticatorDuoStageDeviceImportResponse { + if (!('count' in value) || value['count'] === undefined) return false; + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function AuthenticatorDuoStageDeviceImportResponseFromJSON(json: any): AuthenticatorDuoStageDeviceImportResponse { + return AuthenticatorDuoStageDeviceImportResponseFromJSONTyped(json, false); +} + +export function AuthenticatorDuoStageDeviceImportResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorDuoStageDeviceImportResponse { + if (json == null) { + return json; + } + return { + + 'count': json['count'], + 'error': json['error'], + }; +} + +export function AuthenticatorDuoStageDeviceImportResponseToJSON(json: any): AuthenticatorDuoStageDeviceImportResponse { + return AuthenticatorDuoStageDeviceImportResponseToJSONTyped(json, false); +} + +export function AuthenticatorDuoStageDeviceImportResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorDuoStageManualDeviceImportRequest.ts b/packages/client-ts/src/models/AuthenticatorDuoStageManualDeviceImportRequest.ts new file mode 100644 index 0000000000..cb2a380c3c --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorDuoStageManualDeviceImportRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AuthenticatorDuoStageManualDeviceImportRequest + */ +export interface AuthenticatorDuoStageManualDeviceImportRequest { + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageManualDeviceImportRequest + */ + duoUserId: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageManualDeviceImportRequest + */ + username: string; +} + +/** + * Check if a given object implements the AuthenticatorDuoStageManualDeviceImportRequest interface. + */ +export function instanceOfAuthenticatorDuoStageManualDeviceImportRequest(value: object): value is AuthenticatorDuoStageManualDeviceImportRequest { + if (!('duoUserId' in value) || value['duoUserId'] === undefined) return false; + if (!('username' in value) || value['username'] === undefined) return false; + return true; +} + +export function AuthenticatorDuoStageManualDeviceImportRequestFromJSON(json: any): AuthenticatorDuoStageManualDeviceImportRequest { + return AuthenticatorDuoStageManualDeviceImportRequestFromJSONTyped(json, false); +} + +export function AuthenticatorDuoStageManualDeviceImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorDuoStageManualDeviceImportRequest { + if (json == null) { + return json; + } + return { + + 'duoUserId': json['duo_user_id'], + 'username': json['username'], + }; +} + +export function AuthenticatorDuoStageManualDeviceImportRequestToJSON(json: any): AuthenticatorDuoStageManualDeviceImportRequest { + return AuthenticatorDuoStageManualDeviceImportRequestToJSONTyped(json, false); +} + +export function AuthenticatorDuoStageManualDeviceImportRequestToJSONTyped(value?: AuthenticatorDuoStageManualDeviceImportRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'duo_user_id': value['duoUserId'], + 'username': value['username'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorDuoStageRequest.ts b/packages/client-ts/src/models/AuthenticatorDuoStageRequest.ts new file mode 100644 index 0000000000..886eefa925 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorDuoStageRequest.ts @@ -0,0 +1,125 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorDuoStage Serializer + * @export + * @interface AuthenticatorDuoStageRequest + */ +export interface AuthenticatorDuoStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + friendlyName?: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + clientId: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + clientSecret: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + apiHostname: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + adminIntegrationKey?: string; + /** + * + * @type {string} + * @memberof AuthenticatorDuoStageRequest + */ + adminSecretKey?: string; +} + +/** + * Check if a given object implements the AuthenticatorDuoStageRequest interface. + */ +export function instanceOfAuthenticatorDuoStageRequest(value: object): value is AuthenticatorDuoStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false; + if (!('apiHostname' in value) || value['apiHostname'] === undefined) return false; + return true; +} + +export function AuthenticatorDuoStageRequestFromJSON(json: any): AuthenticatorDuoStageRequest { + return AuthenticatorDuoStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorDuoStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorDuoStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'clientId': json['client_id'], + 'clientSecret': json['client_secret'], + 'apiHostname': json['api_hostname'], + 'adminIntegrationKey': json['admin_integration_key'] == null ? undefined : json['admin_integration_key'], + 'adminSecretKey': json['admin_secret_key'] == null ? undefined : json['admin_secret_key'], + }; +} + +export function AuthenticatorDuoStageRequestToJSON(json: any): AuthenticatorDuoStageRequest { + return AuthenticatorDuoStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorDuoStageRequestToJSONTyped(value?: AuthenticatorDuoStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'api_hostname': value['apiHostname'], + 'admin_integration_key': value['adminIntegrationKey'], + 'admin_secret_key': value['adminSecretKey'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorEmailChallenge.ts b/packages/client-ts/src/models/AuthenticatorEmailChallenge.ts new file mode 100644 index 0000000000..3f83af68ae --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorEmailChallenge.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Authenticator Email Setup challenge + * @export + * @interface AuthenticatorEmailChallenge + */ +export interface AuthenticatorEmailChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorEmailChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorEmailChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallenge + */ + email?: string | null; + /** + * + * @type {boolean} + * @memberof AuthenticatorEmailChallenge + */ + emailRequired?: boolean; +} + +/** + * Check if a given object implements the AuthenticatorEmailChallenge interface. + */ +export function instanceOfAuthenticatorEmailChallenge(value: object): value is AuthenticatorEmailChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + return true; +} + +export function AuthenticatorEmailChallengeFromJSON(json: any): AuthenticatorEmailChallenge { + return AuthenticatorEmailChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorEmailChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEmailChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'email': json['email'] == null ? undefined : json['email'], + 'emailRequired': json['email_required'] == null ? undefined : json['email_required'], + }; +} + +export function AuthenticatorEmailChallengeToJSON(json: any): AuthenticatorEmailChallenge { + return AuthenticatorEmailChallengeToJSONTyped(json, false); +} + +export function AuthenticatorEmailChallengeToJSONTyped(value?: AuthenticatorEmailChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'email': value['email'], + 'email_required': value['emailRequired'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorEmailChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorEmailChallengeResponseRequest.ts new file mode 100644 index 0000000000..9347f368e3 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorEmailChallengeResponseRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Authenticator Email Challenge response, device is set by get_response_instance + * @export + * @interface AuthenticatorEmailChallengeResponseRequest + */ +export interface AuthenticatorEmailChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallengeResponseRequest + */ + code?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailChallengeResponseRequest + */ + email?: string; +} + +/** + * Check if a given object implements the AuthenticatorEmailChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorEmailChallengeResponseRequest(value: object): value is AuthenticatorEmailChallengeResponseRequest { + return true; +} + +export function AuthenticatorEmailChallengeResponseRequestFromJSON(json: any): AuthenticatorEmailChallengeResponseRequest { + return AuthenticatorEmailChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorEmailChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEmailChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'code': json['code'] == null ? undefined : json['code'], + 'email': json['email'] == null ? undefined : json['email'], + }; +} + +export function AuthenticatorEmailChallengeResponseRequestToJSON(json: any): AuthenticatorEmailChallengeResponseRequest { + return AuthenticatorEmailChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorEmailChallengeResponseRequestToJSONTyped(value?: AuthenticatorEmailChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'code': value['code'], + 'email': value['email'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorEmailStage.ts b/packages/client-ts/src/models/AuthenticatorEmailStage.ts new file mode 100644 index 0000000000..93b2400c01 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorEmailStage.ts @@ -0,0 +1,234 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * AuthenticatorEmailStage Serializer + * @export + * @interface AuthenticatorEmailStage + */ +export interface AuthenticatorEmailStage { + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorEmailStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorEmailStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorEmailStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorEmailStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorEmailStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorEmailStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + friendlyName?: string; + /** + * When enabled, global Email connection settings will be used and connection settings below will be ignored. + * @type {boolean} + * @memberof AuthenticatorEmailStage + */ + useGlobalSettings?: boolean; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + host?: string; + /** + * + * @type {number} + * @memberof AuthenticatorEmailStage + */ + port?: number; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + username?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + password?: string; + /** + * + * @type {boolean} + * @memberof AuthenticatorEmailStage + */ + useTls?: boolean; + /** + * + * @type {boolean} + * @memberof AuthenticatorEmailStage + */ + useSsl?: boolean; + /** + * + * @type {number} + * @memberof AuthenticatorEmailStage + */ + timeout?: number; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + fromAddress?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + subject?: string; + /** + * Time the token sent is valid (Format: hours=3,minutes=17,seconds=300). + * @type {string} + * @memberof AuthenticatorEmailStage + */ + tokenExpiry?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStage + */ + template?: string; +} + +/** + * Check if a given object implements the AuthenticatorEmailStage interface. + */ +export function instanceOfAuthenticatorEmailStage(value: object): value is AuthenticatorEmailStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function AuthenticatorEmailStageFromJSON(json: any): AuthenticatorEmailStage { + return AuthenticatorEmailStageFromJSONTyped(json, false); +} + +export function AuthenticatorEmailStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEmailStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'useGlobalSettings': json['use_global_settings'] == null ? undefined : json['use_global_settings'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'username': json['username'] == null ? undefined : json['username'], + 'password': json['password'] == null ? undefined : json['password'], + 'useTls': json['use_tls'] == null ? undefined : json['use_tls'], + 'useSsl': json['use_ssl'] == null ? undefined : json['use_ssl'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'fromAddress': json['from_address'] == null ? undefined : json['from_address'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'tokenExpiry': json['token_expiry'] == null ? undefined : json['token_expiry'], + 'template': json['template'] == null ? undefined : json['template'], + }; +} + +export function AuthenticatorEmailStageToJSON(json: any): AuthenticatorEmailStage { + return AuthenticatorEmailStageToJSONTyped(json, false); +} + +export function AuthenticatorEmailStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'use_global_settings': value['useGlobalSettings'], + 'host': value['host'], + 'port': value['port'], + 'username': value['username'], + 'password': value['password'], + 'use_tls': value['useTls'], + 'use_ssl': value['useSsl'], + 'timeout': value['timeout'], + 'from_address': value['fromAddress'], + 'subject': value['subject'], + 'token_expiry': value['tokenExpiry'], + 'template': value['template'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorEmailStageRequest.ts b/packages/client-ts/src/models/AuthenticatorEmailStageRequest.ts new file mode 100644 index 0000000000..c08ae23c9c --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorEmailStageRequest.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorEmailStage Serializer + * @export + * @interface AuthenticatorEmailStageRequest + */ +export interface AuthenticatorEmailStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + friendlyName?: string; + /** + * When enabled, global Email connection settings will be used and connection settings below will be ignored. + * @type {boolean} + * @memberof AuthenticatorEmailStageRequest + */ + useGlobalSettings?: boolean; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + host?: string; + /** + * + * @type {number} + * @memberof AuthenticatorEmailStageRequest + */ + port?: number; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + password?: string; + /** + * + * @type {boolean} + * @memberof AuthenticatorEmailStageRequest + */ + useTls?: boolean; + /** + * + * @type {boolean} + * @memberof AuthenticatorEmailStageRequest + */ + useSsl?: boolean; + /** + * + * @type {number} + * @memberof AuthenticatorEmailStageRequest + */ + timeout?: number; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + fromAddress?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + subject?: string; + /** + * Time the token sent is valid (Format: hours=3,minutes=17,seconds=300). + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + tokenExpiry?: string; + /** + * + * @type {string} + * @memberof AuthenticatorEmailStageRequest + */ + template?: string; +} + +/** + * Check if a given object implements the AuthenticatorEmailStageRequest interface. + */ +export function instanceOfAuthenticatorEmailStageRequest(value: object): value is AuthenticatorEmailStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function AuthenticatorEmailStageRequestFromJSON(json: any): AuthenticatorEmailStageRequest { + return AuthenticatorEmailStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorEmailStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEmailStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'useGlobalSettings': json['use_global_settings'] == null ? undefined : json['use_global_settings'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'username': json['username'] == null ? undefined : json['username'], + 'password': json['password'] == null ? undefined : json['password'], + 'useTls': json['use_tls'] == null ? undefined : json['use_tls'], + 'useSsl': json['use_ssl'] == null ? undefined : json['use_ssl'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'fromAddress': json['from_address'] == null ? undefined : json['from_address'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'tokenExpiry': json['token_expiry'] == null ? undefined : json['token_expiry'], + 'template': json['template'] == null ? undefined : json['template'], + }; +} + +export function AuthenticatorEmailStageRequestToJSON(json: any): AuthenticatorEmailStageRequest { + return AuthenticatorEmailStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorEmailStageRequestToJSONTyped(value?: AuthenticatorEmailStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'use_global_settings': value['useGlobalSettings'], + 'host': value['host'], + 'port': value['port'], + 'username': value['username'], + 'password': value['password'], + 'use_tls': value['useTls'], + 'use_ssl': value['useSsl'], + 'timeout': value['timeout'], + 'from_address': value['fromAddress'], + 'subject': value['subject'], + 'token_expiry': value['tokenExpiry'], + 'template': value['template'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorEndpointGDTCStage.ts b/packages/client-ts/src/models/AuthenticatorEndpointGDTCStage.ts new file mode 100644 index 0000000000..2a355ad55d --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorEndpointGDTCStage.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * AuthenticatorEndpointGDTCStage Serializer + * @export + * @interface AuthenticatorEndpointGDTCStage + */ +export interface AuthenticatorEndpointGDTCStage { + /** + * + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorEndpointGDTCStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorEndpointGDTCStage + */ + friendlyName?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AuthenticatorEndpointGDTCStage + */ + credentials: { [key: string]: any; }; +} + +/** + * Check if a given object implements the AuthenticatorEndpointGDTCStage interface. + */ +export function instanceOfAuthenticatorEndpointGDTCStage(value: object): value is AuthenticatorEndpointGDTCStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('credentials' in value) || value['credentials'] === undefined) return false; + return true; +} + +export function AuthenticatorEndpointGDTCStageFromJSON(json: any): AuthenticatorEndpointGDTCStage { + return AuthenticatorEndpointGDTCStageFromJSONTyped(json, false); +} + +export function AuthenticatorEndpointGDTCStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEndpointGDTCStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'credentials': json['credentials'], + }; +} + +export function AuthenticatorEndpointGDTCStageToJSON(json: any): AuthenticatorEndpointGDTCStage { + return AuthenticatorEndpointGDTCStageToJSONTyped(json, false); +} + +export function AuthenticatorEndpointGDTCStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'credentials': value['credentials'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorEndpointGDTCStageRequest.ts b/packages/client-ts/src/models/AuthenticatorEndpointGDTCStageRequest.ts new file mode 100644 index 0000000000..44b876e27a --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorEndpointGDTCStageRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorEndpointGDTCStage Serializer + * @export + * @interface AuthenticatorEndpointGDTCStageRequest + */ +export interface AuthenticatorEndpointGDTCStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorEndpointGDTCStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorEndpointGDTCStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorEndpointGDTCStageRequest + */ + friendlyName?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AuthenticatorEndpointGDTCStageRequest + */ + credentials: { [key: string]: any; }; +} + +/** + * Check if a given object implements the AuthenticatorEndpointGDTCStageRequest interface. + */ +export function instanceOfAuthenticatorEndpointGDTCStageRequest(value: object): value is AuthenticatorEndpointGDTCStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('credentials' in value) || value['credentials'] === undefined) return false; + return true; +} + +export function AuthenticatorEndpointGDTCStageRequestFromJSON(json: any): AuthenticatorEndpointGDTCStageRequest { + return AuthenticatorEndpointGDTCStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorEndpointGDTCStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEndpointGDTCStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'credentials': json['credentials'], + }; +} + +export function AuthenticatorEndpointGDTCStageRequestToJSON(json: any): AuthenticatorEndpointGDTCStageRequest { + return AuthenticatorEndpointGDTCStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorEndpointGDTCStageRequestToJSONTyped(value?: AuthenticatorEndpointGDTCStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'credentials': value['credentials'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorSMSChallenge.ts b/packages/client-ts/src/models/AuthenticatorSMSChallenge.ts new file mode 100644 index 0000000000..68db4f7f9d --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorSMSChallenge.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * SMS Setup challenge + * @export + * @interface AuthenticatorSMSChallenge + */ +export interface AuthenticatorSMSChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorSMSChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorSMSChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorSMSChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorSMSChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {boolean} + * @memberof AuthenticatorSMSChallenge + */ + phoneNumberRequired?: boolean; +} + +/** + * Check if a given object implements the AuthenticatorSMSChallenge interface. + */ +export function instanceOfAuthenticatorSMSChallenge(value: object): value is AuthenticatorSMSChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + return true; +} + +export function AuthenticatorSMSChallengeFromJSON(json: any): AuthenticatorSMSChallenge { + return AuthenticatorSMSChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorSMSChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorSMSChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'phoneNumberRequired': json['phone_number_required'] == null ? undefined : json['phone_number_required'], + }; +} + +export function AuthenticatorSMSChallengeToJSON(json: any): AuthenticatorSMSChallenge { + return AuthenticatorSMSChallengeToJSONTyped(json, false); +} + +export function AuthenticatorSMSChallengeToJSONTyped(value?: AuthenticatorSMSChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'phone_number_required': value['phoneNumberRequired'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorSMSChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorSMSChallengeResponseRequest.ts new file mode 100644 index 0000000000..ecff33671f --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorSMSChallengeResponseRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SMS Challenge response, device is set by get_response_instance + * @export + * @interface AuthenticatorSMSChallengeResponseRequest + */ +export interface AuthenticatorSMSChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorSMSChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSChallengeResponseRequest + */ + code?: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSChallengeResponseRequest + */ + phoneNumber?: string; +} + +/** + * Check if a given object implements the AuthenticatorSMSChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorSMSChallengeResponseRequest(value: object): value is AuthenticatorSMSChallengeResponseRequest { + return true; +} + +export function AuthenticatorSMSChallengeResponseRequestFromJSON(json: any): AuthenticatorSMSChallengeResponseRequest { + return AuthenticatorSMSChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorSMSChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorSMSChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'code': json['code'] == null ? undefined : json['code'], + 'phoneNumber': json['phone_number'] == null ? undefined : json['phone_number'], + }; +} + +export function AuthenticatorSMSChallengeResponseRequestToJSON(json: any): AuthenticatorSMSChallengeResponseRequest { + return AuthenticatorSMSChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorSMSChallengeResponseRequestToJSONTyped(value?: AuthenticatorSMSChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'code': value['code'], + 'phone_number': value['phoneNumber'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorSMSStage.ts b/packages/client-ts/src/models/AuthenticatorSMSStage.ts new file mode 100644 index 0000000000..ead2d350d7 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorSMSStage.ts @@ -0,0 +1,222 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; +import type { ProviderEnum } from './ProviderEnum'; +import { + ProviderEnumFromJSON, + ProviderEnumFromJSONTyped, + ProviderEnumToJSON, + ProviderEnumToJSONTyped, +} from './ProviderEnum'; +import type { AuthTypeEnum } from './AuthTypeEnum'; +import { + AuthTypeEnumFromJSON, + AuthTypeEnumFromJSONTyped, + AuthTypeEnumToJSON, + AuthTypeEnumToJSONTyped, +} from './AuthTypeEnum'; + +/** + * AuthenticatorSMSStage Serializer + * @export + * @interface AuthenticatorSMSStage + */ +export interface AuthenticatorSMSStage { + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorSMSStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorSMSStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorSMSStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorSMSStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorSMSStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorSMSStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + friendlyName?: string; + /** + * + * @type {ProviderEnum} + * @memberof AuthenticatorSMSStage + */ + provider: ProviderEnum; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + fromNumber: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + accountSid: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + auth: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStage + */ + authPassword?: string; + /** + * + * @type {AuthTypeEnum} + * @memberof AuthenticatorSMSStage + */ + 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. + * @type {boolean} + * @memberof AuthenticatorSMSStage + */ + verifyOnly?: boolean; + /** + * Optionally modify the payload being sent to custom providers. + * @type {string} + * @memberof AuthenticatorSMSStage + */ + mapping?: string | null; +} + + + +/** + * Check if a given object implements the AuthenticatorSMSStage interface. + */ +export function instanceOfAuthenticatorSMSStage(value: object): value is AuthenticatorSMSStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('fromNumber' in value) || value['fromNumber'] === undefined) return false; + if (!('accountSid' in value) || value['accountSid'] === undefined) return false; + if (!('auth' in value) || value['auth'] === undefined) return false; + return true; +} + +export function AuthenticatorSMSStageFromJSON(json: any): AuthenticatorSMSStage { + return AuthenticatorSMSStageFromJSONTyped(json, false); +} + +export function AuthenticatorSMSStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorSMSStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'provider': ProviderEnumFromJSON(json['provider']), + 'fromNumber': json['from_number'], + 'accountSid': json['account_sid'], + 'auth': json['auth'], + 'authPassword': json['auth_password'] == null ? undefined : json['auth_password'], + 'authType': json['auth_type'] == null ? undefined : AuthTypeEnumFromJSON(json['auth_type']), + 'verifyOnly': json['verify_only'] == null ? undefined : json['verify_only'], + 'mapping': json['mapping'] == null ? undefined : json['mapping'], + }; +} + +export function AuthenticatorSMSStageToJSON(json: any): AuthenticatorSMSStage { + return AuthenticatorSMSStageToJSONTyped(json, false); +} + +export function AuthenticatorSMSStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'provider': ProviderEnumToJSON(value['provider']), + 'from_number': value['fromNumber'], + 'account_sid': value['accountSid'], + 'auth': value['auth'], + 'auth_password': value['authPassword'], + 'auth_type': AuthTypeEnumToJSON(value['authType']), + 'verify_only': value['verifyOnly'], + 'mapping': value['mapping'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorSMSStageRequest.ts b/packages/client-ts/src/models/AuthenticatorSMSStageRequest.ts new file mode 100644 index 0000000000..052e8ab188 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorSMSStageRequest.ts @@ -0,0 +1,167 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ProviderEnum } from './ProviderEnum'; +import { + ProviderEnumFromJSON, + ProviderEnumFromJSONTyped, + ProviderEnumToJSON, + ProviderEnumToJSONTyped, +} from './ProviderEnum'; +import type { AuthTypeEnum } from './AuthTypeEnum'; +import { + AuthTypeEnumFromJSON, + AuthTypeEnumFromJSONTyped, + AuthTypeEnumToJSON, + AuthTypeEnumToJSONTyped, +} from './AuthTypeEnum'; + +/** + * AuthenticatorSMSStage Serializer + * @export + * @interface AuthenticatorSMSStageRequest + */ +export interface AuthenticatorSMSStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + friendlyName?: string; + /** + * + * @type {ProviderEnum} + * @memberof AuthenticatorSMSStageRequest + */ + provider: ProviderEnum; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + fromNumber: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + accountSid: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + auth: string; + /** + * + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + authPassword?: string; + /** + * + * @type {AuthTypeEnum} + * @memberof AuthenticatorSMSStageRequest + */ + 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. + * @type {boolean} + * @memberof AuthenticatorSMSStageRequest + */ + verifyOnly?: boolean; + /** + * Optionally modify the payload being sent to custom providers. + * @type {string} + * @memberof AuthenticatorSMSStageRequest + */ + mapping?: string | null; +} + + + +/** + * Check if a given object implements the AuthenticatorSMSStageRequest interface. + */ +export function instanceOfAuthenticatorSMSStageRequest(value: object): value is AuthenticatorSMSStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('fromNumber' in value) || value['fromNumber'] === undefined) return false; + if (!('accountSid' in value) || value['accountSid'] === undefined) return false; + if (!('auth' in value) || value['auth'] === undefined) return false; + return true; +} + +export function AuthenticatorSMSStageRequestFromJSON(json: any): AuthenticatorSMSStageRequest { + return AuthenticatorSMSStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorSMSStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorSMSStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'provider': ProviderEnumFromJSON(json['provider']), + 'fromNumber': json['from_number'], + 'accountSid': json['account_sid'], + 'auth': json['auth'], + 'authPassword': json['auth_password'] == null ? undefined : json['auth_password'], + 'authType': json['auth_type'] == null ? undefined : AuthTypeEnumFromJSON(json['auth_type']), + 'verifyOnly': json['verify_only'] == null ? undefined : json['verify_only'], + 'mapping': json['mapping'] == null ? undefined : json['mapping'], + }; +} + +export function AuthenticatorSMSStageRequestToJSON(json: any): AuthenticatorSMSStageRequest { + return AuthenticatorSMSStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorSMSStageRequestToJSONTyped(value?: AuthenticatorSMSStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'provider': ProviderEnumToJSON(value['provider']), + 'from_number': value['fromNumber'], + 'account_sid': value['accountSid'], + 'auth': value['auth'], + 'auth_password': value['authPassword'], + 'auth_type': AuthTypeEnumToJSON(value['authType']), + 'verify_only': value['verifyOnly'], + 'mapping': value['mapping'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorStaticChallenge.ts b/packages/client-ts/src/models/AuthenticatorStaticChallenge.ts new file mode 100644 index 0000000000..b3b109ecc9 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorStaticChallenge.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Static authenticator challenge + * @export + * @interface AuthenticatorStaticChallenge + */ +export interface AuthenticatorStaticChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorStaticChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorStaticChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorStaticChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorStaticChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorStaticChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {Array} + * @memberof AuthenticatorStaticChallenge + */ + codes: Array; +} + +/** + * Check if a given object implements the AuthenticatorStaticChallenge interface. + */ +export function instanceOfAuthenticatorStaticChallenge(value: object): value is AuthenticatorStaticChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('codes' in value) || value['codes'] === undefined) return false; + return true; +} + +export function AuthenticatorStaticChallengeFromJSON(json: any): AuthenticatorStaticChallenge { + return AuthenticatorStaticChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorStaticChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorStaticChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'codes': json['codes'], + }; +} + +export function AuthenticatorStaticChallengeToJSON(json: any): AuthenticatorStaticChallenge { + return AuthenticatorStaticChallengeToJSONTyped(json, false); +} + +export function AuthenticatorStaticChallengeToJSONTyped(value?: AuthenticatorStaticChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'codes': value['codes'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorStaticChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorStaticChallengeResponseRequest.ts new file mode 100644 index 0000000000..9e4d463079 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorStaticChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Pseudo class for static response + * @export + * @interface AuthenticatorStaticChallengeResponseRequest + */ +export interface AuthenticatorStaticChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorStaticChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the AuthenticatorStaticChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorStaticChallengeResponseRequest(value: object): value is AuthenticatorStaticChallengeResponseRequest { + return true; +} + +export function AuthenticatorStaticChallengeResponseRequestFromJSON(json: any): AuthenticatorStaticChallengeResponseRequest { + return AuthenticatorStaticChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorStaticChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorStaticChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function AuthenticatorStaticChallengeResponseRequestToJSON(json: any): AuthenticatorStaticChallengeResponseRequest { + return AuthenticatorStaticChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorStaticChallengeResponseRequestToJSONTyped(value?: AuthenticatorStaticChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorStaticStage.ts b/packages/client-ts/src/models/AuthenticatorStaticStage.ts new file mode 100644 index 0000000000..0c47aaa5b5 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorStaticStage.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * AuthenticatorStaticStage Serializer + * @export + * @interface AuthenticatorStaticStage + */ +export interface AuthenticatorStaticStage { + /** + * + * @type {string} + * @memberof AuthenticatorStaticStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorStaticStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorStaticStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorStaticStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorStaticStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorStaticStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorStaticStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorStaticStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorStaticStage + */ + friendlyName?: string; + /** + * + * @type {number} + * @memberof AuthenticatorStaticStage + */ + tokenCount?: number; + /** + * + * @type {number} + * @memberof AuthenticatorStaticStage + */ + tokenLength?: number; +} + +/** + * Check if a given object implements the AuthenticatorStaticStage interface. + */ +export function instanceOfAuthenticatorStaticStage(value: object): value is AuthenticatorStaticStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function AuthenticatorStaticStageFromJSON(json: any): AuthenticatorStaticStage { + return AuthenticatorStaticStageFromJSONTyped(json, false); +} + +export function AuthenticatorStaticStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorStaticStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'tokenCount': json['token_count'] == null ? undefined : json['token_count'], + 'tokenLength': json['token_length'] == null ? undefined : json['token_length'], + }; +} + +export function AuthenticatorStaticStageToJSON(json: any): AuthenticatorStaticStage { + return AuthenticatorStaticStageToJSONTyped(json, false); +} + +export function AuthenticatorStaticStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'token_count': value['tokenCount'], + 'token_length': value['tokenLength'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorStaticStageRequest.ts b/packages/client-ts/src/models/AuthenticatorStaticStageRequest.ts new file mode 100644 index 0000000000..d39b80a59e --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorStaticStageRequest.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorStaticStage Serializer + * @export + * @interface AuthenticatorStaticStageRequest + */ +export interface AuthenticatorStaticStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorStaticStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorStaticStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorStaticStageRequest + */ + friendlyName?: string; + /** + * + * @type {number} + * @memberof AuthenticatorStaticStageRequest + */ + tokenCount?: number; + /** + * + * @type {number} + * @memberof AuthenticatorStaticStageRequest + */ + tokenLength?: number; +} + +/** + * Check if a given object implements the AuthenticatorStaticStageRequest interface. + */ +export function instanceOfAuthenticatorStaticStageRequest(value: object): value is AuthenticatorStaticStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function AuthenticatorStaticStageRequestFromJSON(json: any): AuthenticatorStaticStageRequest { + return AuthenticatorStaticStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorStaticStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorStaticStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'tokenCount': json['token_count'] == null ? undefined : json['token_count'], + 'tokenLength': json['token_length'] == null ? undefined : json['token_length'], + }; +} + +export function AuthenticatorStaticStageRequestToJSON(json: any): AuthenticatorStaticStageRequest { + return AuthenticatorStaticStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorStaticStageRequestToJSONTyped(value?: AuthenticatorStaticStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'token_count': value['tokenCount'], + 'token_length': value['tokenLength'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorTOTPChallenge.ts b/packages/client-ts/src/models/AuthenticatorTOTPChallenge.ts new file mode 100644 index 0000000000..d4cb2773b7 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorTOTPChallenge.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * TOTP Setup challenge + * @export + * @interface AuthenticatorTOTPChallenge + */ +export interface AuthenticatorTOTPChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorTOTPChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorTOTPChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPChallenge + */ + configUrl: string; +} + +/** + * Check if a given object implements the AuthenticatorTOTPChallenge interface. + */ +export function instanceOfAuthenticatorTOTPChallenge(value: object): value is AuthenticatorTOTPChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('configUrl' in value) || value['configUrl'] === undefined) return false; + return true; +} + +export function AuthenticatorTOTPChallengeFromJSON(json: any): AuthenticatorTOTPChallenge { + return AuthenticatorTOTPChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorTOTPChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorTOTPChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'configUrl': json['config_url'], + }; +} + +export function AuthenticatorTOTPChallengeToJSON(json: any): AuthenticatorTOTPChallenge { + return AuthenticatorTOTPChallengeToJSONTyped(json, false); +} + +export function AuthenticatorTOTPChallengeToJSONTyped(value?: AuthenticatorTOTPChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'config_url': value['configUrl'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorTOTPChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorTOTPChallengeResponseRequest.ts new file mode 100644 index 0000000000..ee5f3fe53e --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorTOTPChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * TOTP Challenge response, device is set by get_response_instance + * @export + * @interface AuthenticatorTOTPChallengeResponseRequest + */ +export interface AuthenticatorTOTPChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorTOTPChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPChallengeResponseRequest + */ + code: string; +} + +/** + * Check if a given object implements the AuthenticatorTOTPChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorTOTPChallengeResponseRequest(value: object): value is AuthenticatorTOTPChallengeResponseRequest { + if (!('code' in value) || value['code'] === undefined) return false; + return true; +} + +export function AuthenticatorTOTPChallengeResponseRequestFromJSON(json: any): AuthenticatorTOTPChallengeResponseRequest { + return AuthenticatorTOTPChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorTOTPChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorTOTPChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'code': json['code'], + }; +} + +export function AuthenticatorTOTPChallengeResponseRequestToJSON(json: any): AuthenticatorTOTPChallengeResponseRequest { + return AuthenticatorTOTPChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorTOTPChallengeResponseRequestToJSONTyped(value?: AuthenticatorTOTPChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'code': value['code'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorTOTPStage.ts b/packages/client-ts/src/models/AuthenticatorTOTPStage.ts new file mode 100644 index 0000000000..9f7b83e7a0 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorTOTPStage.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigitsEnum } from './DigitsEnum'; +import { + DigitsEnumFromJSON, + DigitsEnumFromJSONTyped, + DigitsEnumToJSON, + DigitsEnumToJSONTyped, +} from './DigitsEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * AuthenticatorTOTPStage Serializer + * @export + * @interface AuthenticatorTOTPStage + */ +export interface AuthenticatorTOTPStage { + /** + * + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorTOTPStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPStage + */ + friendlyName?: string; + /** + * + * @type {DigitsEnum} + * @memberof AuthenticatorTOTPStage + */ + digits: DigitsEnum; +} + + + +/** + * Check if a given object implements the AuthenticatorTOTPStage interface. + */ +export function instanceOfAuthenticatorTOTPStage(value: object): value is AuthenticatorTOTPStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('digits' in value) || value['digits'] === undefined) return false; + return true; +} + +export function AuthenticatorTOTPStageFromJSON(json: any): AuthenticatorTOTPStage { + return AuthenticatorTOTPStageFromJSONTyped(json, false); +} + +export function AuthenticatorTOTPStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorTOTPStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'digits': DigitsEnumFromJSON(json['digits']), + }; +} + +export function AuthenticatorTOTPStageToJSON(json: any): AuthenticatorTOTPStage { + return AuthenticatorTOTPStageToJSONTyped(json, false); +} + +export function AuthenticatorTOTPStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'digits': DigitsEnumToJSON(value['digits']), + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorTOTPStageRequest.ts b/packages/client-ts/src/models/AuthenticatorTOTPStageRequest.ts new file mode 100644 index 0000000000..3828d87700 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorTOTPStageRequest.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigitsEnum } from './DigitsEnum'; +import { + DigitsEnumFromJSON, + DigitsEnumFromJSONTyped, + DigitsEnumToJSON, + DigitsEnumToJSONTyped, +} from './DigitsEnum'; + +/** + * AuthenticatorTOTPStage Serializer + * @export + * @interface AuthenticatorTOTPStageRequest + */ +export interface AuthenticatorTOTPStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorTOTPStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorTOTPStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorTOTPStageRequest + */ + friendlyName?: string; + /** + * + * @type {DigitsEnum} + * @memberof AuthenticatorTOTPStageRequest + */ + digits: DigitsEnum; +} + + + +/** + * Check if a given object implements the AuthenticatorTOTPStageRequest interface. + */ +export function instanceOfAuthenticatorTOTPStageRequest(value: object): value is AuthenticatorTOTPStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('digits' in value) || value['digits'] === undefined) return false; + return true; +} + +export function AuthenticatorTOTPStageRequestFromJSON(json: any): AuthenticatorTOTPStageRequest { + return AuthenticatorTOTPStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorTOTPStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorTOTPStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'digits': DigitsEnumFromJSON(json['digits']), + }; +} + +export function AuthenticatorTOTPStageRequestToJSON(json: any): AuthenticatorTOTPStageRequest { + return AuthenticatorTOTPStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorTOTPStageRequestToJSONTyped(value?: AuthenticatorTOTPStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'digits': DigitsEnumToJSON(value['digits']), + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorValidateStage.ts b/packages/client-ts/src/models/AuthenticatorValidateStage.ts new file mode 100644 index 0000000000..26fa2a1c39 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorValidateStage.ts @@ -0,0 +1,223 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WebAuthnHintEnum } from './WebAuthnHintEnum'; +import { + WebAuthnHintEnumFromJSON, + WebAuthnHintEnumFromJSONTyped, + WebAuthnHintEnumToJSON, + WebAuthnHintEnumToJSONTyped, +} from './WebAuthnHintEnum'; +import type { WebAuthnDeviceType } from './WebAuthnDeviceType'; +import { + WebAuthnDeviceTypeFromJSON, + WebAuthnDeviceTypeFromJSONTyped, + WebAuthnDeviceTypeToJSON, + WebAuthnDeviceTypeToJSONTyped, +} from './WebAuthnDeviceType'; +import type { UserVerificationEnum } from './UserVerificationEnum'; +import { + UserVerificationEnumFromJSON, + UserVerificationEnumFromJSONTyped, + UserVerificationEnumToJSON, + UserVerificationEnumToJSONTyped, +} from './UserVerificationEnum'; +import type { NotConfiguredActionEnum } from './NotConfiguredActionEnum'; +import { + NotConfiguredActionEnumFromJSON, + NotConfiguredActionEnumFromJSONTyped, + NotConfiguredActionEnumToJSON, + NotConfiguredActionEnumToJSONTyped, +} from './NotConfiguredActionEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; +import type { DeviceClassesEnum } from './DeviceClassesEnum'; +import { + DeviceClassesEnumFromJSON, + DeviceClassesEnumFromJSONTyped, + DeviceClassesEnumToJSON, + DeviceClassesEnumToJSONTyped, +} from './DeviceClassesEnum'; + +/** + * AuthenticatorValidateStage Serializer + * @export + * @interface AuthenticatorValidateStage + */ +export interface AuthenticatorValidateStage { + /** + * + * @type {string} + * @memberof AuthenticatorValidateStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorValidateStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorValidateStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorValidateStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorValidateStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorValidateStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorValidateStage + */ + readonly flowSet: Array; + /** + * + * @type {NotConfiguredActionEnum} + * @memberof AuthenticatorValidateStage + */ + notConfiguredAction?: NotConfiguredActionEnum; + /** + * Device classes which can be used to authenticate + * @type {Array} + * @memberof AuthenticatorValidateStage + */ + deviceClasses?: Array; + /** + * Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. + * @type {Array} + * @memberof AuthenticatorValidateStage + */ + configurationStages?: Array; + /** + * If any of the user's device has been used within this threshold, this stage will be skipped + * @type {string} + * @memberof AuthenticatorValidateStage + */ + lastAuthThreshold?: string; + /** + * Enforce user verification for WebAuthn devices. + * @type {UserVerificationEnum} + * @memberof AuthenticatorValidateStage + */ + webauthnUserVerification?: UserVerificationEnum; + /** + * + * @type {Array} + * @memberof AuthenticatorValidateStage + */ + webauthnHints?: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorValidateStage + */ + webauthnAllowedDeviceTypes?: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorValidateStage + */ + readonly webauthnAllowedDeviceTypesObj: Array; +} + + + +/** + * Check if a given object implements the AuthenticatorValidateStage interface. + */ +export function instanceOfAuthenticatorValidateStage(value: object): value is AuthenticatorValidateStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('webauthnAllowedDeviceTypesObj' in value) || value['webauthnAllowedDeviceTypesObj'] === undefined) return false; + return true; +} + +export function AuthenticatorValidateStageFromJSON(json: any): AuthenticatorValidateStage { + return AuthenticatorValidateStageFromJSONTyped(json, false); +} + +export function AuthenticatorValidateStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorValidateStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'notConfiguredAction': json['not_configured_action'] == null ? undefined : NotConfiguredActionEnumFromJSON(json['not_configured_action']), + 'deviceClasses': json['device_classes'] == null ? undefined : ((json['device_classes'] as Array).map(DeviceClassesEnumFromJSON)), + 'configurationStages': json['configuration_stages'] == null ? undefined : json['configuration_stages'], + 'lastAuthThreshold': json['last_auth_threshold'] == null ? undefined : json['last_auth_threshold'], + 'webauthnUserVerification': json['webauthn_user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['webauthn_user_verification']), + 'webauthnHints': json['webauthn_hints'] == null ? undefined : ((json['webauthn_hints'] as Array).map(WebAuthnHintEnumFromJSON)), + 'webauthnAllowedDeviceTypes': json['webauthn_allowed_device_types'] == null ? undefined : json['webauthn_allowed_device_types'], + 'webauthnAllowedDeviceTypesObj': ((json['webauthn_allowed_device_types_obj'] as Array).map(WebAuthnDeviceTypeFromJSON)), + }; +} + +export function AuthenticatorValidateStageToJSON(json: any): AuthenticatorValidateStage { + return AuthenticatorValidateStageToJSONTyped(json, false); +} + +export function AuthenticatorValidateStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'not_configured_action': NotConfiguredActionEnumToJSON(value['notConfiguredAction']), + 'device_classes': value['deviceClasses'] == null ? undefined : ((value['deviceClasses'] as Array).map(DeviceClassesEnumToJSON)), + 'configuration_stages': value['configurationStages'], + 'last_auth_threshold': value['lastAuthThreshold'], + 'webauthn_user_verification': UserVerificationEnumToJSON(value['webauthnUserVerification']), + 'webauthn_hints': value['webauthnHints'] == null ? undefined : ((value['webauthnHints'] as Array).map(WebAuthnHintEnumToJSON)), + 'webauthn_allowed_device_types': value['webauthnAllowedDeviceTypes'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorValidateStageRequest.ts b/packages/client-ts/src/models/AuthenticatorValidateStageRequest.ts new file mode 100644 index 0000000000..1cac15b2db --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorValidateStageRequest.ts @@ -0,0 +1,153 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WebAuthnHintEnum } from './WebAuthnHintEnum'; +import { + WebAuthnHintEnumFromJSON, + WebAuthnHintEnumFromJSONTyped, + WebAuthnHintEnumToJSON, + WebAuthnHintEnumToJSONTyped, +} from './WebAuthnHintEnum'; +import type { UserVerificationEnum } from './UserVerificationEnum'; +import { + UserVerificationEnumFromJSON, + UserVerificationEnumFromJSONTyped, + UserVerificationEnumToJSON, + UserVerificationEnumToJSONTyped, +} from './UserVerificationEnum'; +import type { NotConfiguredActionEnum } from './NotConfiguredActionEnum'; +import { + NotConfiguredActionEnumFromJSON, + NotConfiguredActionEnumFromJSONTyped, + NotConfiguredActionEnumToJSON, + NotConfiguredActionEnumToJSONTyped, +} from './NotConfiguredActionEnum'; +import type { DeviceClassesEnum } from './DeviceClassesEnum'; +import { + DeviceClassesEnumFromJSON, + DeviceClassesEnumFromJSONTyped, + DeviceClassesEnumToJSON, + DeviceClassesEnumToJSONTyped, +} from './DeviceClassesEnum'; + +/** + * AuthenticatorValidateStage Serializer + * @export + * @interface AuthenticatorValidateStageRequest + */ +export interface AuthenticatorValidateStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorValidateStageRequest + */ + name: string; + /** + * + * @type {NotConfiguredActionEnum} + * @memberof AuthenticatorValidateStageRequest + */ + notConfiguredAction?: NotConfiguredActionEnum; + /** + * Device classes which can be used to authenticate + * @type {Array} + * @memberof AuthenticatorValidateStageRequest + */ + deviceClasses?: Array; + /** + * Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. + * @type {Array} + * @memberof AuthenticatorValidateStageRequest + */ + configurationStages?: Array; + /** + * If any of the user's device has been used within this threshold, this stage will be skipped + * @type {string} + * @memberof AuthenticatorValidateStageRequest + */ + lastAuthThreshold?: string; + /** + * Enforce user verification for WebAuthn devices. + * @type {UserVerificationEnum} + * @memberof AuthenticatorValidateStageRequest + */ + webauthnUserVerification?: UserVerificationEnum; + /** + * + * @type {Array} + * @memberof AuthenticatorValidateStageRequest + */ + webauthnHints?: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorValidateStageRequest + */ + webauthnAllowedDeviceTypes?: Array; +} + + + +/** + * Check if a given object implements the AuthenticatorValidateStageRequest interface. + */ +export function instanceOfAuthenticatorValidateStageRequest(value: object): value is AuthenticatorValidateStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function AuthenticatorValidateStageRequestFromJSON(json: any): AuthenticatorValidateStageRequest { + return AuthenticatorValidateStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorValidateStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorValidateStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'notConfiguredAction': json['not_configured_action'] == null ? undefined : NotConfiguredActionEnumFromJSON(json['not_configured_action']), + 'deviceClasses': json['device_classes'] == null ? undefined : ((json['device_classes'] as Array).map(DeviceClassesEnumFromJSON)), + 'configurationStages': json['configuration_stages'] == null ? undefined : json['configuration_stages'], + 'lastAuthThreshold': json['last_auth_threshold'] == null ? undefined : json['last_auth_threshold'], + 'webauthnUserVerification': json['webauthn_user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['webauthn_user_verification']), + 'webauthnHints': json['webauthn_hints'] == null ? undefined : ((json['webauthn_hints'] as Array).map(WebAuthnHintEnumFromJSON)), + 'webauthnAllowedDeviceTypes': json['webauthn_allowed_device_types'] == null ? undefined : json['webauthn_allowed_device_types'], + }; +} + +export function AuthenticatorValidateStageRequestToJSON(json: any): AuthenticatorValidateStageRequest { + return AuthenticatorValidateStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorValidateStageRequestToJSONTyped(value?: AuthenticatorValidateStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'not_configured_action': NotConfiguredActionEnumToJSON(value['notConfiguredAction']), + 'device_classes': value['deviceClasses'] == null ? undefined : ((value['deviceClasses'] as Array).map(DeviceClassesEnumToJSON)), + 'configuration_stages': value['configurationStages'], + 'last_auth_threshold': value['lastAuthThreshold'], + 'webauthn_user_verification': UserVerificationEnumToJSON(value['webauthnUserVerification']), + 'webauthn_hints': value['webauthnHints'] == null ? undefined : ((value['webauthnHints'] as Array).map(WebAuthnHintEnumToJSON)), + 'webauthn_allowed_device_types': value['webauthnAllowedDeviceTypes'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorValidationChallenge.ts b/packages/client-ts/src/models/AuthenticatorValidationChallenge.ts new file mode 100644 index 0000000000..d4c727ab02 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorValidationChallenge.ts @@ -0,0 +1,146 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; +import type { SelectableStage } from './SelectableStage'; +import { + SelectableStageFromJSON, + SelectableStageFromJSONTyped, + SelectableStageToJSON, + SelectableStageToJSONTyped, +} from './SelectableStage'; +import type { DeviceChallenge } from './DeviceChallenge'; +import { + DeviceChallengeFromJSON, + DeviceChallengeFromJSONTyped, + DeviceChallengeToJSON, + DeviceChallengeToJSONTyped, +} from './DeviceChallenge'; + +/** + * Authenticator challenge + * @export + * @interface AuthenticatorValidationChallenge + */ +export interface AuthenticatorValidationChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorValidationChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorValidationChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorValidationChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorValidationChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorValidationChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {Array} + * @memberof AuthenticatorValidationChallenge + */ + deviceChallenges: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorValidationChallenge + */ + configurationStages: Array; +} + +/** + * Check if a given object implements the AuthenticatorValidationChallenge interface. + */ +export function instanceOfAuthenticatorValidationChallenge(value: object): value is AuthenticatorValidationChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('deviceChallenges' in value) || value['deviceChallenges'] === undefined) return false; + if (!('configurationStages' in value) || value['configurationStages'] === undefined) return false; + return true; +} + +export function AuthenticatorValidationChallengeFromJSON(json: any): AuthenticatorValidationChallenge { + return AuthenticatorValidationChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorValidationChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorValidationChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'deviceChallenges': ((json['device_challenges'] as Array).map(DeviceChallengeFromJSON)), + 'configurationStages': ((json['configuration_stages'] as Array).map(SelectableStageFromJSON)), + }; +} + +export function AuthenticatorValidationChallengeToJSON(json: any): AuthenticatorValidationChallenge { + return AuthenticatorValidationChallengeToJSONTyped(json, false); +} + +export function AuthenticatorValidationChallengeToJSONTyped(value?: AuthenticatorValidationChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'device_challenges': ((value['deviceChallenges'] as Array).map(DeviceChallengeToJSON)), + 'configuration_stages': ((value['configurationStages'] as Array).map(SelectableStageToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorValidationChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorValidationChallengeResponseRequest.ts new file mode 100644 index 0000000000..3a4ab4db0b --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorValidationChallengeResponseRequest.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceChallengeRequest } from './DeviceChallengeRequest'; +import { + DeviceChallengeRequestFromJSON, + DeviceChallengeRequestFromJSONTyped, + DeviceChallengeRequestToJSON, + DeviceChallengeRequestToJSONTyped, +} from './DeviceChallengeRequest'; + +/** + * Challenge used for Code-based and WebAuthn authenticators + * @export + * @interface AuthenticatorValidationChallengeResponseRequest + */ +export interface AuthenticatorValidationChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorValidationChallengeResponseRequest + */ + component?: string; + /** + * + * @type {DeviceChallengeRequest} + * @memberof AuthenticatorValidationChallengeResponseRequest + */ + selectedChallenge?: DeviceChallengeRequest; + /** + * + * @type {string} + * @memberof AuthenticatorValidationChallengeResponseRequest + */ + selectedStage?: string; + /** + * + * @type {string} + * @memberof AuthenticatorValidationChallengeResponseRequest + */ + code?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AuthenticatorValidationChallengeResponseRequest + */ + webauthn?: { [key: string]: any; }; + /** + * + * @type {number} + * @memberof AuthenticatorValidationChallengeResponseRequest + */ + duo?: number; +} + +/** + * Check if a given object implements the AuthenticatorValidationChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorValidationChallengeResponseRequest(value: object): value is AuthenticatorValidationChallengeResponseRequest { + return true; +} + +export function AuthenticatorValidationChallengeResponseRequestFromJSON(json: any): AuthenticatorValidationChallengeResponseRequest { + return AuthenticatorValidationChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorValidationChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorValidationChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'selectedChallenge': json['selected_challenge'] == null ? undefined : DeviceChallengeRequestFromJSON(json['selected_challenge']), + 'selectedStage': json['selected_stage'] == null ? undefined : json['selected_stage'], + 'code': json['code'] == null ? undefined : json['code'], + 'webauthn': json['webauthn'] == null ? undefined : json['webauthn'], + 'duo': json['duo'] == null ? undefined : json['duo'], + }; +} + +export function AuthenticatorValidationChallengeResponseRequestToJSON(json: any): AuthenticatorValidationChallengeResponseRequest { + return AuthenticatorValidationChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorValidationChallengeResponseRequestToJSONTyped(value?: AuthenticatorValidationChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'selected_challenge': DeviceChallengeRequestToJSON(value['selectedChallenge']), + 'selected_stage': value['selectedStage'], + 'code': value['code'], + 'webauthn': value['webauthn'], + 'duo': value['duo'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorWebAuthnChallenge.ts b/packages/client-ts/src/models/AuthenticatorWebAuthnChallenge.ts new file mode 100644 index 0000000000..27ecf20cb3 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorWebAuthnChallenge.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * WebAuthn Challenge + * @export + * @interface AuthenticatorWebAuthnChallenge + */ +export interface AuthenticatorWebAuthnChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AuthenticatorWebAuthnChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AuthenticatorWebAuthnChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AuthenticatorWebAuthnChallenge + */ + registration: { [key: string]: any; }; +} + +/** + * Check if a given object implements the AuthenticatorWebAuthnChallenge interface. + */ +export function instanceOfAuthenticatorWebAuthnChallenge(value: object): value is AuthenticatorWebAuthnChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('registration' in value) || value['registration'] === undefined) return false; + return true; +} + +export function AuthenticatorWebAuthnChallengeFromJSON(json: any): AuthenticatorWebAuthnChallenge { + return AuthenticatorWebAuthnChallengeFromJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorWebAuthnChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'registration': json['registration'], + }; +} + +export function AuthenticatorWebAuthnChallengeToJSON(json: any): AuthenticatorWebAuthnChallenge { + return AuthenticatorWebAuthnChallengeToJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnChallengeToJSONTyped(value?: AuthenticatorWebAuthnChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'registration': value['registration'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorWebAuthnChallengeResponseRequest.ts b/packages/client-ts/src/models/AuthenticatorWebAuthnChallengeResponseRequest.ts new file mode 100644 index 0000000000..489af7931f --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorWebAuthnChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * WebAuthn Challenge response + * @export + * @interface AuthenticatorWebAuthnChallengeResponseRequest + */ +export interface AuthenticatorWebAuthnChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnChallengeResponseRequest + */ + component?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof AuthenticatorWebAuthnChallengeResponseRequest + */ + response: { [key: string]: any; }; +} + +/** + * Check if a given object implements the AuthenticatorWebAuthnChallengeResponseRequest interface. + */ +export function instanceOfAuthenticatorWebAuthnChallengeResponseRequest(value: object): value is AuthenticatorWebAuthnChallengeResponseRequest { + if (!('response' in value) || value['response'] === undefined) return false; + return true; +} + +export function AuthenticatorWebAuthnChallengeResponseRequestFromJSON(json: any): AuthenticatorWebAuthnChallengeResponseRequest { + return AuthenticatorWebAuthnChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorWebAuthnChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'response': json['response'], + }; +} + +export function AuthenticatorWebAuthnChallengeResponseRequestToJSON(json: any): AuthenticatorWebAuthnChallengeResponseRequest { + return AuthenticatorWebAuthnChallengeResponseRequestToJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnChallengeResponseRequestToJSONTyped(value?: AuthenticatorWebAuthnChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'response': value['response'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorWebAuthnStage.ts b/packages/client-ts/src/models/AuthenticatorWebAuthnStage.ts new file mode 100644 index 0000000000..4a7f35c626 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorWebAuthnStage.ts @@ -0,0 +1,224 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WebAuthnHintEnum } from './WebAuthnHintEnum'; +import { + WebAuthnHintEnumFromJSON, + WebAuthnHintEnumFromJSONTyped, + WebAuthnHintEnumToJSON, + WebAuthnHintEnumToJSONTyped, +} from './WebAuthnHintEnum'; +import type { WebAuthnDeviceType } from './WebAuthnDeviceType'; +import { + WebAuthnDeviceTypeFromJSON, + WebAuthnDeviceTypeFromJSONTyped, + WebAuthnDeviceTypeToJSON, + WebAuthnDeviceTypeToJSONTyped, +} from './WebAuthnDeviceType'; +import type { UserVerificationEnum } from './UserVerificationEnum'; +import { + UserVerificationEnumFromJSON, + UserVerificationEnumFromJSONTyped, + UserVerificationEnumToJSON, + UserVerificationEnumToJSONTyped, +} from './UserVerificationEnum'; +import type { AuthenticatorAttachmentEnum } from './AuthenticatorAttachmentEnum'; +import { + AuthenticatorAttachmentEnumFromJSON, + AuthenticatorAttachmentEnumFromJSONTyped, + AuthenticatorAttachmentEnumToJSON, + AuthenticatorAttachmentEnumToJSONTyped, +} from './AuthenticatorAttachmentEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * AuthenticatorWebAuthnStage Serializer + * @export + * @interface AuthenticatorWebAuthnStage + */ +export interface AuthenticatorWebAuthnStage { + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof AuthenticatorWebAuthnStage + */ + readonly flowSet: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnStage + */ + friendlyName?: string; + /** + * + * @type {UserVerificationEnum} + * @memberof AuthenticatorWebAuthnStage + */ + userVerification?: UserVerificationEnum; + /** + * + * @type {AuthenticatorAttachmentEnum} + * @memberof AuthenticatorWebAuthnStage + */ + authenticatorAttachment?: AuthenticatorAttachmentEnum | null; + /** + * + * @type {UserVerificationEnum} + * @memberof AuthenticatorWebAuthnStage + */ + residentKeyRequirement?: UserVerificationEnum; + /** + * + * @type {Array} + * @memberof AuthenticatorWebAuthnStage + */ + hints?: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorWebAuthnStage + */ + deviceTypeRestrictions?: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorWebAuthnStage + */ + readonly deviceTypeRestrictionsObj: Array; + /** + * + * @type {number} + * @memberof AuthenticatorWebAuthnStage + */ + maxAttempts?: number; +} + + + +/** + * Check if a given object implements the AuthenticatorWebAuthnStage interface. + */ +export function instanceOfAuthenticatorWebAuthnStage(value: object): value is AuthenticatorWebAuthnStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('deviceTypeRestrictionsObj' in value) || value['deviceTypeRestrictionsObj'] === undefined) return false; + return true; +} + +export function AuthenticatorWebAuthnStageFromJSON(json: any): AuthenticatorWebAuthnStage { + return AuthenticatorWebAuthnStageFromJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorWebAuthnStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'userVerification': json['user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['user_verification']), + 'authenticatorAttachment': json['authenticator_attachment'] == null ? undefined : AuthenticatorAttachmentEnumFromJSON(json['authenticator_attachment']), + 'residentKeyRequirement': json['resident_key_requirement'] == null ? undefined : UserVerificationEnumFromJSON(json['resident_key_requirement']), + 'hints': json['hints'] == null ? undefined : ((json['hints'] as Array).map(WebAuthnHintEnumFromJSON)), + 'deviceTypeRestrictions': json['device_type_restrictions'] == null ? undefined : json['device_type_restrictions'], + 'deviceTypeRestrictionsObj': ((json['device_type_restrictions_obj'] as Array).map(WebAuthnDeviceTypeFromJSON)), + 'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'], + }; +} + +export function AuthenticatorWebAuthnStageToJSON(json: any): AuthenticatorWebAuthnStage { + return AuthenticatorWebAuthnStageToJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'user_verification': UserVerificationEnumToJSON(value['userVerification']), + 'authenticator_attachment': AuthenticatorAttachmentEnumToJSON(value['authenticatorAttachment']), + 'resident_key_requirement': UserVerificationEnumToJSON(value['residentKeyRequirement']), + 'hints': value['hints'] == null ? undefined : ((value['hints'] as Array).map(WebAuthnHintEnumToJSON)), + 'device_type_restrictions': value['deviceTypeRestrictions'], + 'max_attempts': value['maxAttempts'], + }; +} + diff --git a/packages/client-ts/src/models/AuthenticatorWebAuthnStageRequest.ts b/packages/client-ts/src/models/AuthenticatorWebAuthnStageRequest.ts new file mode 100644 index 0000000000..170a360bd0 --- /dev/null +++ b/packages/client-ts/src/models/AuthenticatorWebAuthnStageRequest.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WebAuthnHintEnum } from './WebAuthnHintEnum'; +import { + WebAuthnHintEnumFromJSON, + WebAuthnHintEnumFromJSONTyped, + WebAuthnHintEnumToJSON, + WebAuthnHintEnumToJSONTyped, +} from './WebAuthnHintEnum'; +import type { UserVerificationEnum } from './UserVerificationEnum'; +import { + UserVerificationEnumFromJSON, + UserVerificationEnumFromJSONTyped, + UserVerificationEnumToJSON, + UserVerificationEnumToJSONTyped, +} from './UserVerificationEnum'; +import type { AuthenticatorAttachmentEnum } from './AuthenticatorAttachmentEnum'; +import { + AuthenticatorAttachmentEnumFromJSON, + AuthenticatorAttachmentEnumFromJSONTyped, + AuthenticatorAttachmentEnumToJSON, + AuthenticatorAttachmentEnumToJSONTyped, +} from './AuthenticatorAttachmentEnum'; + +/** + * AuthenticatorWebAuthnStage Serializer + * @export + * @interface AuthenticatorWebAuthnStageRequest + */ +export interface AuthenticatorWebAuthnStageRequest { + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnStageRequest + */ + name: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof AuthenticatorWebAuthnStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof AuthenticatorWebAuthnStageRequest + */ + friendlyName?: string; + /** + * + * @type {UserVerificationEnum} + * @memberof AuthenticatorWebAuthnStageRequest + */ + userVerification?: UserVerificationEnum; + /** + * + * @type {AuthenticatorAttachmentEnum} + * @memberof AuthenticatorWebAuthnStageRequest + */ + authenticatorAttachment?: AuthenticatorAttachmentEnum | null; + /** + * + * @type {UserVerificationEnum} + * @memberof AuthenticatorWebAuthnStageRequest + */ + residentKeyRequirement?: UserVerificationEnum; + /** + * + * @type {Array} + * @memberof AuthenticatorWebAuthnStageRequest + */ + hints?: Array; + /** + * + * @type {Array} + * @memberof AuthenticatorWebAuthnStageRequest + */ + deviceTypeRestrictions?: Array; + /** + * + * @type {number} + * @memberof AuthenticatorWebAuthnStageRequest + */ + maxAttempts?: number; +} + + + +/** + * Check if a given object implements the AuthenticatorWebAuthnStageRequest interface. + */ +export function instanceOfAuthenticatorWebAuthnStageRequest(value: object): value is AuthenticatorWebAuthnStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function AuthenticatorWebAuthnStageRequestFromJSON(json: any): AuthenticatorWebAuthnStageRequest { + return AuthenticatorWebAuthnStageRequestFromJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorWebAuthnStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'userVerification': json['user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['user_verification']), + 'authenticatorAttachment': json['authenticator_attachment'] == null ? undefined : AuthenticatorAttachmentEnumFromJSON(json['authenticator_attachment']), + 'residentKeyRequirement': json['resident_key_requirement'] == null ? undefined : UserVerificationEnumFromJSON(json['resident_key_requirement']), + 'hints': json['hints'] == null ? undefined : ((json['hints'] as Array).map(WebAuthnHintEnumFromJSON)), + 'deviceTypeRestrictions': json['device_type_restrictions'] == null ? undefined : json['device_type_restrictions'], + 'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'], + }; +} + +export function AuthenticatorWebAuthnStageRequestToJSON(json: any): AuthenticatorWebAuthnStageRequest { + return AuthenticatorWebAuthnStageRequestToJSONTyped(json, false); +} + +export function AuthenticatorWebAuthnStageRequestToJSONTyped(value?: AuthenticatorWebAuthnStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'user_verification': UserVerificationEnumToJSON(value['userVerification']), + 'authenticator_attachment': AuthenticatorAttachmentEnumToJSON(value['authenticatorAttachment']), + 'resident_key_requirement': UserVerificationEnumToJSON(value['residentKeyRequirement']), + 'hints': value['hints'] == null ? undefined : ((value['hints'] as Array).map(WebAuthnHintEnumToJSON)), + 'device_type_restrictions': value['deviceTypeRestrictions'], + 'max_attempts': value['maxAttempts'], + }; +} + diff --git a/packages/client-ts/src/models/AuthorizationCodeAuthMethodEnum.ts b/packages/client-ts/src/models/AuthorizationCodeAuthMethodEnum.ts new file mode 100644 index 0000000000..f299fa8ac9 --- /dev/null +++ b/packages/client-ts/src/models/AuthorizationCodeAuthMethodEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const AuthorizationCodeAuthMethodEnum = { + BasicAuth: 'basic_auth', + PostBody: 'post_body', + UnknownDefaultOpenApi: '11184809' +} as const; +export type AuthorizationCodeAuthMethodEnum = typeof AuthorizationCodeAuthMethodEnum[keyof typeof AuthorizationCodeAuthMethodEnum]; + + +export function instanceOfAuthorizationCodeAuthMethodEnum(value: any): boolean { + for (const key in AuthorizationCodeAuthMethodEnum) { + if (Object.prototype.hasOwnProperty.call(AuthorizationCodeAuthMethodEnum, key)) { + if (AuthorizationCodeAuthMethodEnum[key as keyof typeof AuthorizationCodeAuthMethodEnum] === value) { + return true; + } + } + } + return false; +} + +export function AuthorizationCodeAuthMethodEnumFromJSON(json: any): AuthorizationCodeAuthMethodEnum { + return AuthorizationCodeAuthMethodEnumFromJSONTyped(json, false); +} + +export function AuthorizationCodeAuthMethodEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthorizationCodeAuthMethodEnum { + return json as AuthorizationCodeAuthMethodEnum; +} + +export function AuthorizationCodeAuthMethodEnumToJSON(value?: AuthorizationCodeAuthMethodEnum | null): any { + return value as any; +} + +export function AuthorizationCodeAuthMethodEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AuthorizationCodeAuthMethodEnum { + return value as AuthorizationCodeAuthMethodEnum; +} + diff --git a/packages/client-ts/src/models/AutoSubmitChallengeResponseRequest.ts b/packages/client-ts/src/models/AutoSubmitChallengeResponseRequest.ts new file mode 100644 index 0000000000..d102d8a4c7 --- /dev/null +++ b/packages/client-ts/src/models/AutoSubmitChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Pseudo class for autosubmit response + * @export + * @interface AutoSubmitChallengeResponseRequest + */ +export interface AutoSubmitChallengeResponseRequest { + /** + * + * @type {string} + * @memberof AutoSubmitChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the AutoSubmitChallengeResponseRequest interface. + */ +export function instanceOfAutoSubmitChallengeResponseRequest(value: object): value is AutoSubmitChallengeResponseRequest { + return true; +} + +export function AutoSubmitChallengeResponseRequestFromJSON(json: any): AutoSubmitChallengeResponseRequest { + return AutoSubmitChallengeResponseRequestFromJSONTyped(json, false); +} + +export function AutoSubmitChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoSubmitChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function AutoSubmitChallengeResponseRequestToJSON(json: any): AutoSubmitChallengeResponseRequest { + return AutoSubmitChallengeResponseRequestToJSONTyped(json, false); +} + +export function AutoSubmitChallengeResponseRequestToJSONTyped(value?: AutoSubmitChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/AutosubmitChallenge.ts b/packages/client-ts/src/models/AutosubmitChallenge.ts new file mode 100644 index 0000000000..989e3081b8 --- /dev/null +++ b/packages/client-ts/src/models/AutosubmitChallenge.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Autosubmit challenge used to send and navigate a POST request + * @export + * @interface AutosubmitChallenge + */ +export interface AutosubmitChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof AutosubmitChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof AutosubmitChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof AutosubmitChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof AutosubmitChallenge + */ + url: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof AutosubmitChallenge + */ + attrs: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof AutosubmitChallenge + */ + title?: string; +} + +/** + * Check if a given object implements the AutosubmitChallenge interface. + */ +export function instanceOfAutosubmitChallenge(value: object): value is AutosubmitChallenge { + if (!('url' in value) || value['url'] === undefined) return false; + if (!('attrs' in value) || value['attrs'] === undefined) return false; + return true; +} + +export function AutosubmitChallengeFromJSON(json: any): AutosubmitChallenge { + return AutosubmitChallengeFromJSONTyped(json, false); +} + +export function AutosubmitChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutosubmitChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'url': json['url'], + 'attrs': json['attrs'], + 'title': json['title'] == null ? undefined : json['title'], + }; +} + +export function AutosubmitChallengeToJSON(json: any): AutosubmitChallenge { + return AutosubmitChallengeToJSONTyped(json, false); +} + +export function AutosubmitChallengeToJSONTyped(value?: AutosubmitChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'url': value['url'], + 'attrs': value['attrs'], + 'title': value['title'], + }; +} + diff --git a/packages/client-ts/src/models/BackendsEnum.ts b/packages/client-ts/src/models/BackendsEnum.ts new file mode 100644 index 0000000000..3d2342ef34 --- /dev/null +++ b/packages/client-ts/src/models/BackendsEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const BackendsEnum = { + AuthentikCoreAuthInbuiltBackend: 'authentik.core.auth.InbuiltBackend', + AuthentikCoreAuthTokenBackend: 'authentik.core.auth.TokenBackend', + AuthentikSourcesLdapAuthLdapBackend: 'authentik.sources.ldap.auth.LDAPBackend', + AuthentikSourcesKerberosAuthKerberosBackend: 'authentik.sources.kerberos.auth.KerberosBackend', + UnknownDefaultOpenApi: '11184809' +} as const; +export type BackendsEnum = typeof BackendsEnum[keyof typeof BackendsEnum]; + + +export function instanceOfBackendsEnum(value: any): boolean { + for (const key in BackendsEnum) { + if (Object.prototype.hasOwnProperty.call(BackendsEnum, key)) { + if (BackendsEnum[key as keyof typeof BackendsEnum] === value) { + return true; + } + } + } + return false; +} + +export function BackendsEnumFromJSON(json: any): BackendsEnum { + return BackendsEnumFromJSONTyped(json, false); +} + +export function BackendsEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): BackendsEnum { + return json as BackendsEnum; +} + +export function BackendsEnumToJSON(value?: BackendsEnum | null): any { + return value as any; +} + +export function BackendsEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): BackendsEnum { + return value as BackendsEnum; +} + diff --git a/packages/client-ts/src/models/BindingTypeEnum.ts b/packages/client-ts/src/models/BindingTypeEnum.ts new file mode 100644 index 0000000000..d6597ba2fe --- /dev/null +++ b/packages/client-ts/src/models/BindingTypeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const BindingTypeEnum = { + Redirect: 'REDIRECT', + Post: 'POST', + PostAuto: 'POST_AUTO', + UnknownDefaultOpenApi: '11184809' +} as const; +export type BindingTypeEnum = typeof BindingTypeEnum[keyof typeof BindingTypeEnum]; + + +export function instanceOfBindingTypeEnum(value: any): boolean { + for (const key in BindingTypeEnum) { + if (Object.prototype.hasOwnProperty.call(BindingTypeEnum, key)) { + if (BindingTypeEnum[key as keyof typeof BindingTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function BindingTypeEnumFromJSON(json: any): BindingTypeEnum { + return BindingTypeEnumFromJSONTyped(json, false); +} + +export function BindingTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): BindingTypeEnum { + return json as BindingTypeEnum; +} + +export function BindingTypeEnumToJSON(value?: BindingTypeEnum | null): any { + return value as any; +} + +export function BindingTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): BindingTypeEnum { + return value as BindingTypeEnum; +} + diff --git a/packages/client-ts/src/models/BlueprintFile.ts b/packages/client-ts/src/models/BlueprintFile.ts new file mode 100644 index 0000000000..6d2b34770e --- /dev/null +++ b/packages/client-ts/src/models/BlueprintFile.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Metadata } from './Metadata'; +import { + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './Metadata'; + +/** + * + * @export + * @interface BlueprintFile + */ +export interface BlueprintFile { + /** + * + * @type {string} + * @memberof BlueprintFile + */ + path: string; + /** + * + * @type {Date} + * @memberof BlueprintFile + */ + lastM: Date; + /** + * + * @type {string} + * @memberof BlueprintFile + */ + hash: string; + /** + * + * @type {Metadata} + * @memberof BlueprintFile + */ + readonly meta: Metadata; +} + +/** + * Check if a given object implements the BlueprintFile interface. + */ +export function instanceOfBlueprintFile(value: object): value is BlueprintFile { + if (!('path' in value) || value['path'] === undefined) return false; + if (!('lastM' in value) || value['lastM'] === undefined) return false; + if (!('hash' in value) || value['hash'] === undefined) return false; + if (!('meta' in value) || value['meta'] === undefined) return false; + return true; +} + +export function BlueprintFileFromJSON(json: any): BlueprintFile { + return BlueprintFileFromJSONTyped(json, false); +} + +export function BlueprintFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlueprintFile { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'lastM': (new Date(json['last_m'])), + 'hash': json['hash'], + 'meta': MetadataFromJSON(json['meta']), + }; +} + +export function BlueprintFileToJSON(json: any): BlueprintFile { + return BlueprintFileToJSONTyped(json, false); +} + +export function BlueprintFileToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'path': value['path'], + 'last_m': value['lastM'].toISOString(), + 'hash': value['hash'], + }; +} + diff --git a/packages/client-ts/src/models/BlueprintInstance.ts b/packages/client-ts/src/models/BlueprintInstance.ts new file mode 100644 index 0000000000..9c370e890f --- /dev/null +++ b/packages/client-ts/src/models/BlueprintInstance.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { BlueprintInstanceStatusEnum } from './BlueprintInstanceStatusEnum'; +import { + BlueprintInstanceStatusEnumFromJSON, + BlueprintInstanceStatusEnumFromJSONTyped, + BlueprintInstanceStatusEnumToJSON, + BlueprintInstanceStatusEnumToJSONTyped, +} from './BlueprintInstanceStatusEnum'; + +/** + * Info about a single blueprint instance file + * @export + * @interface BlueprintInstance + */ +export interface BlueprintInstance { + /** + * + * @type {string} + * @memberof BlueprintInstance + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof BlueprintInstance + */ + name: string; + /** + * + * @type {string} + * @memberof BlueprintInstance + */ + path?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof BlueprintInstance + */ + context?: { [key: string]: any; }; + /** + * + * @type {Date} + * @memberof BlueprintInstance + */ + readonly lastApplied: Date; + /** + * + * @type {string} + * @memberof BlueprintInstance + */ + readonly lastAppliedHash: string; + /** + * + * @type {BlueprintInstanceStatusEnum} + * @memberof BlueprintInstance + */ + readonly status: BlueprintInstanceStatusEnum; + /** + * + * @type {boolean} + * @memberof BlueprintInstance + */ + enabled?: boolean; + /** + * + * @type {Array} + * @memberof BlueprintInstance + */ + readonly managedModels: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof BlueprintInstance + */ + readonly metadata: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof BlueprintInstance + */ + content?: string; +} + + + +/** + * Check if a given object implements the BlueprintInstance interface. + */ +export function instanceOfBlueprintInstance(value: object): value is BlueprintInstance { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('lastApplied' in value) || value['lastApplied'] === undefined) return false; + if (!('lastAppliedHash' in value) || value['lastAppliedHash'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('managedModels' in value) || value['managedModels'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + return true; +} + +export function BlueprintInstanceFromJSON(json: any): BlueprintInstance { + return BlueprintInstanceFromJSONTyped(json, false); +} + +export function BlueprintInstanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlueprintInstance { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'path': json['path'] == null ? undefined : json['path'], + 'context': json['context'] == null ? undefined : json['context'], + 'lastApplied': (new Date(json['last_applied'])), + 'lastAppliedHash': json['last_applied_hash'], + 'status': BlueprintInstanceStatusEnumFromJSON(json['status']), + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'managedModels': json['managed_models'], + 'metadata': json['metadata'], + 'content': json['content'] == null ? undefined : json['content'], + }; +} + +export function BlueprintInstanceToJSON(json: any): BlueprintInstance { + return BlueprintInstanceToJSONTyped(json, false); +} + +export function BlueprintInstanceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'path': value['path'], + 'context': value['context'], + 'enabled': value['enabled'], + 'content': value['content'], + }; +} + diff --git a/packages/client-ts/src/models/BlueprintInstanceRequest.ts b/packages/client-ts/src/models/BlueprintInstanceRequest.ts new file mode 100644 index 0000000000..e70fc67f5f --- /dev/null +++ b/packages/client-ts/src/models/BlueprintInstanceRequest.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Info about a single blueprint instance file + * @export + * @interface BlueprintInstanceRequest + */ +export interface BlueprintInstanceRequest { + /** + * + * @type {string} + * @memberof BlueprintInstanceRequest + */ + name: string; + /** + * + * @type {string} + * @memberof BlueprintInstanceRequest + */ + path?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof BlueprintInstanceRequest + */ + context?: { [key: string]: any; }; + /** + * + * @type {boolean} + * @memberof BlueprintInstanceRequest + */ + enabled?: boolean; + /** + * + * @type {string} + * @memberof BlueprintInstanceRequest + */ + content?: string; +} + +/** + * Check if a given object implements the BlueprintInstanceRequest interface. + */ +export function instanceOfBlueprintInstanceRequest(value: object): value is BlueprintInstanceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function BlueprintInstanceRequestFromJSON(json: any): BlueprintInstanceRequest { + return BlueprintInstanceRequestFromJSONTyped(json, false); +} + +export function BlueprintInstanceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlueprintInstanceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'path': json['path'] == null ? undefined : json['path'], + 'context': json['context'] == null ? undefined : json['context'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'content': json['content'] == null ? undefined : json['content'], + }; +} + +export function BlueprintInstanceRequestToJSON(json: any): BlueprintInstanceRequest { + return BlueprintInstanceRequestToJSONTyped(json, false); +} + +export function BlueprintInstanceRequestToJSONTyped(value?: BlueprintInstanceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'path': value['path'], + 'context': value['context'], + 'enabled': value['enabled'], + 'content': value['content'], + }; +} + diff --git a/packages/client-ts/src/models/BlueprintInstanceStatusEnum.ts b/packages/client-ts/src/models/BlueprintInstanceStatusEnum.ts new file mode 100644 index 0000000000..4b7b5fe2d7 --- /dev/null +++ b/packages/client-ts/src/models/BlueprintInstanceStatusEnum.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const BlueprintInstanceStatusEnum = { + Successful: 'successful', + Warning: 'warning', + Error: 'error', + Orphaned: 'orphaned', + Unknown: 'unknown', + UnknownDefaultOpenApi: '11184809' +} as const; +export type BlueprintInstanceStatusEnum = typeof BlueprintInstanceStatusEnum[keyof typeof BlueprintInstanceStatusEnum]; + + +export function instanceOfBlueprintInstanceStatusEnum(value: any): boolean { + for (const key in BlueprintInstanceStatusEnum) { + if (Object.prototype.hasOwnProperty.call(BlueprintInstanceStatusEnum, key)) { + if (BlueprintInstanceStatusEnum[key as keyof typeof BlueprintInstanceStatusEnum] === value) { + return true; + } + } + } + return false; +} + +export function BlueprintInstanceStatusEnumFromJSON(json: any): BlueprintInstanceStatusEnum { + return BlueprintInstanceStatusEnumFromJSONTyped(json, false); +} + +export function BlueprintInstanceStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlueprintInstanceStatusEnum { + return json as BlueprintInstanceStatusEnum; +} + +export function BlueprintInstanceStatusEnumToJSON(value?: BlueprintInstanceStatusEnum | null): any { + return value as any; +} + +export function BlueprintInstanceStatusEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): BlueprintInstanceStatusEnum { + return value as BlueprintInstanceStatusEnum; +} + diff --git a/packages/client-ts/src/models/Brand.ts b/packages/client-ts/src/models/Brand.ts new file mode 100644 index 0000000000..aba5df7cf0 --- /dev/null +++ b/packages/client-ts/src/models/Brand.ts @@ -0,0 +1,202 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Brand Serializer + * @export + * @interface Brand + */ +export interface Brand { + /** + * + * @type {string} + * @memberof Brand + */ + readonly brandUuid: string; + /** + * Domain that activates this brand. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` + * @type {string} + * @memberof Brand + */ + domain: string; + /** + * + * @type {boolean} + * @memberof Brand + */ + _default?: boolean; + /** + * + * @type {string} + * @memberof Brand + */ + brandingTitle?: string; + /** + * + * @type {string} + * @memberof Brand + */ + brandingLogo?: string; + /** + * + * @type {string} + * @memberof Brand + */ + brandingFavicon?: string; + /** + * + * @type {string} + * @memberof Brand + */ + brandingCustomCss?: string; + /** + * + * @type {string} + * @memberof Brand + */ + brandingDefaultFlowBackground?: string; + /** + * + * @type {string} + * @memberof Brand + */ + flowAuthentication?: string | null; + /** + * + * @type {string} + * @memberof Brand + */ + flowInvalidation?: string | null; + /** + * + * @type {string} + * @memberof Brand + */ + flowRecovery?: string | null; + /** + * + * @type {string} + * @memberof Brand + */ + flowUnenrollment?: string | null; + /** + * + * @type {string} + * @memberof Brand + */ + flowUserSettings?: string | null; + /** + * + * @type {string} + * @memberof Brand + */ + flowDeviceCode?: string | null; + /** + * When set, external users will be redirected to this application after authenticating. + * @type {string} + * @memberof Brand + */ + defaultApplication?: string | null; + /** + * Web Certificate used by the authentik Core webserver. + * @type {string} + * @memberof Brand + */ + webCertificate?: string | null; + /** + * Certificates used for client authentication. + * @type {Array} + * @memberof Brand + */ + clientCertificates?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Brand + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the Brand interface. + */ +export function instanceOfBrand(value: object): value is Brand { + if (!('brandUuid' in value) || value['brandUuid'] === undefined) return false; + if (!('domain' in value) || value['domain'] === undefined) return false; + return true; +} + +export function BrandFromJSON(json: any): Brand { + return BrandFromJSONTyped(json, false); +} + +export function BrandFromJSONTyped(json: any, ignoreDiscriminator: boolean): Brand { + if (json == null) { + return json; + } + return { + + 'brandUuid': json['brand_uuid'], + 'domain': json['domain'], + '_default': json['default'] == null ? undefined : json['default'], + 'brandingTitle': json['branding_title'] == null ? undefined : json['branding_title'], + 'brandingLogo': json['branding_logo'] == null ? undefined : json['branding_logo'], + 'brandingFavicon': json['branding_favicon'] == null ? undefined : json['branding_favicon'], + 'brandingCustomCss': json['branding_custom_css'] == null ? undefined : json['branding_custom_css'], + 'brandingDefaultFlowBackground': json['branding_default_flow_background'] == null ? undefined : json['branding_default_flow_background'], + 'flowAuthentication': json['flow_authentication'] == null ? undefined : json['flow_authentication'], + 'flowInvalidation': json['flow_invalidation'] == null ? undefined : json['flow_invalidation'], + 'flowRecovery': json['flow_recovery'] == null ? undefined : json['flow_recovery'], + 'flowUnenrollment': json['flow_unenrollment'] == null ? undefined : json['flow_unenrollment'], + 'flowUserSettings': json['flow_user_settings'] == null ? undefined : json['flow_user_settings'], + 'flowDeviceCode': json['flow_device_code'] == null ? undefined : json['flow_device_code'], + 'defaultApplication': json['default_application'] == null ? undefined : json['default_application'], + 'webCertificate': json['web_certificate'] == null ? undefined : json['web_certificate'], + 'clientCertificates': json['client_certificates'] == null ? undefined : json['client_certificates'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function BrandToJSON(json: any): Brand { + return BrandToJSONTyped(json, false); +} + +export function BrandToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'domain': value['domain'], + 'default': value['_default'], + 'branding_title': value['brandingTitle'], + 'branding_logo': value['brandingLogo'], + 'branding_favicon': value['brandingFavicon'], + 'branding_custom_css': value['brandingCustomCss'], + 'branding_default_flow_background': value['brandingDefaultFlowBackground'], + 'flow_authentication': value['flowAuthentication'], + 'flow_invalidation': value['flowInvalidation'], + 'flow_recovery': value['flowRecovery'], + 'flow_unenrollment': value['flowUnenrollment'], + 'flow_user_settings': value['flowUserSettings'], + 'flow_device_code': value['flowDeviceCode'], + 'default_application': value['defaultApplication'], + 'web_certificate': value['webCertificate'], + 'client_certificates': value['clientCertificates'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/BrandRequest.ts b/packages/client-ts/src/models/BrandRequest.ts new file mode 100644 index 0000000000..9805e1d4aa --- /dev/null +++ b/packages/client-ts/src/models/BrandRequest.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Brand Serializer + * @export + * @interface BrandRequest + */ +export interface BrandRequest { + /** + * Domain that activates this brand. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` + * @type {string} + * @memberof BrandRequest + */ + domain: string; + /** + * + * @type {boolean} + * @memberof BrandRequest + */ + _default?: boolean; + /** + * + * @type {string} + * @memberof BrandRequest + */ + brandingTitle?: string; + /** + * + * @type {string} + * @memberof BrandRequest + */ + brandingLogo?: string; + /** + * + * @type {string} + * @memberof BrandRequest + */ + brandingFavicon?: string; + /** + * + * @type {string} + * @memberof BrandRequest + */ + brandingCustomCss?: string; + /** + * + * @type {string} + * @memberof BrandRequest + */ + brandingDefaultFlowBackground?: string; + /** + * + * @type {string} + * @memberof BrandRequest + */ + flowAuthentication?: string | null; + /** + * + * @type {string} + * @memberof BrandRequest + */ + flowInvalidation?: string | null; + /** + * + * @type {string} + * @memberof BrandRequest + */ + flowRecovery?: string | null; + /** + * + * @type {string} + * @memberof BrandRequest + */ + flowUnenrollment?: string | null; + /** + * + * @type {string} + * @memberof BrandRequest + */ + flowUserSettings?: string | null; + /** + * + * @type {string} + * @memberof BrandRequest + */ + flowDeviceCode?: string | null; + /** + * When set, external users will be redirected to this application after authenticating. + * @type {string} + * @memberof BrandRequest + */ + defaultApplication?: string | null; + /** + * Web Certificate used by the authentik Core webserver. + * @type {string} + * @memberof BrandRequest + */ + webCertificate?: string | null; + /** + * Certificates used for client authentication. + * @type {Array} + * @memberof BrandRequest + */ + clientCertificates?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof BrandRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the BrandRequest interface. + */ +export function instanceOfBrandRequest(value: object): value is BrandRequest { + if (!('domain' in value) || value['domain'] === undefined) return false; + return true; +} + +export function BrandRequestFromJSON(json: any): BrandRequest { + return BrandRequestFromJSONTyped(json, false); +} + +export function BrandRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrandRequest { + if (json == null) { + return json; + } + return { + + 'domain': json['domain'], + '_default': json['default'] == null ? undefined : json['default'], + 'brandingTitle': json['branding_title'] == null ? undefined : json['branding_title'], + 'brandingLogo': json['branding_logo'] == null ? undefined : json['branding_logo'], + 'brandingFavicon': json['branding_favicon'] == null ? undefined : json['branding_favicon'], + 'brandingCustomCss': json['branding_custom_css'] == null ? undefined : json['branding_custom_css'], + 'brandingDefaultFlowBackground': json['branding_default_flow_background'] == null ? undefined : json['branding_default_flow_background'], + 'flowAuthentication': json['flow_authentication'] == null ? undefined : json['flow_authentication'], + 'flowInvalidation': json['flow_invalidation'] == null ? undefined : json['flow_invalidation'], + 'flowRecovery': json['flow_recovery'] == null ? undefined : json['flow_recovery'], + 'flowUnenrollment': json['flow_unenrollment'] == null ? undefined : json['flow_unenrollment'], + 'flowUserSettings': json['flow_user_settings'] == null ? undefined : json['flow_user_settings'], + 'flowDeviceCode': json['flow_device_code'] == null ? undefined : json['flow_device_code'], + 'defaultApplication': json['default_application'] == null ? undefined : json['default_application'], + 'webCertificate': json['web_certificate'] == null ? undefined : json['web_certificate'], + 'clientCertificates': json['client_certificates'] == null ? undefined : json['client_certificates'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function BrandRequestToJSON(json: any): BrandRequest { + return BrandRequestToJSONTyped(json, false); +} + +export function BrandRequestToJSONTyped(value?: BrandRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'domain': value['domain'], + 'default': value['_default'], + 'branding_title': value['brandingTitle'], + 'branding_logo': value['brandingLogo'], + 'branding_favicon': value['brandingFavicon'], + 'branding_custom_css': value['brandingCustomCss'], + 'branding_default_flow_background': value['brandingDefaultFlowBackground'], + 'flow_authentication': value['flowAuthentication'], + 'flow_invalidation': value['flowInvalidation'], + 'flow_recovery': value['flowRecovery'], + 'flow_unenrollment': value['flowUnenrollment'], + 'flow_user_settings': value['flowUserSettings'], + 'flow_device_code': value['flowDeviceCode'], + 'default_application': value['defaultApplication'], + 'web_certificate': value['webCertificate'], + 'client_certificates': value['clientCertificates'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/BulkDeleteSessionResponse.ts b/packages/client-ts/src/models/BulkDeleteSessionResponse.ts new file mode 100644 index 0000000000..ba26567f9a --- /dev/null +++ b/packages/client-ts/src/models/BulkDeleteSessionResponse.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface BulkDeleteSessionResponse + */ +export interface BulkDeleteSessionResponse { + /** + * + * @type {number} + * @memberof BulkDeleteSessionResponse + */ + deleted: number; +} + +/** + * Check if a given object implements the BulkDeleteSessionResponse interface. + */ +export function instanceOfBulkDeleteSessionResponse(value: object): value is BulkDeleteSessionResponse { + if (!('deleted' in value) || value['deleted'] === undefined) return false; + return true; +} + +export function BulkDeleteSessionResponseFromJSON(json: any): BulkDeleteSessionResponse { + return BulkDeleteSessionResponseFromJSONTyped(json, false); +} + +export function BulkDeleteSessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkDeleteSessionResponse { + if (json == null) { + return json; + } + return { + + 'deleted': json['deleted'], + }; +} + +export function BulkDeleteSessionResponseToJSON(json: any): BulkDeleteSessionResponse { + return BulkDeleteSessionResponseToJSONTyped(json, false); +} + +export function BulkDeleteSessionResponseToJSONTyped(value?: BulkDeleteSessionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'deleted': value['deleted'], + }; +} + diff --git a/packages/client-ts/src/models/Cache.ts b/packages/client-ts/src/models/Cache.ts new file mode 100644 index 0000000000..4dc272a7f7 --- /dev/null +++ b/packages/client-ts/src/models/Cache.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Generic cache stats for an object + * @export + * @interface Cache + */ +export interface Cache { + /** + * + * @type {number} + * @memberof Cache + */ + readonly count: number; +} + +/** + * Check if a given object implements the Cache interface. + */ +export function instanceOfCache(value: object): value is Cache { + if (!('count' in value) || value['count'] === undefined) return false; + return true; +} + +export function CacheFromJSON(json: any): Cache { + return CacheFromJSONTyped(json, false); +} + +export function CacheFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cache { + if (json == null) { + return json; + } + return { + + 'count': json['count'], + }; +} + +export function CacheToJSON(json: any): Cache { + return CacheToJSONTyped(json, false); +} + +export function CacheToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/CapabilitiesEnum.ts b/packages/client-ts/src/models/CapabilitiesEnum.ts new file mode 100644 index 0000000000..4897e1da7a --- /dev/null +++ b/packages/client-ts/src/models/CapabilitiesEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const CapabilitiesEnum = { + CanSaveMedia: 'can_save_media', + CanSaveReports: 'can_save_reports', + CanGeoIp: 'can_geo_ip', + CanAsn: 'can_asn', + CanImpersonate: 'can_impersonate', + CanDebug: 'can_debug', + IsEnterprise: 'is_enterprise', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CapabilitiesEnum = typeof CapabilitiesEnum[keyof typeof CapabilitiesEnum]; + + +export function instanceOfCapabilitiesEnum(value: any): boolean { + for (const key in CapabilitiesEnum) { + if (Object.prototype.hasOwnProperty.call(CapabilitiesEnum, key)) { + if (CapabilitiesEnum[key as keyof typeof CapabilitiesEnum] === value) { + return true; + } + } + } + return false; +} + +export function CapabilitiesEnumFromJSON(json: any): CapabilitiesEnum { + return CapabilitiesEnumFromJSONTyped(json, false); +} + +export function CapabilitiesEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): CapabilitiesEnum { + return json as CapabilitiesEnum; +} + +export function CapabilitiesEnumToJSON(value?: CapabilitiesEnum | null): any { + return value as any; +} + +export function CapabilitiesEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): CapabilitiesEnum { + return value as CapabilitiesEnum; +} + diff --git a/packages/client-ts/src/models/CaptchaChallenge.ts b/packages/client-ts/src/models/CaptchaChallenge.ts new file mode 100644 index 0000000000..80d628ca52 --- /dev/null +++ b/packages/client-ts/src/models/CaptchaChallenge.ts @@ -0,0 +1,141 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Site public key + * @export + * @interface CaptchaChallenge + */ +export interface CaptchaChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof CaptchaChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof CaptchaChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof CaptchaChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof CaptchaChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof CaptchaChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof CaptchaChallenge + */ + siteKey: string; + /** + * + * @type {string} + * @memberof CaptchaChallenge + */ + jsUrl: string; + /** + * + * @type {boolean} + * @memberof CaptchaChallenge + */ + interactive: boolean; +} + +/** + * Check if a given object implements the CaptchaChallenge interface. + */ +export function instanceOfCaptchaChallenge(value: object): value is CaptchaChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('siteKey' in value) || value['siteKey'] === undefined) return false; + if (!('jsUrl' in value) || value['jsUrl'] === undefined) return false; + if (!('interactive' in value) || value['interactive'] === undefined) return false; + return true; +} + +export function CaptchaChallengeFromJSON(json: any): CaptchaChallenge { + return CaptchaChallengeFromJSONTyped(json, false); +} + +export function CaptchaChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CaptchaChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'siteKey': json['site_key'], + 'jsUrl': json['js_url'], + 'interactive': json['interactive'], + }; +} + +export function CaptchaChallengeToJSON(json: any): CaptchaChallenge { + return CaptchaChallengeToJSONTyped(json, false); +} + +export function CaptchaChallengeToJSONTyped(value?: CaptchaChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'site_key': value['siteKey'], + 'js_url': value['jsUrl'], + 'interactive': value['interactive'], + }; +} + diff --git a/packages/client-ts/src/models/CaptchaChallengeResponseRequest.ts b/packages/client-ts/src/models/CaptchaChallengeResponseRequest.ts new file mode 100644 index 0000000000..e78ac17a4d --- /dev/null +++ b/packages/client-ts/src/models/CaptchaChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Validate captcha token + * @export + * @interface CaptchaChallengeResponseRequest + */ +export interface CaptchaChallengeResponseRequest { + /** + * + * @type {string} + * @memberof CaptchaChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof CaptchaChallengeResponseRequest + */ + token: string; +} + +/** + * Check if a given object implements the CaptchaChallengeResponseRequest interface. + */ +export function instanceOfCaptchaChallengeResponseRequest(value: object): value is CaptchaChallengeResponseRequest { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function CaptchaChallengeResponseRequestFromJSON(json: any): CaptchaChallengeResponseRequest { + return CaptchaChallengeResponseRequestFromJSONTyped(json, false); +} + +export function CaptchaChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CaptchaChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'token': json['token'], + }; +} + +export function CaptchaChallengeResponseRequestToJSON(json: any): CaptchaChallengeResponseRequest { + return CaptchaChallengeResponseRequestToJSONTyped(json, false); +} + +export function CaptchaChallengeResponseRequestToJSONTyped(value?: CaptchaChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'token': value['token'], + }; +} + diff --git a/packages/client-ts/src/models/CaptchaStage.ts b/packages/client-ts/src/models/CaptchaStage.ts new file mode 100644 index 0000000000..b63261ac68 --- /dev/null +++ b/packages/client-ts/src/models/CaptchaStage.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * CaptchaStage Serializer + * @export + * @interface CaptchaStage + */ +export interface CaptchaStage { + /** + * + * @type {string} + * @memberof CaptchaStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof CaptchaStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof CaptchaStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof CaptchaStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof CaptchaStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof CaptchaStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof CaptchaStage + */ + readonly flowSet: Array; + /** + * Public key, acquired your captcha Provider. + * @type {string} + * @memberof CaptchaStage + */ + publicKey: string; + /** + * + * @type {string} + * @memberof CaptchaStage + */ + jsUrl?: string; + /** + * + * @type {string} + * @memberof CaptchaStage + */ + apiUrl?: string; + /** + * + * @type {boolean} + * @memberof CaptchaStage + */ + interactive?: boolean; + /** + * + * @type {number} + * @memberof CaptchaStage + */ + scoreMinThreshold?: number; + /** + * + * @type {number} + * @memberof CaptchaStage + */ + scoreMaxThreshold?: number; + /** + * When enabled and the received captcha score is outside of the given threshold, the stage will show an error message. When not enabled, the flow will continue, but the data from the captcha will be available in the context for policy decisions + * @type {boolean} + * @memberof CaptchaStage + */ + errorOnInvalidScore?: boolean; +} + +/** + * Check if a given object implements the CaptchaStage interface. + */ +export function instanceOfCaptchaStage(value: object): value is CaptchaStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('publicKey' in value) || value['publicKey'] === undefined) return false; + return true; +} + +export function CaptchaStageFromJSON(json: any): CaptchaStage { + return CaptchaStageFromJSONTyped(json, false); +} + +export function CaptchaStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): CaptchaStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'publicKey': json['public_key'], + 'jsUrl': json['js_url'] == null ? undefined : json['js_url'], + 'apiUrl': json['api_url'] == null ? undefined : json['api_url'], + 'interactive': json['interactive'] == null ? undefined : json['interactive'], + 'scoreMinThreshold': json['score_min_threshold'] == null ? undefined : json['score_min_threshold'], + 'scoreMaxThreshold': json['score_max_threshold'] == null ? undefined : json['score_max_threshold'], + 'errorOnInvalidScore': json['error_on_invalid_score'] == null ? undefined : json['error_on_invalid_score'], + }; +} + +export function CaptchaStageToJSON(json: any): CaptchaStage { + return CaptchaStageToJSONTyped(json, false); +} + +export function CaptchaStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'public_key': value['publicKey'], + 'js_url': value['jsUrl'], + 'api_url': value['apiUrl'], + 'interactive': value['interactive'], + 'score_min_threshold': value['scoreMinThreshold'], + 'score_max_threshold': value['scoreMaxThreshold'], + 'error_on_invalid_score': value['errorOnInvalidScore'], + }; +} + diff --git a/packages/client-ts/src/models/CaptchaStageRequest.ts b/packages/client-ts/src/models/CaptchaStageRequest.ts new file mode 100644 index 0000000000..b8c8979f40 --- /dev/null +++ b/packages/client-ts/src/models/CaptchaStageRequest.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * CaptchaStage Serializer + * @export + * @interface CaptchaStageRequest + */ +export interface CaptchaStageRequest { + /** + * + * @type {string} + * @memberof CaptchaStageRequest + */ + name: string; + /** + * Public key, acquired your captcha Provider. + * @type {string} + * @memberof CaptchaStageRequest + */ + publicKey: string; + /** + * Private key, acquired your captcha Provider. + * @type {string} + * @memberof CaptchaStageRequest + */ + privateKey: string; + /** + * + * @type {string} + * @memberof CaptchaStageRequest + */ + jsUrl?: string; + /** + * + * @type {string} + * @memberof CaptchaStageRequest + */ + apiUrl?: string; + /** + * + * @type {boolean} + * @memberof CaptchaStageRequest + */ + interactive?: boolean; + /** + * + * @type {number} + * @memberof CaptchaStageRequest + */ + scoreMinThreshold?: number; + /** + * + * @type {number} + * @memberof CaptchaStageRequest + */ + scoreMaxThreshold?: number; + /** + * When enabled and the received captcha score is outside of the given threshold, the stage will show an error message. When not enabled, the flow will continue, but the data from the captcha will be available in the context for policy decisions + * @type {boolean} + * @memberof CaptchaStageRequest + */ + errorOnInvalidScore?: boolean; +} + +/** + * Check if a given object implements the CaptchaStageRequest interface. + */ +export function instanceOfCaptchaStageRequest(value: object): value is CaptchaStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('publicKey' in value) || value['publicKey'] === undefined) return false; + if (!('privateKey' in value) || value['privateKey'] === undefined) return false; + return true; +} + +export function CaptchaStageRequestFromJSON(json: any): CaptchaStageRequest { + return CaptchaStageRequestFromJSONTyped(json, false); +} + +export function CaptchaStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CaptchaStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'publicKey': json['public_key'], + 'privateKey': json['private_key'], + 'jsUrl': json['js_url'] == null ? undefined : json['js_url'], + 'apiUrl': json['api_url'] == null ? undefined : json['api_url'], + 'interactive': json['interactive'] == null ? undefined : json['interactive'], + 'scoreMinThreshold': json['score_min_threshold'] == null ? undefined : json['score_min_threshold'], + 'scoreMaxThreshold': json['score_max_threshold'] == null ? undefined : json['score_max_threshold'], + 'errorOnInvalidScore': json['error_on_invalid_score'] == null ? undefined : json['error_on_invalid_score'], + }; +} + +export function CaptchaStageRequestToJSON(json: any): CaptchaStageRequest { + return CaptchaStageRequestToJSONTyped(json, false); +} + +export function CaptchaStageRequestToJSONTyped(value?: CaptchaStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'public_key': value['publicKey'], + 'private_key': value['privateKey'], + 'js_url': value['jsUrl'], + 'api_url': value['apiUrl'], + 'interactive': value['interactive'], + 'score_min_threshold': value['scoreMinThreshold'], + 'score_max_threshold': value['scoreMaxThreshold'], + 'error_on_invalid_score': value['errorOnInvalidScore'], + }; +} + diff --git a/packages/client-ts/src/models/CertAttributeEnum.ts b/packages/client-ts/src/models/CertAttributeEnum.ts new file mode 100644 index 0000000000..defc342b0a --- /dev/null +++ b/packages/client-ts/src/models/CertAttributeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const CertAttributeEnum = { + Subject: 'subject', + CommonName: 'common_name', + Email: 'email', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CertAttributeEnum = typeof CertAttributeEnum[keyof typeof CertAttributeEnum]; + + +export function instanceOfCertAttributeEnum(value: any): boolean { + for (const key in CertAttributeEnum) { + if (Object.prototype.hasOwnProperty.call(CertAttributeEnum, key)) { + if (CertAttributeEnum[key as keyof typeof CertAttributeEnum] === value) { + return true; + } + } + } + return false; +} + +export function CertAttributeEnumFromJSON(json: any): CertAttributeEnum { + return CertAttributeEnumFromJSONTyped(json, false); +} + +export function CertAttributeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertAttributeEnum { + return json as CertAttributeEnum; +} + +export function CertAttributeEnumToJSON(value?: CertAttributeEnum | null): any { + return value as any; +} + +export function CertAttributeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): CertAttributeEnum { + return value as CertAttributeEnum; +} + diff --git a/packages/client-ts/src/models/CertificateData.ts b/packages/client-ts/src/models/CertificateData.ts new file mode 100644 index 0000000000..5d2bab2931 --- /dev/null +++ b/packages/client-ts/src/models/CertificateData.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Get CertificateKeyPair's data + * @export + * @interface CertificateData + */ +export interface CertificateData { + /** + * + * @type {string} + * @memberof CertificateData + */ + readonly data: string; +} + +/** + * Check if a given object implements the CertificateData interface. + */ +export function instanceOfCertificateData(value: object): value is CertificateData { + if (!('data' in value) || value['data'] === undefined) return false; + return true; +} + +export function CertificateDataFromJSON(json: any): CertificateData { + return CertificateDataFromJSONTyped(json, false); +} + +export function CertificateDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateData { + if (json == null) { + return json; + } + return { + + 'data': json['data'], + }; +} + +export function CertificateDataToJSON(json: any): CertificateData { + return CertificateDataToJSONTyped(json, false); +} + +export function CertificateDataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/CertificateGenerationRequest.ts b/packages/client-ts/src/models/CertificateGenerationRequest.ts new file mode 100644 index 0000000000..8094252623 --- /dev/null +++ b/packages/client-ts/src/models/CertificateGenerationRequest.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { AlgEnum } from './AlgEnum'; +import { + AlgEnumFromJSON, + AlgEnumFromJSONTyped, + AlgEnumToJSON, + AlgEnumToJSONTyped, +} from './AlgEnum'; + +/** + * Certificate generation parameters + * @export + * @interface CertificateGenerationRequest + */ +export interface CertificateGenerationRequest { + /** + * + * @type {string} + * @memberof CertificateGenerationRequest + */ + commonName: string; + /** + * + * @type {string} + * @memberof CertificateGenerationRequest + */ + subjectAltName?: string; + /** + * + * @type {number} + * @memberof CertificateGenerationRequest + */ + validityDays: number; + /** + * + * @type {AlgEnum} + * @memberof CertificateGenerationRequest + */ + alg?: AlgEnum; +} + + + +/** + * Check if a given object implements the CertificateGenerationRequest interface. + */ +export function instanceOfCertificateGenerationRequest(value: object): value is CertificateGenerationRequest { + if (!('commonName' in value) || value['commonName'] === undefined) return false; + if (!('validityDays' in value) || value['validityDays'] === undefined) return false; + return true; +} + +export function CertificateGenerationRequestFromJSON(json: any): CertificateGenerationRequest { + return CertificateGenerationRequestFromJSONTyped(json, false); +} + +export function CertificateGenerationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateGenerationRequest { + if (json == null) { + return json; + } + return { + + 'commonName': json['common_name'], + 'subjectAltName': json['subject_alt_name'] == null ? undefined : json['subject_alt_name'], + 'validityDays': json['validity_days'], + 'alg': json['alg'] == null ? undefined : AlgEnumFromJSON(json['alg']), + }; +} + +export function CertificateGenerationRequestToJSON(json: any): CertificateGenerationRequest { + return CertificateGenerationRequestToJSONTyped(json, false); +} + +export function CertificateGenerationRequestToJSONTyped(value?: CertificateGenerationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'common_name': value['commonName'], + 'subject_alt_name': value['subjectAltName'], + 'validity_days': value['validityDays'], + 'alg': AlgEnumToJSON(value['alg']), + }; +} + diff --git a/packages/client-ts/src/models/CertificateKeyPair.ts b/packages/client-ts/src/models/CertificateKeyPair.ts new file mode 100644 index 0000000000..8f04dffbb2 --- /dev/null +++ b/packages/client-ts/src/models/CertificateKeyPair.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { KeyTypeEnum } from './KeyTypeEnum'; +import { + KeyTypeEnumFromJSON, + KeyTypeEnumFromJSONTyped, + KeyTypeEnumToJSON, + KeyTypeEnumToJSONTyped, +} from './KeyTypeEnum'; + +/** + * CertificateKeyPair Serializer + * @export + * @interface CertificateKeyPair + */ +export interface CertificateKeyPair { + /** + * + * @type {string} + * @memberof CertificateKeyPair + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof CertificateKeyPair + */ + name: string; + /** + * SHA256 fingerprint of the certificate + * @type {string} + * @memberof CertificateKeyPair + */ + readonly fingerprintSha256: string | null; + /** + * SHA1 fingerprint of the certificate + * @type {string} + * @memberof CertificateKeyPair + */ + readonly fingerprintSha1: string | null; + /** + * Certificate expiry date + * @type {Date} + * @memberof CertificateKeyPair + */ + readonly certExpiry: Date | null; + /** + * Certificate subject as RFC4514 string + * @type {string} + * @memberof CertificateKeyPair + */ + readonly certSubject: string | null; + /** + * Show if this keypair has a private key configured or not + * @type {boolean} + * @memberof CertificateKeyPair + */ + readonly privateKeyAvailable: boolean; + /** + * Key algorithm type detected from the certificate's public key + * @type {KeyTypeEnum} + * @memberof CertificateKeyPair + */ + readonly keyType: KeyTypeEnum | null; + /** + * Get URL to download certificate + * @type {string} + * @memberof CertificateKeyPair + */ + readonly certificateDownloadUrl: string; + /** + * Get URL to download private key + * @type {string} + * @memberof CertificateKeyPair + */ + readonly 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. + * @type {string} + * @memberof CertificateKeyPair + */ + readonly managed: string | null; +} + + + +/** + * Check if a given object implements the CertificateKeyPair interface. + */ +export function instanceOfCertificateKeyPair(value: object): value is CertificateKeyPair { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('fingerprintSha256' in value) || value['fingerprintSha256'] === undefined) return false; + if (!('fingerprintSha1' in value) || value['fingerprintSha1'] === undefined) return false; + if (!('certExpiry' in value) || value['certExpiry'] === undefined) return false; + if (!('certSubject' in value) || value['certSubject'] === undefined) return false; + if (!('privateKeyAvailable' in value) || value['privateKeyAvailable'] === undefined) return false; + if (!('keyType' in value) || value['keyType'] === undefined) return false; + if (!('certificateDownloadUrl' in value) || value['certificateDownloadUrl'] === undefined) return false; + if (!('privateKeyDownloadUrl' in value) || value['privateKeyDownloadUrl'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + return true; +} + +export function CertificateKeyPairFromJSON(json: any): CertificateKeyPair { + return CertificateKeyPairFromJSONTyped(json, false); +} + +export function CertificateKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateKeyPair { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'fingerprintSha256': json['fingerprint_sha256'], + 'fingerprintSha1': json['fingerprint_sha1'], + 'certExpiry': (json['cert_expiry'] == null ? null : new Date(json['cert_expiry'])), + 'certSubject': json['cert_subject'], + 'privateKeyAvailable': json['private_key_available'], + 'keyType': KeyTypeEnumFromJSON(json['key_type']), + 'certificateDownloadUrl': json['certificate_download_url'], + 'privateKeyDownloadUrl': json['private_key_download_url'], + 'managed': json['managed'], + }; +} + +export function CertificateKeyPairToJSON(json: any): CertificateKeyPair { + return CertificateKeyPairToJSONTyped(json, false); +} + +export function CertificateKeyPairToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/CertificateKeyPairRequest.ts b/packages/client-ts/src/models/CertificateKeyPairRequest.ts new file mode 100644 index 0000000000..53ce0d8e35 --- /dev/null +++ b/packages/client-ts/src/models/CertificateKeyPairRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * CertificateKeyPair Serializer + * @export + * @interface CertificateKeyPairRequest + */ +export interface CertificateKeyPairRequest { + /** + * + * @type {string} + * @memberof CertificateKeyPairRequest + */ + name: string; + /** + * PEM-encoded Certificate data + * @type {string} + * @memberof CertificateKeyPairRequest + */ + certificateData: string; + /** + * Optional Private Key. If this is set, you can use this keypair for encryption. + * @type {string} + * @memberof CertificateKeyPairRequest + */ + keyData?: string; +} + +/** + * Check if a given object implements the CertificateKeyPairRequest interface. + */ +export function instanceOfCertificateKeyPairRequest(value: object): value is CertificateKeyPairRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('certificateData' in value) || value['certificateData'] === undefined) return false; + return true; +} + +export function CertificateKeyPairRequestFromJSON(json: any): CertificateKeyPairRequest { + return CertificateKeyPairRequestFromJSONTyped(json, false); +} + +export function CertificateKeyPairRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateKeyPairRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'certificateData': json['certificate_data'], + 'keyData': json['key_data'] == null ? undefined : json['key_data'], + }; +} + +export function CertificateKeyPairRequestToJSON(json: any): CertificateKeyPairRequest { + return CertificateKeyPairRequestToJSONTyped(json, false); +} + +export function CertificateKeyPairRequestToJSONTyped(value?: CertificateKeyPairRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'certificate_data': value['certificateData'], + 'key_data': value['keyData'], + }; +} + diff --git a/packages/client-ts/src/models/ChallengeTypes.ts b/packages/client-ts/src/models/ChallengeTypes.ts new file mode 100644 index 0000000000..3281abdc02 --- /dev/null +++ b/packages/client-ts/src/models/ChallengeTypes.ts @@ -0,0 +1,380 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { AccessDeniedChallenge } from './AccessDeniedChallenge'; +import { + instanceOfAccessDeniedChallenge, + AccessDeniedChallengeFromJSON, + AccessDeniedChallengeFromJSONTyped, + AccessDeniedChallengeToJSON, +} from './AccessDeniedChallenge'; +import type { AppleLoginChallenge } from './AppleLoginChallenge'; +import { + instanceOfAppleLoginChallenge, + AppleLoginChallengeFromJSON, + AppleLoginChallengeFromJSONTyped, + AppleLoginChallengeToJSON, +} from './AppleLoginChallenge'; +import type { AuthenticatorDuoChallenge } from './AuthenticatorDuoChallenge'; +import { + instanceOfAuthenticatorDuoChallenge, + AuthenticatorDuoChallengeFromJSON, + AuthenticatorDuoChallengeFromJSONTyped, + AuthenticatorDuoChallengeToJSON, +} from './AuthenticatorDuoChallenge'; +import type { AuthenticatorEmailChallenge } from './AuthenticatorEmailChallenge'; +import { + instanceOfAuthenticatorEmailChallenge, + AuthenticatorEmailChallengeFromJSON, + AuthenticatorEmailChallengeFromJSONTyped, + AuthenticatorEmailChallengeToJSON, +} from './AuthenticatorEmailChallenge'; +import type { AuthenticatorSMSChallenge } from './AuthenticatorSMSChallenge'; +import { + instanceOfAuthenticatorSMSChallenge, + AuthenticatorSMSChallengeFromJSON, + AuthenticatorSMSChallengeFromJSONTyped, + AuthenticatorSMSChallengeToJSON, +} from './AuthenticatorSMSChallenge'; +import type { AuthenticatorStaticChallenge } from './AuthenticatorStaticChallenge'; +import { + instanceOfAuthenticatorStaticChallenge, + AuthenticatorStaticChallengeFromJSON, + AuthenticatorStaticChallengeFromJSONTyped, + AuthenticatorStaticChallengeToJSON, +} from './AuthenticatorStaticChallenge'; +import type { AuthenticatorTOTPChallenge } from './AuthenticatorTOTPChallenge'; +import { + instanceOfAuthenticatorTOTPChallenge, + AuthenticatorTOTPChallengeFromJSON, + AuthenticatorTOTPChallengeFromJSONTyped, + AuthenticatorTOTPChallengeToJSON, +} from './AuthenticatorTOTPChallenge'; +import type { AuthenticatorValidationChallenge } from './AuthenticatorValidationChallenge'; +import { + instanceOfAuthenticatorValidationChallenge, + AuthenticatorValidationChallengeFromJSON, + AuthenticatorValidationChallengeFromJSONTyped, + AuthenticatorValidationChallengeToJSON, +} from './AuthenticatorValidationChallenge'; +import type { AuthenticatorWebAuthnChallenge } from './AuthenticatorWebAuthnChallenge'; +import { + instanceOfAuthenticatorWebAuthnChallenge, + AuthenticatorWebAuthnChallengeFromJSON, + AuthenticatorWebAuthnChallengeFromJSONTyped, + AuthenticatorWebAuthnChallengeToJSON, +} from './AuthenticatorWebAuthnChallenge'; +import type { AutosubmitChallenge } from './AutosubmitChallenge'; +import { + instanceOfAutosubmitChallenge, + AutosubmitChallengeFromJSON, + AutosubmitChallengeFromJSONTyped, + AutosubmitChallengeToJSON, +} from './AutosubmitChallenge'; +import type { CaptchaChallenge } from './CaptchaChallenge'; +import { + instanceOfCaptchaChallenge, + CaptchaChallengeFromJSON, + CaptchaChallengeFromJSONTyped, + CaptchaChallengeToJSON, +} from './CaptchaChallenge'; +import type { ConsentChallenge } from './ConsentChallenge'; +import { + instanceOfConsentChallenge, + ConsentChallengeFromJSON, + ConsentChallengeFromJSONTyped, + ConsentChallengeToJSON, +} from './ConsentChallenge'; +import type { DummyChallenge } from './DummyChallenge'; +import { + instanceOfDummyChallenge, + DummyChallengeFromJSON, + DummyChallengeFromJSONTyped, + DummyChallengeToJSON, +} from './DummyChallenge'; +import type { EmailChallenge } from './EmailChallenge'; +import { + instanceOfEmailChallenge, + EmailChallengeFromJSON, + EmailChallengeFromJSONTyped, + EmailChallengeToJSON, +} from './EmailChallenge'; +import type { EndpointAgentChallenge } from './EndpointAgentChallenge'; +import { + instanceOfEndpointAgentChallenge, + EndpointAgentChallengeFromJSON, + EndpointAgentChallengeFromJSONTyped, + EndpointAgentChallengeToJSON, +} from './EndpointAgentChallenge'; +import type { FlowErrorChallenge } from './FlowErrorChallenge'; +import { + instanceOfFlowErrorChallenge, + FlowErrorChallengeFromJSON, + FlowErrorChallengeFromJSONTyped, + FlowErrorChallengeToJSON, +} from './FlowErrorChallenge'; +import type { FrameChallenge } from './FrameChallenge'; +import { + instanceOfFrameChallenge, + FrameChallengeFromJSON, + FrameChallengeFromJSONTyped, + FrameChallengeToJSON, +} from './FrameChallenge'; +import type { IdentificationChallenge } from './IdentificationChallenge'; +import { + instanceOfIdentificationChallenge, + IdentificationChallengeFromJSON, + IdentificationChallengeFromJSONTyped, + IdentificationChallengeToJSON, +} from './IdentificationChallenge'; +import type { IframeLogoutChallenge } from './IframeLogoutChallenge'; +import { + instanceOfIframeLogoutChallenge, + IframeLogoutChallengeFromJSON, + IframeLogoutChallengeFromJSONTyped, + IframeLogoutChallengeToJSON, +} from './IframeLogoutChallenge'; +import type { NativeLogoutChallenge } from './NativeLogoutChallenge'; +import { + instanceOfNativeLogoutChallenge, + NativeLogoutChallengeFromJSON, + NativeLogoutChallengeFromJSONTyped, + NativeLogoutChallengeToJSON, +} from './NativeLogoutChallenge'; +import type { OAuthDeviceCodeChallenge } from './OAuthDeviceCodeChallenge'; +import { + instanceOfOAuthDeviceCodeChallenge, + OAuthDeviceCodeChallengeFromJSON, + OAuthDeviceCodeChallengeFromJSONTyped, + OAuthDeviceCodeChallengeToJSON, +} from './OAuthDeviceCodeChallenge'; +import type { OAuthDeviceCodeFinishChallenge } from './OAuthDeviceCodeFinishChallenge'; +import { + instanceOfOAuthDeviceCodeFinishChallenge, + OAuthDeviceCodeFinishChallengeFromJSON, + OAuthDeviceCodeFinishChallengeFromJSONTyped, + OAuthDeviceCodeFinishChallengeToJSON, +} from './OAuthDeviceCodeFinishChallenge'; +import type { PasswordChallenge } from './PasswordChallenge'; +import { + instanceOfPasswordChallenge, + PasswordChallengeFromJSON, + PasswordChallengeFromJSONTyped, + PasswordChallengeToJSON, +} from './PasswordChallenge'; +import type { PlexAuthenticationChallenge } from './PlexAuthenticationChallenge'; +import { + instanceOfPlexAuthenticationChallenge, + PlexAuthenticationChallengeFromJSON, + PlexAuthenticationChallengeFromJSONTyped, + PlexAuthenticationChallengeToJSON, +} from './PlexAuthenticationChallenge'; +import type { PromptChallenge } from './PromptChallenge'; +import { + instanceOfPromptChallenge, + PromptChallengeFromJSON, + PromptChallengeFromJSONTyped, + PromptChallengeToJSON, +} from './PromptChallenge'; +import type { RedirectChallenge } from './RedirectChallenge'; +import { + instanceOfRedirectChallenge, + RedirectChallengeFromJSON, + RedirectChallengeFromJSONTyped, + RedirectChallengeToJSON, +} from './RedirectChallenge'; +import type { SessionEndChallenge } from './SessionEndChallenge'; +import { + instanceOfSessionEndChallenge, + SessionEndChallengeFromJSON, + SessionEndChallengeFromJSONTyped, + SessionEndChallengeToJSON, +} from './SessionEndChallenge'; +import type { ShellChallenge } from './ShellChallenge'; +import { + instanceOfShellChallenge, + ShellChallengeFromJSON, + ShellChallengeFromJSONTyped, + ShellChallengeToJSON, +} from './ShellChallenge'; +import type { TelegramLoginChallenge } from './TelegramLoginChallenge'; +import { + instanceOfTelegramLoginChallenge, + TelegramLoginChallengeFromJSON, + TelegramLoginChallengeFromJSONTyped, + TelegramLoginChallengeToJSON, +} from './TelegramLoginChallenge'; +import type { UserLoginChallenge } from './UserLoginChallenge'; +import { + instanceOfUserLoginChallenge, + UserLoginChallengeFromJSON, + UserLoginChallengeFromJSONTyped, + UserLoginChallengeToJSON, +} from './UserLoginChallenge'; + +/** + * @type ChallengeTypes + * + * @export + */ +export type ChallengeTypes = { component: 'ak-provider-iframe-logout' } & IframeLogoutChallenge | { component: 'ak-provider-oauth2-device-code' } & OAuthDeviceCodeChallenge | { component: 'ak-provider-oauth2-device-code-finish' } & OAuthDeviceCodeFinishChallenge | { component: 'ak-provider-saml-native-logout' } & NativeLogoutChallenge | { component: 'ak-source-oauth-apple' } & AppleLoginChallenge | { component: 'ak-source-plex' } & PlexAuthenticationChallenge | { component: 'ak-source-telegram' } & TelegramLoginChallenge | { component: 'ak-stage-access-denied' } & AccessDeniedChallenge | { component: 'ak-stage-authenticator-duo' } & AuthenticatorDuoChallenge | { component: 'ak-stage-authenticator-email' } & AuthenticatorEmailChallenge | { component: 'ak-stage-authenticator-sms' } & AuthenticatorSMSChallenge | { component: 'ak-stage-authenticator-static' } & AuthenticatorStaticChallenge | { component: 'ak-stage-authenticator-totp' } & AuthenticatorTOTPChallenge | { component: 'ak-stage-authenticator-validate' } & AuthenticatorValidationChallenge | { component: 'ak-stage-authenticator-webauthn' } & AuthenticatorWebAuthnChallenge | { component: 'ak-stage-autosubmit' } & AutosubmitChallenge | { component: 'ak-stage-captcha' } & CaptchaChallenge | { component: 'ak-stage-consent' } & ConsentChallenge | { component: 'ak-stage-dummy' } & DummyChallenge | { component: 'ak-stage-email' } & EmailChallenge | { component: 'ak-stage-endpoint-agent' } & EndpointAgentChallenge | { component: 'ak-stage-flow-error' } & FlowErrorChallenge | { component: 'ak-stage-identification' } & IdentificationChallenge | { component: 'ak-stage-password' } & PasswordChallenge | { component: 'ak-stage-prompt' } & PromptChallenge | { component: 'ak-stage-session-end' } & SessionEndChallenge | { component: 'ak-stage-user-login' } & UserLoginChallenge | { component: 'xak-flow-frame' } & FrameChallenge | { component: 'xak-flow-redirect' } & RedirectChallenge | { component: 'xak-flow-shell' } & ShellChallenge; + +export function ChallengeTypesFromJSON(json: any): ChallengeTypes { + return ChallengeTypesFromJSONTyped(json, false); +} + +export function ChallengeTypesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChallengeTypes { + if (json == null) { + return json; + } + switch (json['component']) { + case 'ak-provider-iframe-logout': + return Object.assign({}, IframeLogoutChallengeFromJSONTyped(json, true), { component: 'ak-provider-iframe-logout' } as const); + case 'ak-provider-oauth2-device-code': + return Object.assign({}, OAuthDeviceCodeChallengeFromJSONTyped(json, true), { component: 'ak-provider-oauth2-device-code' } as const); + case 'ak-provider-oauth2-device-code-finish': + return Object.assign({}, OAuthDeviceCodeFinishChallengeFromJSONTyped(json, true), { component: 'ak-provider-oauth2-device-code-finish' } as const); + case 'ak-provider-saml-native-logout': + return Object.assign({}, NativeLogoutChallengeFromJSONTyped(json, true), { component: 'ak-provider-saml-native-logout' } as const); + case 'ak-source-oauth-apple': + return Object.assign({}, AppleLoginChallengeFromJSONTyped(json, true), { component: 'ak-source-oauth-apple' } as const); + case 'ak-source-plex': + return Object.assign({}, PlexAuthenticationChallengeFromJSONTyped(json, true), { component: 'ak-source-plex' } as const); + case 'ak-source-telegram': + return Object.assign({}, TelegramLoginChallengeFromJSONTyped(json, true), { component: 'ak-source-telegram' } as const); + case 'ak-stage-access-denied': + return Object.assign({}, AccessDeniedChallengeFromJSONTyped(json, true), { component: 'ak-stage-access-denied' } as const); + case 'ak-stage-authenticator-duo': + return Object.assign({}, AuthenticatorDuoChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-duo' } as const); + case 'ak-stage-authenticator-email': + return Object.assign({}, AuthenticatorEmailChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-email' } as const); + case 'ak-stage-authenticator-sms': + return Object.assign({}, AuthenticatorSMSChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-sms' } as const); + case 'ak-stage-authenticator-static': + return Object.assign({}, AuthenticatorStaticChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-static' } as const); + case 'ak-stage-authenticator-totp': + return Object.assign({}, AuthenticatorTOTPChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-totp' } as const); + case 'ak-stage-authenticator-validate': + return Object.assign({}, AuthenticatorValidationChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-validate' } as const); + case 'ak-stage-authenticator-webauthn': + return Object.assign({}, AuthenticatorWebAuthnChallengeFromJSONTyped(json, true), { component: 'ak-stage-authenticator-webauthn' } as const); + case 'ak-stage-autosubmit': + return Object.assign({}, AutosubmitChallengeFromJSONTyped(json, true), { component: 'ak-stage-autosubmit' } as const); + case 'ak-stage-captcha': + return Object.assign({}, CaptchaChallengeFromJSONTyped(json, true), { component: 'ak-stage-captcha' } as const); + case 'ak-stage-consent': + return Object.assign({}, ConsentChallengeFromJSONTyped(json, true), { component: 'ak-stage-consent' } as const); + case 'ak-stage-dummy': + return Object.assign({}, DummyChallengeFromJSONTyped(json, true), { component: 'ak-stage-dummy' } as const); + case 'ak-stage-email': + return Object.assign({}, EmailChallengeFromJSONTyped(json, true), { component: 'ak-stage-email' } as const); + case 'ak-stage-endpoint-agent': + return Object.assign({}, EndpointAgentChallengeFromJSONTyped(json, true), { component: 'ak-stage-endpoint-agent' } as const); + case 'ak-stage-flow-error': + return Object.assign({}, FlowErrorChallengeFromJSONTyped(json, true), { component: 'ak-stage-flow-error' } as const); + case 'ak-stage-identification': + return Object.assign({}, IdentificationChallengeFromJSONTyped(json, true), { component: 'ak-stage-identification' } as const); + case 'ak-stage-password': + return Object.assign({}, PasswordChallengeFromJSONTyped(json, true), { component: 'ak-stage-password' } as const); + case 'ak-stage-prompt': + return Object.assign({}, PromptChallengeFromJSONTyped(json, true), { component: 'ak-stage-prompt' } as const); + case 'ak-stage-session-end': + return Object.assign({}, SessionEndChallengeFromJSONTyped(json, true), { component: 'ak-stage-session-end' } as const); + case 'ak-stage-user-login': + return Object.assign({}, UserLoginChallengeFromJSONTyped(json, true), { component: 'ak-stage-user-login' } as const); + case 'xak-flow-frame': + return Object.assign({}, FrameChallengeFromJSONTyped(json, true), { component: 'xak-flow-frame' } as const); + case 'xak-flow-redirect': + return Object.assign({}, RedirectChallengeFromJSONTyped(json, true), { component: 'xak-flow-redirect' } as const); + case 'xak-flow-shell': + return Object.assign({}, ShellChallengeFromJSONTyped(json, true), { component: 'xak-flow-shell' } as const); + default: + return json; + } +} + +export function ChallengeTypesToJSON(json: any): any { + return ChallengeTypesToJSONTyped(json, false); +} + +export function ChallengeTypesToJSONTyped(value?: ChallengeTypes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['component']) { + case 'ak-provider-iframe-logout': + return Object.assign({}, IframeLogoutChallengeToJSON(value), { component: 'ak-provider-iframe-logout' } as const); + case 'ak-provider-oauth2-device-code': + return Object.assign({}, OAuthDeviceCodeChallengeToJSON(value), { component: 'ak-provider-oauth2-device-code' } as const); + case 'ak-provider-oauth2-device-code-finish': + return Object.assign({}, OAuthDeviceCodeFinishChallengeToJSON(value), { component: 'ak-provider-oauth2-device-code-finish' } as const); + case 'ak-provider-saml-native-logout': + return Object.assign({}, NativeLogoutChallengeToJSON(value), { component: 'ak-provider-saml-native-logout' } as const); + case 'ak-source-oauth-apple': + return Object.assign({}, AppleLoginChallengeToJSON(value), { component: 'ak-source-oauth-apple' } as const); + case 'ak-source-plex': + return Object.assign({}, PlexAuthenticationChallengeToJSON(value), { component: 'ak-source-plex' } as const); + case 'ak-source-telegram': + return Object.assign({}, TelegramLoginChallengeToJSON(value), { component: 'ak-source-telegram' } as const); + case 'ak-stage-access-denied': + return Object.assign({}, AccessDeniedChallengeToJSON(value), { component: 'ak-stage-access-denied' } as const); + case 'ak-stage-authenticator-duo': + return Object.assign({}, AuthenticatorDuoChallengeToJSON(value), { component: 'ak-stage-authenticator-duo' } as const); + case 'ak-stage-authenticator-email': + return Object.assign({}, AuthenticatorEmailChallengeToJSON(value), { component: 'ak-stage-authenticator-email' } as const); + case 'ak-stage-authenticator-sms': + return Object.assign({}, AuthenticatorSMSChallengeToJSON(value), { component: 'ak-stage-authenticator-sms' } as const); + case 'ak-stage-authenticator-static': + return Object.assign({}, AuthenticatorStaticChallengeToJSON(value), { component: 'ak-stage-authenticator-static' } as const); + case 'ak-stage-authenticator-totp': + return Object.assign({}, AuthenticatorTOTPChallengeToJSON(value), { component: 'ak-stage-authenticator-totp' } as const); + case 'ak-stage-authenticator-validate': + return Object.assign({}, AuthenticatorValidationChallengeToJSON(value), { component: 'ak-stage-authenticator-validate' } as const); + case 'ak-stage-authenticator-webauthn': + return Object.assign({}, AuthenticatorWebAuthnChallengeToJSON(value), { component: 'ak-stage-authenticator-webauthn' } as const); + case 'ak-stage-autosubmit': + return Object.assign({}, AutosubmitChallengeToJSON(value), { component: 'ak-stage-autosubmit' } as const); + case 'ak-stage-captcha': + return Object.assign({}, CaptchaChallengeToJSON(value), { component: 'ak-stage-captcha' } as const); + case 'ak-stage-consent': + return Object.assign({}, ConsentChallengeToJSON(value), { component: 'ak-stage-consent' } as const); + case 'ak-stage-dummy': + return Object.assign({}, DummyChallengeToJSON(value), { component: 'ak-stage-dummy' } as const); + case 'ak-stage-email': + return Object.assign({}, EmailChallengeToJSON(value), { component: 'ak-stage-email' } as const); + case 'ak-stage-endpoint-agent': + return Object.assign({}, EndpointAgentChallengeToJSON(value), { component: 'ak-stage-endpoint-agent' } as const); + case 'ak-stage-flow-error': + return Object.assign({}, FlowErrorChallengeToJSON(value), { component: 'ak-stage-flow-error' } as const); + case 'ak-stage-identification': + return Object.assign({}, IdentificationChallengeToJSON(value), { component: 'ak-stage-identification' } as const); + case 'ak-stage-password': + return Object.assign({}, PasswordChallengeToJSON(value), { component: 'ak-stage-password' } as const); + case 'ak-stage-prompt': + return Object.assign({}, PromptChallengeToJSON(value), { component: 'ak-stage-prompt' } as const); + case 'ak-stage-session-end': + return Object.assign({}, SessionEndChallengeToJSON(value), { component: 'ak-stage-session-end' } as const); + case 'ak-stage-user-login': + return Object.assign({}, UserLoginChallengeToJSON(value), { component: 'ak-stage-user-login' } as const); + case 'xak-flow-frame': + return Object.assign({}, FrameChallengeToJSON(value), { component: 'xak-flow-frame' } as const); + case 'xak-flow-redirect': + return Object.assign({}, RedirectChallengeToJSON(value), { component: 'xak-flow-redirect' } as const); + case 'xak-flow-shell': + return Object.assign({}, ShellChallengeToJSON(value), { component: 'xak-flow-shell' } as const); + default: + return value; + } +} + diff --git a/packages/client-ts/src/models/ClientTypeEnum.ts b/packages/client-ts/src/models/ClientTypeEnum.ts new file mode 100644 index 0000000000..ba1ac80c80 --- /dev/null +++ b/packages/client-ts/src/models/ClientTypeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ClientTypeEnum = { + Confidential: 'confidential', + Public: 'public', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ClientTypeEnum = typeof ClientTypeEnum[keyof typeof ClientTypeEnum]; + + +export function instanceOfClientTypeEnum(value: any): boolean { + for (const key in ClientTypeEnum) { + if (Object.prototype.hasOwnProperty.call(ClientTypeEnum, key)) { + if (ClientTypeEnum[key as keyof typeof ClientTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function ClientTypeEnumFromJSON(json: any): ClientTypeEnum { + return ClientTypeEnumFromJSONTyped(json, false); +} + +export function ClientTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientTypeEnum { + return json as ClientTypeEnum; +} + +export function ClientTypeEnumToJSON(value?: ClientTypeEnum | null): any { + return value as any; +} + +export function ClientTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ClientTypeEnum { + return value as ClientTypeEnum; +} + diff --git a/packages/client-ts/src/models/CompatibilityModeEnum.ts b/packages/client-ts/src/models/CompatibilityModeEnum.ts new file mode 100644 index 0000000000..8f8c16d103 --- /dev/null +++ b/packages/client-ts/src/models/CompatibilityModeEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const CompatibilityModeEnum = { + Default: 'default', + Aws: 'aws', + Slack: 'slack', + Sfdc: 'sfdc', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CompatibilityModeEnum = typeof CompatibilityModeEnum[keyof typeof CompatibilityModeEnum]; + + +export function instanceOfCompatibilityModeEnum(value: any): boolean { + for (const key in CompatibilityModeEnum) { + if (Object.prototype.hasOwnProperty.call(CompatibilityModeEnum, key)) { + if (CompatibilityModeEnum[key as keyof typeof CompatibilityModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function CompatibilityModeEnumFromJSON(json: any): CompatibilityModeEnum { + return CompatibilityModeEnumFromJSONTyped(json, false); +} + +export function CompatibilityModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompatibilityModeEnum { + return json as CompatibilityModeEnum; +} + +export function CompatibilityModeEnumToJSON(value?: CompatibilityModeEnum | null): any { + return value as any; +} + +export function CompatibilityModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): CompatibilityModeEnum { + return value as CompatibilityModeEnum; +} + diff --git a/packages/client-ts/src/models/Config.ts b/packages/client-ts/src/models/Config.ts new file mode 100644 index 0000000000..61b5bf13ac --- /dev/null +++ b/packages/client-ts/src/models/Config.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorReportingConfig } from './ErrorReportingConfig'; +import { + ErrorReportingConfigFromJSON, + ErrorReportingConfigFromJSONTyped, + ErrorReportingConfigToJSON, + ErrorReportingConfigToJSONTyped, +} from './ErrorReportingConfig'; +import type { CapabilitiesEnum } from './CapabilitiesEnum'; +import { + CapabilitiesEnumFromJSON, + CapabilitiesEnumFromJSONTyped, + CapabilitiesEnumToJSON, + CapabilitiesEnumToJSONTyped, +} from './CapabilitiesEnum'; + +/** + * Serialize authentik Config into DRF Object + * @export + * @interface Config + */ +export interface Config { + /** + * + * @type {ErrorReportingConfig} + * @memberof Config + */ + errorReporting: ErrorReportingConfig; + /** + * + * @type {Array} + * @memberof Config + */ + capabilities: Array; + /** + * + * @type {number} + * @memberof Config + */ + cacheTimeout: number; + /** + * + * @type {number} + * @memberof Config + */ + cacheTimeoutFlows: number; + /** + * + * @type {number} + * @memberof Config + */ + cacheTimeoutPolicies: number; +} + +/** + * Check if a given object implements the Config interface. + */ +export function instanceOfConfig(value: object): value is Config { + if (!('errorReporting' in value) || value['errorReporting'] === undefined) return false; + if (!('capabilities' in value) || value['capabilities'] === undefined) return false; + if (!('cacheTimeout' in value) || value['cacheTimeout'] === undefined) return false; + if (!('cacheTimeoutFlows' in value) || value['cacheTimeoutFlows'] === undefined) return false; + if (!('cacheTimeoutPolicies' in value) || value['cacheTimeoutPolicies'] === undefined) return false; + return true; +} + +export function ConfigFromJSON(json: any): Config { + return ConfigFromJSONTyped(json, false); +} + +export function ConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): Config { + if (json == null) { + return json; + } + return { + + 'errorReporting': ErrorReportingConfigFromJSON(json['error_reporting']), + 'capabilities': ((json['capabilities'] as Array).map(CapabilitiesEnumFromJSON)), + 'cacheTimeout': json['cache_timeout'], + 'cacheTimeoutFlows': json['cache_timeout_flows'], + 'cacheTimeoutPolicies': json['cache_timeout_policies'], + }; +} + +export function ConfigToJSON(json: any): Config { + return ConfigToJSONTyped(json, false); +} + +export function ConfigToJSONTyped(value?: Config | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error_reporting': ErrorReportingConfigToJSON(value['errorReporting']), + 'capabilities': ((value['capabilities'] as Array).map(CapabilitiesEnumToJSON)), + 'cache_timeout': value['cacheTimeout'], + 'cache_timeout_flows': value['cacheTimeoutFlows'], + 'cache_timeout_policies': value['cacheTimeoutPolicies'], + }; +} + diff --git a/packages/client-ts/src/models/ConnectionToken.ts b/packages/client-ts/src/models/ConnectionToken.ts new file mode 100644 index 0000000000..9bcd70fc26 --- /dev/null +++ b/packages/client-ts/src/models/ConnectionToken.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { Endpoint } from './Endpoint'; +import { + EndpointFromJSON, + EndpointFromJSONTyped, + EndpointToJSON, + EndpointToJSONTyped, +} from './Endpoint'; +import type { RACProvider } from './RACProvider'; +import { + RACProviderFromJSON, + RACProviderFromJSONTyped, + RACProviderToJSON, + RACProviderToJSONTyped, +} from './RACProvider'; + +/** + * ConnectionToken Serializer + * @export + * @interface ConnectionToken + */ +export interface ConnectionToken { + /** + * + * @type {string} + * @memberof ConnectionToken + */ + pk?: string; + /** + * + * @type {number} + * @memberof ConnectionToken + */ + provider: number; + /** + * + * @type {RACProvider} + * @memberof ConnectionToken + */ + readonly providerObj: RACProvider; + /** + * + * @type {string} + * @memberof ConnectionToken + */ + endpoint: string; + /** + * + * @type {Endpoint} + * @memberof ConnectionToken + */ + readonly endpointObj: Endpoint; + /** + * + * @type {PartialUser} + * @memberof ConnectionToken + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the ConnectionToken interface. + */ +export function instanceOfConnectionToken(value: object): value is ConnectionToken { + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('providerObj' in value) || value['providerObj'] === undefined) return false; + if (!('endpoint' in value) || value['endpoint'] === undefined) return false; + if (!('endpointObj' in value) || value['endpointObj'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function ConnectionTokenFromJSON(json: any): ConnectionToken { + return ConnectionTokenFromJSONTyped(json, false); +} + +export function ConnectionTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionToken { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'provider': json['provider'], + 'providerObj': RACProviderFromJSON(json['provider_obj']), + 'endpoint': json['endpoint'], + 'endpointObj': EndpointFromJSON(json['endpoint_obj']), + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function ConnectionTokenToJSON(json: any): ConnectionToken { + return ConnectionTokenToJSONTyped(json, false); +} + +export function ConnectionTokenToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'provider': value['provider'], + 'endpoint': value['endpoint'], + }; +} + diff --git a/packages/client-ts/src/models/ConnectionTokenRequest.ts b/packages/client-ts/src/models/ConnectionTokenRequest.ts new file mode 100644 index 0000000000..774e2eeff8 --- /dev/null +++ b/packages/client-ts/src/models/ConnectionTokenRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ConnectionToken Serializer + * @export + * @interface ConnectionTokenRequest + */ +export interface ConnectionTokenRequest { + /** + * + * @type {string} + * @memberof ConnectionTokenRequest + */ + pk?: string; + /** + * + * @type {number} + * @memberof ConnectionTokenRequest + */ + provider: number; + /** + * + * @type {string} + * @memberof ConnectionTokenRequest + */ + endpoint: string; +} + +/** + * Check if a given object implements the ConnectionTokenRequest interface. + */ +export function instanceOfConnectionTokenRequest(value: object): value is ConnectionTokenRequest { + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('endpoint' in value) || value['endpoint'] === undefined) return false; + return true; +} + +export function ConnectionTokenRequestFromJSON(json: any): ConnectionTokenRequest { + return ConnectionTokenRequestFromJSONTyped(json, false); +} + +export function ConnectionTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionTokenRequest { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'provider': json['provider'], + 'endpoint': json['endpoint'], + }; +} + +export function ConnectionTokenRequestToJSON(json: any): ConnectionTokenRequest { + return ConnectionTokenRequestToJSONTyped(json, false); +} + +export function ConnectionTokenRequestToJSONTyped(value?: ConnectionTokenRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'provider': value['provider'], + 'endpoint': value['endpoint'], + }; +} + diff --git a/packages/client-ts/src/models/Connector.ts b/packages/client-ts/src/models/Connector.ts new file mode 100644 index 0000000000..3ccbb7a900 --- /dev/null +++ b/packages/client-ts/src/models/Connector.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Connector + */ +export interface Connector { + /** + * + * @type {string} + * @memberof Connector + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof Connector + */ + name: string; + /** + * + * @type {boolean} + * @memberof Connector + */ + enabled?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof Connector + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof Connector + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof Connector + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof Connector + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the Connector interface. + */ +export function instanceOfConnector(value: object): value is Connector { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function ConnectorFromJSON(json: any): Connector { + return ConnectorFromJSONTyped(json, false); +} + +export function ConnectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Connector { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function ConnectorToJSON(json: any): Connector { + return ConnectorToJSONTyped(json, false); +} + +export function ConnectorToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + }; +} + diff --git a/packages/client-ts/src/models/ConsentChallenge.ts b/packages/client-ts/src/models/ConsentChallenge.ts new file mode 100644 index 0000000000..af842d7908 --- /dev/null +++ b/packages/client-ts/src/models/ConsentChallenge.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; +import type { ConsentPermission } from './ConsentPermission'; +import { + ConsentPermissionFromJSON, + ConsentPermissionFromJSONTyped, + ConsentPermissionToJSON, + ConsentPermissionToJSONTyped, +} from './ConsentPermission'; + +/** + * Challenge info for consent screens + * @export + * @interface ConsentChallenge + */ +export interface ConsentChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof ConsentChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof ConsentChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof ConsentChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof ConsentChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof ConsentChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof ConsentChallenge + */ + headerText?: string; + /** + * + * @type {Array} + * @memberof ConsentChallenge + */ + permissions: Array; + /** + * + * @type {Array} + * @memberof ConsentChallenge + */ + additionalPermissions: Array; + /** + * + * @type {string} + * @memberof ConsentChallenge + */ + token: string; +} + +/** + * Check if a given object implements the ConsentChallenge interface. + */ +export function instanceOfConsentChallenge(value: object): value is ConsentChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('permissions' in value) || value['permissions'] === undefined) return false; + if (!('additionalPermissions' in value) || value['additionalPermissions'] === undefined) return false; + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function ConsentChallengeFromJSON(json: any): ConsentChallenge { + return ConsentChallengeFromJSONTyped(json, false); +} + +export function ConsentChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'headerText': json['header_text'] == null ? undefined : json['header_text'], + 'permissions': ((json['permissions'] as Array).map(ConsentPermissionFromJSON)), + 'additionalPermissions': ((json['additional_permissions'] as Array).map(ConsentPermissionFromJSON)), + 'token': json['token'], + }; +} + +export function ConsentChallengeToJSON(json: any): ConsentChallenge { + return ConsentChallengeToJSONTyped(json, false); +} + +export function ConsentChallengeToJSONTyped(value?: ConsentChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'header_text': value['headerText'], + 'permissions': ((value['permissions'] as Array).map(ConsentPermissionToJSON)), + 'additional_permissions': ((value['additionalPermissions'] as Array).map(ConsentPermissionToJSON)), + 'token': value['token'], + }; +} + diff --git a/packages/client-ts/src/models/ConsentChallengeResponseRequest.ts b/packages/client-ts/src/models/ConsentChallengeResponseRequest.ts new file mode 100644 index 0000000000..110c27815d --- /dev/null +++ b/packages/client-ts/src/models/ConsentChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Consent challenge response, any valid response request is valid + * @export + * @interface ConsentChallengeResponseRequest + */ +export interface ConsentChallengeResponseRequest { + /** + * + * @type {string} + * @memberof ConsentChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof ConsentChallengeResponseRequest + */ + token: string; +} + +/** + * Check if a given object implements the ConsentChallengeResponseRequest interface. + */ +export function instanceOfConsentChallengeResponseRequest(value: object): value is ConsentChallengeResponseRequest { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function ConsentChallengeResponseRequestFromJSON(json: any): ConsentChallengeResponseRequest { + return ConsentChallengeResponseRequestFromJSONTyped(json, false); +} + +export function ConsentChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'token': json['token'], + }; +} + +export function ConsentChallengeResponseRequestToJSON(json: any): ConsentChallengeResponseRequest { + return ConsentChallengeResponseRequestToJSONTyped(json, false); +} + +export function ConsentChallengeResponseRequestToJSONTyped(value?: ConsentChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'token': value['token'], + }; +} + diff --git a/packages/client-ts/src/models/ConsentPermission.ts b/packages/client-ts/src/models/ConsentPermission.ts new file mode 100644 index 0000000000..5063f4e604 --- /dev/null +++ b/packages/client-ts/src/models/ConsentPermission.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Permission used for consent + * @export + * @interface ConsentPermission + */ +export interface ConsentPermission { + /** + * + * @type {string} + * @memberof ConsentPermission + */ + name: string; + /** + * + * @type {string} + * @memberof ConsentPermission + */ + id: string; +} + +/** + * Check if a given object implements the ConsentPermission interface. + */ +export function instanceOfConsentPermission(value: object): value is ConsentPermission { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function ConsentPermissionFromJSON(json: any): ConsentPermission { + return ConsentPermissionFromJSONTyped(json, false); +} + +export function ConsentPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentPermission { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'id': json['id'], + }; +} + +export function ConsentPermissionToJSON(json: any): ConsentPermission { + return ConsentPermissionToJSONTyped(json, false); +} + +export function ConsentPermissionToJSONTyped(value?: ConsentPermission | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'id': value['id'], + }; +} + diff --git a/packages/client-ts/src/models/ConsentStage.ts b/packages/client-ts/src/models/ConsentStage.ts new file mode 100644 index 0000000000..2d3372b8a0 --- /dev/null +++ b/packages/client-ts/src/models/ConsentStage.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ConsentStageModeEnum } from './ConsentStageModeEnum'; +import { + ConsentStageModeEnumFromJSON, + ConsentStageModeEnumFromJSONTyped, + ConsentStageModeEnumToJSON, + ConsentStageModeEnumToJSONTyped, +} from './ConsentStageModeEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * ConsentStage Serializer + * @export + * @interface ConsentStage + */ +export interface ConsentStage { + /** + * + * @type {string} + * @memberof ConsentStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof ConsentStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof ConsentStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof ConsentStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof ConsentStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof ConsentStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof ConsentStage + */ + readonly flowSet: Array; + /** + * + * @type {ConsentStageModeEnum} + * @memberof ConsentStage + */ + mode?: ConsentStageModeEnum; + /** + * Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof ConsentStage + */ + consentExpireIn?: string; +} + + + +/** + * Check if a given object implements the ConsentStage interface. + */ +export function instanceOfConsentStage(value: object): value is ConsentStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function ConsentStageFromJSON(json: any): ConsentStage { + return ConsentStageFromJSONTyped(json, false); +} + +export function ConsentStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'mode': json['mode'] == null ? undefined : ConsentStageModeEnumFromJSON(json['mode']), + 'consentExpireIn': json['consent_expire_in'] == null ? undefined : json['consent_expire_in'], + }; +} + +export function ConsentStageToJSON(json: any): ConsentStage { + return ConsentStageToJSONTyped(json, false); +} + +export function ConsentStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': ConsentStageModeEnumToJSON(value['mode']), + 'consent_expire_in': value['consentExpireIn'], + }; +} + diff --git a/packages/client-ts/src/models/ConsentStageModeEnum.ts b/packages/client-ts/src/models/ConsentStageModeEnum.ts new file mode 100644 index 0000000000..21c525910d --- /dev/null +++ b/packages/client-ts/src/models/ConsentStageModeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ConsentStageModeEnum = { + AlwaysRequire: 'always_require', + Permanent: 'permanent', + Expiring: 'expiring', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ConsentStageModeEnum = typeof ConsentStageModeEnum[keyof typeof ConsentStageModeEnum]; + + +export function instanceOfConsentStageModeEnum(value: any): boolean { + for (const key in ConsentStageModeEnum) { + if (Object.prototype.hasOwnProperty.call(ConsentStageModeEnum, key)) { + if (ConsentStageModeEnum[key as keyof typeof ConsentStageModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function ConsentStageModeEnumFromJSON(json: any): ConsentStageModeEnum { + return ConsentStageModeEnumFromJSONTyped(json, false); +} + +export function ConsentStageModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentStageModeEnum { + return json as ConsentStageModeEnum; +} + +export function ConsentStageModeEnumToJSON(value?: ConsentStageModeEnum | null): any { + return value as any; +} + +export function ConsentStageModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ConsentStageModeEnum { + return value as ConsentStageModeEnum; +} + diff --git a/packages/client-ts/src/models/ConsentStageRequest.ts b/packages/client-ts/src/models/ConsentStageRequest.ts new file mode 100644 index 0000000000..04ff0d4351 --- /dev/null +++ b/packages/client-ts/src/models/ConsentStageRequest.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ConsentStageModeEnum } from './ConsentStageModeEnum'; +import { + ConsentStageModeEnumFromJSON, + ConsentStageModeEnumFromJSONTyped, + ConsentStageModeEnumToJSON, + ConsentStageModeEnumToJSONTyped, +} from './ConsentStageModeEnum'; + +/** + * ConsentStage Serializer + * @export + * @interface ConsentStageRequest + */ +export interface ConsentStageRequest { + /** + * + * @type {string} + * @memberof ConsentStageRequest + */ + name: string; + /** + * + * @type {ConsentStageModeEnum} + * @memberof ConsentStageRequest + */ + mode?: ConsentStageModeEnum; + /** + * Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof ConsentStageRequest + */ + consentExpireIn?: string; +} + + + +/** + * Check if a given object implements the ConsentStageRequest interface. + */ +export function instanceOfConsentStageRequest(value: object): value is ConsentStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function ConsentStageRequestFromJSON(json: any): ConsentStageRequest { + return ConsentStageRequestFromJSONTyped(json, false); +} + +export function ConsentStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'mode': json['mode'] == null ? undefined : ConsentStageModeEnumFromJSON(json['mode']), + 'consentExpireIn': json['consent_expire_in'] == null ? undefined : json['consent_expire_in'], + }; +} + +export function ConsentStageRequestToJSON(json: any): ConsentStageRequest { + return ConsentStageRequestToJSONTyped(json, false); +} + +export function ConsentStageRequestToJSONTyped(value?: ConsentStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': ConsentStageModeEnumToJSON(value['mode']), + 'consent_expire_in': value['consentExpireIn'], + }; +} + diff --git a/packages/client-ts/src/models/ContentType.ts b/packages/client-ts/src/models/ContentType.ts new file mode 100644 index 0000000000..33bd8bfe60 --- /dev/null +++ b/packages/client-ts/src/models/ContentType.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ContentType + */ +export interface ContentType { + /** + * + * @type {number} + * @memberof ContentType + */ + readonly id: number; + /** + * + * @type {string} + * @memberof ContentType + */ + readonly appLabel: string; + /** + * + * @type {string} + * @memberof ContentType + */ + readonly model: string; + /** + * + * @type {string} + * @memberof ContentType + */ + readonly verboseNamePlural: string; +} + +/** + * Check if a given object implements the ContentType interface. + */ +export function instanceOfContentType(value: object): value is ContentType { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('appLabel' in value) || value['appLabel'] === undefined) return false; + if (!('model' in value) || value['model'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + return true; +} + +export function ContentTypeFromJSON(json: any): ContentType { + return ContentTypeFromJSONTyped(json, false); +} + +export function ContentTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentType { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'appLabel': json['app_label'], + 'model': json['model'], + 'verboseNamePlural': json['verbose_name_plural'], + }; +} + +export function ContentTypeToJSON(json: any): ContentType { + return ContentTypeToJSONTyped(json, false); +} + +export function ContentTypeToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/ContentTypeEnum.ts b/packages/client-ts/src/models/ContentTypeEnum.ts new file mode 100644 index 0000000000..a92ed7dff9 --- /dev/null +++ b/packages/client-ts/src/models/ContentTypeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ContentTypeEnum = { + AuthentikCoreApplication: 'authentik_core.application', + AuthentikCoreGroup: 'authentik_core.group', + AuthentikRbacRole: 'authentik_rbac.role', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ContentTypeEnum = typeof ContentTypeEnum[keyof typeof ContentTypeEnum]; + + +export function instanceOfContentTypeEnum(value: any): boolean { + for (const key in ContentTypeEnum) { + if (Object.prototype.hasOwnProperty.call(ContentTypeEnum, key)) { + if (ContentTypeEnum[key as keyof typeof ContentTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function ContentTypeEnumFromJSON(json: any): ContentTypeEnum { + return ContentTypeEnumFromJSONTyped(json, false); +} + +export function ContentTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentTypeEnum { + return json as ContentTypeEnum; +} + +export function ContentTypeEnumToJSON(value?: ContentTypeEnum | null): any { + return value as any; +} + +export function ContentTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ContentTypeEnum { + return value as ContentTypeEnum; +} + diff --git a/packages/client-ts/src/models/ContextualFlowInfo.ts b/packages/client-ts/src/models/ContextualFlowInfo.ts new file mode 100644 index 0000000000..a0fd8c45b4 --- /dev/null +++ b/packages/client-ts/src/models/ContextualFlowInfo.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { ContextualFlowInfoLayoutEnum } from './ContextualFlowInfoLayoutEnum'; +import { + ContextualFlowInfoLayoutEnumFromJSON, + ContextualFlowInfoLayoutEnumFromJSONTyped, + ContextualFlowInfoLayoutEnumToJSON, + ContextualFlowInfoLayoutEnumToJSONTyped, +} from './ContextualFlowInfoLayoutEnum'; + +/** + * Contextual flow information for a challenge + * @export + * @interface ContextualFlowInfo + */ +export interface ContextualFlowInfo { + /** + * + * @type {string} + * @memberof ContextualFlowInfo + */ + title?: string; + /** + * + * @type {string} + * @memberof ContextualFlowInfo + */ + background?: string; + /** + * + * @type {ThemedUrls} + * @memberof ContextualFlowInfo + */ + backgroundThemedUrls?: ThemedUrls | null; + /** + * + * @type {string} + * @memberof ContextualFlowInfo + */ + cancelUrl: string; + /** + * + * @type {ContextualFlowInfoLayoutEnum} + * @memberof ContextualFlowInfo + */ + layout: ContextualFlowInfoLayoutEnum; +} + + + +/** + * Check if a given object implements the ContextualFlowInfo interface. + */ +export function instanceOfContextualFlowInfo(value: object): value is ContextualFlowInfo { + if (!('cancelUrl' in value) || value['cancelUrl'] === undefined) return false; + if (!('layout' in value) || value['layout'] === undefined) return false; + return true; +} + +export function ContextualFlowInfoFromJSON(json: any): ContextualFlowInfo { + return ContextualFlowInfoFromJSONTyped(json, false); +} + +export function ContextualFlowInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContextualFlowInfo { + if (json == null) { + return json; + } + return { + + 'title': json['title'] == null ? undefined : json['title'], + 'background': json['background'] == null ? undefined : json['background'], + 'backgroundThemedUrls': json['background_themed_urls'] == null ? undefined : ThemedUrlsFromJSON(json['background_themed_urls']), + 'cancelUrl': json['cancel_url'], + 'layout': ContextualFlowInfoLayoutEnumFromJSON(json['layout']), + }; +} + +export function ContextualFlowInfoToJSON(json: any): ContextualFlowInfo { + return ContextualFlowInfoToJSONTyped(json, false); +} + +export function ContextualFlowInfoToJSONTyped(value?: ContextualFlowInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'title': value['title'], + 'background': value['background'], + 'background_themed_urls': ThemedUrlsToJSON(value['backgroundThemedUrls']), + 'cancel_url': value['cancelUrl'], + 'layout': ContextualFlowInfoLayoutEnumToJSON(value['layout']), + }; +} + diff --git a/packages/client-ts/src/models/ContextualFlowInfoLayoutEnum.ts b/packages/client-ts/src/models/ContextualFlowInfoLayoutEnum.ts new file mode 100644 index 0000000000..d1ad83cf87 --- /dev/null +++ b/packages/client-ts/src/models/ContextualFlowInfoLayoutEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ContextualFlowInfoLayoutEnum = { + Stacked: 'stacked', + ContentLeft: 'content_left', + ContentRight: 'content_right', + SidebarLeft: 'sidebar_left', + SidebarRight: 'sidebar_right', + SidebarLeftFrameBackground: 'sidebar_left_frame_background', + SidebarRightFrameBackground: 'sidebar_right_frame_background', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ContextualFlowInfoLayoutEnum = typeof ContextualFlowInfoLayoutEnum[keyof typeof ContextualFlowInfoLayoutEnum]; + + +export function instanceOfContextualFlowInfoLayoutEnum(value: any): boolean { + for (const key in ContextualFlowInfoLayoutEnum) { + if (Object.prototype.hasOwnProperty.call(ContextualFlowInfoLayoutEnum, key)) { + if (ContextualFlowInfoLayoutEnum[key as keyof typeof ContextualFlowInfoLayoutEnum] === value) { + return true; + } + } + } + return false; +} + +export function ContextualFlowInfoLayoutEnumFromJSON(json: any): ContextualFlowInfoLayoutEnum { + return ContextualFlowInfoLayoutEnumFromJSONTyped(json, false); +} + +export function ContextualFlowInfoLayoutEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContextualFlowInfoLayoutEnum { + return json as ContextualFlowInfoLayoutEnum; +} + +export function ContextualFlowInfoLayoutEnumToJSON(value?: ContextualFlowInfoLayoutEnum | null): any { + return value as any; +} + +export function ContextualFlowInfoLayoutEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ContextualFlowInfoLayoutEnum { + return value as ContextualFlowInfoLayoutEnum; +} + diff --git a/packages/client-ts/src/models/CountryCodeEnum.ts b/packages/client-ts/src/models/CountryCodeEnum.ts new file mode 100644 index 0000000000..69c482b2a3 --- /dev/null +++ b/packages/client-ts/src/models/CountryCodeEnum.ts @@ -0,0 +1,301 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const CountryCodeEnum = { + Af: 'AF', + Ax: 'AX', + Al: 'AL', + Dz: 'DZ', + As: 'AS', + Ad: 'AD', + Ao: 'AO', + Ai: 'AI', + Aq: 'AQ', + Ag: 'AG', + Ar: 'AR', + Am: 'AM', + Aw: 'AW', + Au: 'AU', + At: 'AT', + Az: 'AZ', + Bs: 'BS', + Bh: 'BH', + Bd: 'BD', + Bb: 'BB', + By: 'BY', + Be: 'BE', + Bz: 'BZ', + Bj: 'BJ', + Bm: 'BM', + Bt: 'BT', + Bo: 'BO', + Bq: 'BQ', + Ba: 'BA', + Bw: 'BW', + Bv: 'BV', + Br: 'BR', + Io: 'IO', + Bn: 'BN', + Bg: 'BG', + Bf: 'BF', + Bi: 'BI', + Cv: 'CV', + Kh: 'KH', + Cm: 'CM', + Ca: 'CA', + Ky: 'KY', + Cf: 'CF', + Td: 'TD', + Cl: 'CL', + Cn: 'CN', + Cx: 'CX', + Cc: 'CC', + Co: 'CO', + Km: 'KM', + Cg: 'CG', + Ck: 'CK', + Cr: 'CR', + Ci: 'CI', + Hr: 'HR', + Cu: 'CU', + Cw: 'CW', + Cy: 'CY', + Cz: 'CZ', + Cd: 'CD', + Dk: 'DK', + Dj: 'DJ', + Dm: 'DM', + Do: 'DO', + Ec: 'EC', + Eg: 'EG', + Sv: 'SV', + Gq: 'GQ', + Er: 'ER', + Ee: 'EE', + Sz: 'SZ', + Et: 'ET', + Fk: 'FK', + Fo: 'FO', + Fj: 'FJ', + Fi: 'FI', + Fr: 'FR', + Gf: 'GF', + Pf: 'PF', + Tf: 'TF', + Ga: 'GA', + Gm: 'GM', + Ge: 'GE', + De: 'DE', + Gh: 'GH', + Gi: 'GI', + Gr: 'GR', + Gl: 'GL', + Gd: 'GD', + Gp: 'GP', + Gu: 'GU', + Gt: 'GT', + Gg: 'GG', + Gn: 'GN', + Gw: 'GW', + Gy: 'GY', + Ht: 'HT', + Hm: 'HM', + Hn: 'HN', + Hk: 'HK', + Hu: 'HU', + Is: 'IS', + In: 'IN', + Id: 'ID', + Ir: 'IR', + Iq: 'IQ', + Ie: 'IE', + Im: 'IM', + Il: 'IL', + It: 'IT', + Jm: 'JM', + Jp: 'JP', + Je: 'JE', + Jo: 'JO', + Kz: 'KZ', + Ke: 'KE', + Ki: 'KI', + Kw: 'KW', + Kg: 'KG', + La: 'LA', + Lv: 'LV', + Lb: 'LB', + Ls: 'LS', + Lr: 'LR', + Ly: 'LY', + Li: 'LI', + Lt: 'LT', + Lu: 'LU', + Mo: 'MO', + Mg: 'MG', + Mw: 'MW', + My: 'MY', + Mv: 'MV', + Ml: 'ML', + Mt: 'MT', + Mh: 'MH', + Mq: 'MQ', + Mr: 'MR', + Mu: 'MU', + Yt: 'YT', + Mx: 'MX', + Fm: 'FM', + Md: 'MD', + Mc: 'MC', + Mn: 'MN', + Me: 'ME', + Ms: 'MS', + Ma: 'MA', + Mz: 'MZ', + Mm: 'MM', + Na: 'NA', + Nr: 'NR', + Np: 'NP', + Nl: 'NL', + Nc: 'NC', + Nz: 'NZ', + Ni: 'NI', + Ne: 'NE', + Ng: 'NG', + Nu: 'NU', + Nf: 'NF', + Kp: 'KP', + Mk: 'MK', + Mp: 'MP', + No: 'NO', + Om: 'OM', + Pk: 'PK', + Pw: 'PW', + Ps: 'PS', + Pa: 'PA', + Pg: 'PG', + Py: 'PY', + Pe: 'PE', + Ph: 'PH', + Pn: 'PN', + Pl: 'PL', + Pt: 'PT', + Pr: 'PR', + Qa: 'QA', + Re: 'RE', + Ro: 'RO', + Ru: 'RU', + Rw: 'RW', + Bl: 'BL', + Sh: 'SH', + Kn: 'KN', + Lc: 'LC', + Mf: 'MF', + Pm: 'PM', + Vc: 'VC', + Ws: 'WS', + Sm: 'SM', + St: 'ST', + Sa: 'SA', + Sn: 'SN', + Rs: 'RS', + Sc: 'SC', + Sl: 'SL', + Sg: 'SG', + Sx: 'SX', + Sk: 'SK', + Si: 'SI', + Sb: 'SB', + So: 'SO', + Za: 'ZA', + Gs: 'GS', + Kr: 'KR', + Ss: 'SS', + Es: 'ES', + Lk: 'LK', + Sd: 'SD', + Sr: 'SR', + Sj: 'SJ', + Se: 'SE', + Ch: 'CH', + Sy: 'SY', + Tw: 'TW', + Tj: 'TJ', + Tz: 'TZ', + Th: 'TH', + Tl: 'TL', + Tg: 'TG', + Tk: 'TK', + To: 'TO', + Tt: 'TT', + Tn: 'TN', + Tr: 'TR', + Tm: 'TM', + Tc: 'TC', + Tv: 'TV', + Ug: 'UG', + Ua: 'UA', + Ae: 'AE', + Gb: 'GB', + Um: 'UM', + Us: 'US', + Uy: 'UY', + Uz: 'UZ', + Vu: 'VU', + Va: 'VA', + Ve: 'VE', + Vn: 'VN', + Vg: 'VG', + Vi: 'VI', + Wf: 'WF', + Eh: 'EH', + Ye: 'YE', + Zm: 'ZM', + Zw: 'ZW', + UnknownDefaultOpenApi: '11184809' +} as const; +export type CountryCodeEnum = typeof CountryCodeEnum[keyof typeof CountryCodeEnum]; + + +export function instanceOfCountryCodeEnum(value: any): boolean { + for (const key in CountryCodeEnum) { + if (Object.prototype.hasOwnProperty.call(CountryCodeEnum, key)) { + if (CountryCodeEnum[key as keyof typeof CountryCodeEnum] === value) { + return true; + } + } + } + return false; +} + +export function CountryCodeEnumFromJSON(json: any): CountryCodeEnum { + return CountryCodeEnumFromJSONTyped(json, false); +} + +export function CountryCodeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): CountryCodeEnum { + return json as CountryCodeEnum; +} + +export function CountryCodeEnumToJSON(value?: CountryCodeEnum | null): any { + return value as any; +} + +export function CountryCodeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): CountryCodeEnum { + return value as CountryCodeEnum; +} + diff --git a/packages/client-ts/src/models/CurrentBrand.ts b/packages/client-ts/src/models/CurrentBrand.ts new file mode 100644 index 0000000000..59640accb3 --- /dev/null +++ b/packages/client-ts/src/models/CurrentBrand.ts @@ -0,0 +1,230 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CurrentBrandFlags } from './CurrentBrandFlags'; +import { + CurrentBrandFlagsFromJSON, + CurrentBrandFlagsFromJSONTyped, + CurrentBrandFlagsToJSON, + CurrentBrandFlagsToJSONTyped, +} from './CurrentBrandFlags'; +import type { UiThemeEnum } from './UiThemeEnum'; +import { + UiThemeEnumFromJSON, + UiThemeEnumFromJSONTyped, + UiThemeEnumToJSON, + UiThemeEnumToJSONTyped, +} from './UiThemeEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { FooterLink } from './FooterLink'; +import { + FooterLinkFromJSON, + FooterLinkFromJSONTyped, + FooterLinkToJSON, + FooterLinkToJSONTyped, +} from './FooterLink'; + +/** + * Partial brand information for styling + * @export + * @interface CurrentBrand + */ +export interface CurrentBrand { + /** + * + * @type {string} + * @memberof CurrentBrand + */ + matchedDomain: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + brandingTitle: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + brandingLogo: string; + /** + * + * @type {ThemedUrls} + * @memberof CurrentBrand + */ + readonly brandingLogoThemedUrls: ThemedUrls | null; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + brandingFavicon: string; + /** + * + * @type {ThemedUrls} + * @memberof CurrentBrand + */ + readonly brandingFaviconThemedUrls: ThemedUrls | null; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + brandingCustomCss: string; + /** + * + * @type {Array} + * @memberof CurrentBrand + */ + readonly uiFooterLinks: Array; + /** + * + * @type {UiThemeEnum} + * @memberof CurrentBrand + */ + readonly uiTheme: UiThemeEnum; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + flowAuthentication?: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + flowInvalidation?: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + flowRecovery?: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + flowUnenrollment?: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + flowUserSettings?: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + flowDeviceCode?: string; + /** + * + * @type {string} + * @memberof CurrentBrand + */ + readonly defaultLocale: string; + /** + * + * @type {CurrentBrandFlags} + * @memberof CurrentBrand + */ + flags: CurrentBrandFlags; +} + + + +/** + * Check if a given object implements the CurrentBrand interface. + */ +export function instanceOfCurrentBrand(value: object): value is CurrentBrand { + if (!('matchedDomain' in value) || value['matchedDomain'] === undefined) return false; + if (!('brandingTitle' in value) || value['brandingTitle'] === undefined) return false; + if (!('brandingLogo' in value) || value['brandingLogo'] === undefined) return false; + if (!('brandingLogoThemedUrls' in value) || value['brandingLogoThemedUrls'] === undefined) return false; + if (!('brandingFavicon' in value) || value['brandingFavicon'] === undefined) return false; + if (!('brandingFaviconThemedUrls' in value) || value['brandingFaviconThemedUrls'] === undefined) return false; + if (!('brandingCustomCss' in value) || value['brandingCustomCss'] === undefined) return false; + if (!('uiFooterLinks' in value) || value['uiFooterLinks'] === undefined) return false; + if (!('uiTheme' in value) || value['uiTheme'] === undefined) return false; + if (!('defaultLocale' in value) || value['defaultLocale'] === undefined) return false; + if (!('flags' in value) || value['flags'] === undefined) return false; + return true; +} + +export function CurrentBrandFromJSON(json: any): CurrentBrand { + return CurrentBrandFromJSONTyped(json, false); +} + +export function CurrentBrandFromJSONTyped(json: any, ignoreDiscriminator: boolean): CurrentBrand { + if (json == null) { + return json; + } + return { + + 'matchedDomain': json['matched_domain'], + 'brandingTitle': json['branding_title'], + 'brandingLogo': json['branding_logo'], + 'brandingLogoThemedUrls': ThemedUrlsFromJSON(json['branding_logo_themed_urls']), + 'brandingFavicon': json['branding_favicon'], + 'brandingFaviconThemedUrls': ThemedUrlsFromJSON(json['branding_favicon_themed_urls']), + 'brandingCustomCss': json['branding_custom_css'], + 'uiFooterLinks': ((json['ui_footer_links'] as Array).map(FooterLinkFromJSON)), + 'uiTheme': UiThemeEnumFromJSON(json['ui_theme']), + 'flowAuthentication': json['flow_authentication'] == null ? undefined : json['flow_authentication'], + 'flowInvalidation': json['flow_invalidation'] == null ? undefined : json['flow_invalidation'], + 'flowRecovery': json['flow_recovery'] == null ? undefined : json['flow_recovery'], + 'flowUnenrollment': json['flow_unenrollment'] == null ? undefined : json['flow_unenrollment'], + 'flowUserSettings': json['flow_user_settings'] == null ? undefined : json['flow_user_settings'], + 'flowDeviceCode': json['flow_device_code'] == null ? undefined : json['flow_device_code'], + 'defaultLocale': json['default_locale'], + 'flags': CurrentBrandFlagsFromJSON(json['flags']), + }; +} + +export function CurrentBrandToJSON(json: any): CurrentBrand { + return CurrentBrandToJSONTyped(json, false); +} + +export function CurrentBrandToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'matched_domain': value['matchedDomain'], + 'branding_title': value['brandingTitle'], + 'branding_logo': value['brandingLogo'], + 'branding_favicon': value['brandingFavicon'], + 'branding_custom_css': value['brandingCustomCss'], + 'flow_authentication': value['flowAuthentication'], + 'flow_invalidation': value['flowInvalidation'], + 'flow_recovery': value['flowRecovery'], + 'flow_unenrollment': value['flowUnenrollment'], + 'flow_user_settings': value['flowUserSettings'], + 'flow_device_code': value['flowDeviceCode'], + 'flags': CurrentBrandFlagsToJSON(value['flags']), + }; +} + diff --git a/packages/client-ts/src/models/CurrentBrandFlags.ts b/packages/client-ts/src/models/CurrentBrandFlags.ts new file mode 100644 index 0000000000..8c0190f55f --- /dev/null +++ b/packages/client-ts/src/models/CurrentBrandFlags.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CurrentBrandFlags + */ +export interface CurrentBrandFlags { + /** + * Configure if applications without any policy/group/user bindings should be accessible to any user. + * @type {boolean} + * @memberof CurrentBrandFlags + */ + coreDefaultAppAccess: boolean; + /** + * Include additional information in audit logs, may incur a performance penalty. + * @type {boolean} + * @memberof CurrentBrandFlags + */ + enterpriseAuditIncludeExpandedDiff: boolean; + /** + * Upon successful authentication, re-start authentication in other open tabs. + * @type {boolean} + * @memberof CurrentBrandFlags + */ + flowsContinuousLogin: boolean; + /** + * Refresh other tabs after successful authentication. + * @type {boolean} + * @memberof CurrentBrandFlags + */ + flowsRefreshOthers: boolean; +} + +/** + * Check if a given object implements the CurrentBrandFlags interface. + */ +export function instanceOfCurrentBrandFlags(value: object): value is CurrentBrandFlags { + if (!('coreDefaultAppAccess' in value) || value['coreDefaultAppAccess'] === undefined) return false; + if (!('enterpriseAuditIncludeExpandedDiff' in value) || value['enterpriseAuditIncludeExpandedDiff'] === undefined) return false; + if (!('flowsContinuousLogin' in value) || value['flowsContinuousLogin'] === undefined) return false; + if (!('flowsRefreshOthers' in value) || value['flowsRefreshOthers'] === undefined) return false; + return true; +} + +export function CurrentBrandFlagsFromJSON(json: any): CurrentBrandFlags { + return CurrentBrandFlagsFromJSONTyped(json, false); +} + +export function CurrentBrandFlagsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CurrentBrandFlags { + if (json == null) { + return json; + } + return { + + 'coreDefaultAppAccess': json['core_default_app_access'], + 'enterpriseAuditIncludeExpandedDiff': json['enterprise_audit_include_expanded_diff'], + 'flowsContinuousLogin': json['flows_continuous_login'], + 'flowsRefreshOthers': json['flows_refresh_others'], + }; +} + +export function CurrentBrandFlagsToJSON(json: any): CurrentBrandFlags { + return CurrentBrandFlagsToJSONTyped(json, false); +} + +export function CurrentBrandFlagsToJSONTyped(value?: CurrentBrandFlags | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'core_default_app_access': value['coreDefaultAppAccess'], + 'enterprise_audit_include_expanded_diff': value['enterpriseAuditIncludeExpandedDiff'], + 'flows_continuous_login': value['flowsContinuousLogin'], + 'flows_refresh_others': value['flowsRefreshOthers'], + }; +} + diff --git a/packages/client-ts/src/models/DataExport.ts b/packages/client-ts/src/models/DataExport.ts new file mode 100644 index 0000000000..20a7783ac9 --- /dev/null +++ b/packages/client-ts/src/models/DataExport.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { ContentType } from './ContentType'; +import { + ContentTypeFromJSON, + ContentTypeFromJSONTyped, + ContentTypeToJSON, + ContentTypeToJSONTyped, +} from './ContentType'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface DataExport + */ +export interface DataExport { + /** + * + * @type {string} + * @memberof DataExport + */ + readonly id: string; + /** + * + * @type {PartialUser} + * @memberof DataExport + */ + readonly requestedBy: PartialUser; + /** + * + * @type {Date} + * @memberof DataExport + */ + readonly requestedOn: Date; + /** + * + * @type {ContentType} + * @memberof DataExport + */ + readonly contentType: ContentType; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DataExport + */ + queryParams: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof DataExport + */ + readonly fileUrl: string; + /** + * + * @type {boolean} + * @memberof DataExport + */ + readonly completed: boolean; +} + +/** + * Check if a given object implements the DataExport interface. + */ +export function instanceOfDataExport(value: object): value is DataExport { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('requestedBy' in value) || value['requestedBy'] === undefined) return false; + if (!('requestedOn' in value) || value['requestedOn'] === undefined) return false; + if (!('contentType' in value) || value['contentType'] === undefined) return false; + if (!('queryParams' in value) || value['queryParams'] === undefined) return false; + if (!('fileUrl' in value) || value['fileUrl'] === undefined) return false; + if (!('completed' in value) || value['completed'] === undefined) return false; + return true; +} + +export function DataExportFromJSON(json: any): DataExport { + return DataExportFromJSONTyped(json, false); +} + +export function DataExportFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataExport { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'requestedBy': PartialUserFromJSON(json['requested_by']), + 'requestedOn': (new Date(json['requested_on'])), + 'contentType': ContentTypeFromJSON(json['content_type']), + 'queryParams': json['query_params'], + 'fileUrl': json['file_url'], + 'completed': json['completed'], + }; +} + +export function DataExportToJSON(json: any): DataExport { + return DataExportToJSONTyped(json, false); +} + +export function DataExportToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'query_params': value['queryParams'], + }; +} + diff --git a/packages/client-ts/src/models/DeliveryMethodEnum.ts b/packages/client-ts/src/models/DeliveryMethodEnum.ts new file mode 100644 index 0000000000..f6ab12c0a7 --- /dev/null +++ b/packages/client-ts/src/models/DeliveryMethodEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DeliveryMethodEnum = { + HttpsSchemasOpenidNetSeceventRiscDeliveryMethodPush: 'https://schemas.openid.net/secevent/risc/delivery-method/push', + HttpsSchemasOpenidNetSeceventRiscDeliveryMethodPoll: 'https://schemas.openid.net/secevent/risc/delivery-method/poll', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DeliveryMethodEnum = typeof DeliveryMethodEnum[keyof typeof DeliveryMethodEnum]; + + +export function instanceOfDeliveryMethodEnum(value: any): boolean { + for (const key in DeliveryMethodEnum) { + if (Object.prototype.hasOwnProperty.call(DeliveryMethodEnum, key)) { + if (DeliveryMethodEnum[key as keyof typeof DeliveryMethodEnum] === value) { + return true; + } + } + } + return false; +} + +export function DeliveryMethodEnumFromJSON(json: any): DeliveryMethodEnum { + return DeliveryMethodEnumFromJSONTyped(json, false); +} + +export function DeliveryMethodEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeliveryMethodEnum { + return json as DeliveryMethodEnum; +} + +export function DeliveryMethodEnumToJSON(value?: DeliveryMethodEnum | null): any { + return value as any; +} + +export function DeliveryMethodEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DeliveryMethodEnum { + return value as DeliveryMethodEnum; +} + diff --git a/packages/client-ts/src/models/DeniedActionEnum.ts b/packages/client-ts/src/models/DeniedActionEnum.ts new file mode 100644 index 0000000000..aa5e6a05b0 --- /dev/null +++ b/packages/client-ts/src/models/DeniedActionEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DeniedActionEnum = { + MessageContinue: 'message_continue', + Message: 'message', + Continue: 'continue', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DeniedActionEnum = typeof DeniedActionEnum[keyof typeof DeniedActionEnum]; + + +export function instanceOfDeniedActionEnum(value: any): boolean { + for (const key in DeniedActionEnum) { + if (Object.prototype.hasOwnProperty.call(DeniedActionEnum, key)) { + if (DeniedActionEnum[key as keyof typeof DeniedActionEnum] === value) { + return true; + } + } + } + return false; +} + +export function DeniedActionEnumFromJSON(json: any): DeniedActionEnum { + return DeniedActionEnumFromJSONTyped(json, false); +} + +export function DeniedActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeniedActionEnum { + return json as DeniedActionEnum; +} + +export function DeniedActionEnumToJSON(value?: DeniedActionEnum | null): any { + return value as any; +} + +export function DeniedActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DeniedActionEnum { + return value as DeniedActionEnum; +} + diff --git a/packages/client-ts/src/models/DenyStage.ts b/packages/client-ts/src/models/DenyStage.ts new file mode 100644 index 0000000000..d949cc40b1 --- /dev/null +++ b/packages/client-ts/src/models/DenyStage.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * DenyStage Serializer + * @export + * @interface DenyStage + */ +export interface DenyStage { + /** + * + * @type {string} + * @memberof DenyStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof DenyStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof DenyStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof DenyStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof DenyStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof DenyStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof DenyStage + */ + readonly flowSet: Array; + /** + * + * @type {string} + * @memberof DenyStage + */ + denyMessage?: string; +} + +/** + * Check if a given object implements the DenyStage interface. + */ +export function instanceOfDenyStage(value: object): value is DenyStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function DenyStageFromJSON(json: any): DenyStage { + return DenyStageFromJSONTyped(json, false); +} + +export function DenyStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): DenyStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'denyMessage': json['deny_message'] == null ? undefined : json['deny_message'], + }; +} + +export function DenyStageToJSON(json: any): DenyStage { + return DenyStageToJSONTyped(json, false); +} + +export function DenyStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'deny_message': value['denyMessage'], + }; +} + diff --git a/packages/client-ts/src/models/DenyStageRequest.ts b/packages/client-ts/src/models/DenyStageRequest.ts new file mode 100644 index 0000000000..ccdcedc389 --- /dev/null +++ b/packages/client-ts/src/models/DenyStageRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DenyStage Serializer + * @export + * @interface DenyStageRequest + */ +export interface DenyStageRequest { + /** + * + * @type {string} + * @memberof DenyStageRequest + */ + name: string; + /** + * + * @type {string} + * @memberof DenyStageRequest + */ + denyMessage?: string; +} + +/** + * Check if a given object implements the DenyStageRequest interface. + */ +export function instanceOfDenyStageRequest(value: object): value is DenyStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DenyStageRequestFromJSON(json: any): DenyStageRequest { + return DenyStageRequestFromJSONTyped(json, false); +} + +export function DenyStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DenyStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'denyMessage': json['deny_message'] == null ? undefined : json['deny_message'], + }; +} + +export function DenyStageRequestToJSON(json: any): DenyStageRequest { + return DenyStageRequestToJSONTyped(json, false); +} + +export function DenyStageRequestToJSONTyped(value?: DenyStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'deny_message': value['denyMessage'], + }; +} + diff --git a/packages/client-ts/src/models/DetailedCountry.ts b/packages/client-ts/src/models/DetailedCountry.ts new file mode 100644 index 0000000000..701c0f70cd --- /dev/null +++ b/packages/client-ts/src/models/DetailedCountry.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CountryCodeEnum } from './CountryCodeEnum'; +import { + CountryCodeEnumFromJSON, + CountryCodeEnumFromJSONTyped, + CountryCodeEnumToJSON, + CountryCodeEnumToJSONTyped, +} from './CountryCodeEnum'; + +/** + * + * @export + * @interface DetailedCountry + */ +export interface DetailedCountry { + /** + * + * @type {CountryCodeEnum} + * @memberof DetailedCountry + */ + code: CountryCodeEnum; + /** + * + * @type {string} + * @memberof DetailedCountry + */ + name: string; +} + + + +/** + * Check if a given object implements the DetailedCountry interface. + */ +export function instanceOfDetailedCountry(value: object): value is DetailedCountry { + if (!('code' in value) || value['code'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DetailedCountryFromJSON(json: any): DetailedCountry { + return DetailedCountryFromJSONTyped(json, false); +} + +export function DetailedCountryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedCountry { + if (json == null) { + return json; + } + return { + + 'code': CountryCodeEnumFromJSON(json['code']), + 'name': json['name'], + }; +} + +export function DetailedCountryToJSON(json: any): DetailedCountry { + return DetailedCountryToJSONTyped(json, false); +} + +export function DetailedCountryToJSONTyped(value?: DetailedCountry | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'code': CountryCodeEnumToJSON(value['code']), + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/Device.ts b/packages/client-ts/src/models/Device.ts new file mode 100644 index 0000000000..e9172df451 --- /dev/null +++ b/packages/client-ts/src/models/Device.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for authenticator devices + * @export + * @interface Device + */ +export interface Device { + /** + * Return object's verbose_name + * @type {string} + * @memberof Device + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof Device + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof Device + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof Device + */ + pk: string; + /** + * + * @type {string} + * @memberof Device + */ + name: string; + /** + * Get type of device + * @type {string} + * @memberof Device + */ + readonly type: string; + /** + * + * @type {boolean} + * @memberof Device + */ + confirmed: boolean; + /** + * + * @type {Date} + * @memberof Device + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof Device + */ + readonly lastUpdated: Date; + /** + * + * @type {Date} + * @memberof Device + */ + readonly lastUsed: Date | null; + /** + * Get extra description + * @type {string} + * @memberof Device + */ + readonly extraDescription: string | null; + /** + * Get external Device ID + * @type {string} + * @memberof Device + */ + readonly externalId: string | null; +} + +/** + * Check if a given object implements the Device interface. + */ +export function instanceOfDevice(value: object): value is Device { + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('confirmed' in value) || value['confirmed'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + if (!('lastUsed' in value) || value['lastUsed'] === undefined) return false; + if (!('extraDescription' in value) || value['extraDescription'] === undefined) return false; + if (!('externalId' in value) || value['externalId'] === undefined) return false; + return true; +} + +export function DeviceFromJSON(json: any): Device { + return DeviceFromJSONTyped(json, false); +} + +export function DeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Device { + if (json == null) { + return json; + } + return { + + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'pk': json['pk'], + 'name': json['name'], + 'type': json['type'], + 'confirmed': json['confirmed'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + 'lastUsed': (json['last_used'] == null ? null : new Date(json['last_used'])), + 'extraDescription': json['extra_description'], + 'externalId': json['external_id'], + }; +} + +export function DeviceToJSON(json: any): Device { + return DeviceToJSONTyped(json, false); +} + +export function DeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'name': value['name'], + 'confirmed': value['confirmed'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceAccessGroup.ts b/packages/client-ts/src/models/DeviceAccessGroup.ts new file mode 100644 index 0000000000..1132557d6d --- /dev/null +++ b/packages/client-ts/src/models/DeviceAccessGroup.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeviceAccessGroup + */ +export interface DeviceAccessGroup { + /** + * + * @type {string} + * @memberof DeviceAccessGroup + */ + readonly pbmUuid: string; + /** + * + * @type {string} + * @memberof DeviceAccessGroup + */ + name: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeviceAccessGroup + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the DeviceAccessGroup interface. + */ +export function instanceOfDeviceAccessGroup(value: object): value is DeviceAccessGroup { + if (!('pbmUuid' in value) || value['pbmUuid'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DeviceAccessGroupFromJSON(json: any): DeviceAccessGroup { + return DeviceAccessGroupFromJSONTyped(json, false); +} + +export function DeviceAccessGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceAccessGroup { + if (json == null) { + return json; + } + return { + + 'pbmUuid': json['pbm_uuid'], + 'name': json['name'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function DeviceAccessGroupToJSON(json: any): DeviceAccessGroup { + return DeviceAccessGroupToJSONTyped(json, false); +} + +export function DeviceAccessGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceAccessGroupRequest.ts b/packages/client-ts/src/models/DeviceAccessGroupRequest.ts new file mode 100644 index 0000000000..b5ff244fdc --- /dev/null +++ b/packages/client-ts/src/models/DeviceAccessGroupRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeviceAccessGroupRequest + */ +export interface DeviceAccessGroupRequest { + /** + * + * @type {string} + * @memberof DeviceAccessGroupRequest + */ + name: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeviceAccessGroupRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the DeviceAccessGroupRequest interface. + */ +export function instanceOfDeviceAccessGroupRequest(value: object): value is DeviceAccessGroupRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DeviceAccessGroupRequestFromJSON(json: any): DeviceAccessGroupRequest { + return DeviceAccessGroupRequestFromJSONTyped(json, false); +} + +export function DeviceAccessGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceAccessGroupRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function DeviceAccessGroupRequestToJSON(json: any): DeviceAccessGroupRequest { + return DeviceAccessGroupRequestToJSONTyped(json, false); +} + +export function DeviceAccessGroupRequestToJSONTyped(value?: DeviceAccessGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceChallenge.ts b/packages/client-ts/src/models/DeviceChallenge.ts new file mode 100644 index 0000000000..57fa129ea6 --- /dev/null +++ b/packages/client-ts/src/models/DeviceChallenge.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceClassesEnum } from './DeviceClassesEnum'; +import { + DeviceClassesEnumFromJSON, + DeviceClassesEnumFromJSONTyped, + DeviceClassesEnumToJSON, + DeviceClassesEnumToJSONTyped, +} from './DeviceClassesEnum'; + +/** + * Single device challenge + * @export + * @interface DeviceChallenge + */ +export interface DeviceChallenge { + /** + * + * @type {DeviceClassesEnum} + * @memberof DeviceChallenge + */ + deviceClass: DeviceClassesEnum; + /** + * + * @type {string} + * @memberof DeviceChallenge + */ + deviceUid: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeviceChallenge + */ + challenge: { [key: string]: any; }; + /** + * + * @type {Date} + * @memberof DeviceChallenge + */ + lastUsed: Date | null; +} + + + +/** + * Check if a given object implements the DeviceChallenge interface. + */ +export function instanceOfDeviceChallenge(value: object): value is DeviceChallenge { + if (!('deviceClass' in value) || value['deviceClass'] === undefined) return false; + if (!('deviceUid' in value) || value['deviceUid'] === undefined) return false; + if (!('challenge' in value) || value['challenge'] === undefined) return false; + if (!('lastUsed' in value) || value['lastUsed'] === undefined) return false; + return true; +} + +export function DeviceChallengeFromJSON(json: any): DeviceChallenge { + return DeviceChallengeFromJSONTyped(json, false); +} + +export function DeviceChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceChallenge { + if (json == null) { + return json; + } + return { + + 'deviceClass': DeviceClassesEnumFromJSON(json['device_class']), + 'deviceUid': json['device_uid'], + 'challenge': json['challenge'], + 'lastUsed': (json['last_used'] == null ? null : new Date(json['last_used'])), + }; +} + +export function DeviceChallengeToJSON(json: any): DeviceChallenge { + return DeviceChallengeToJSONTyped(json, false); +} + +export function DeviceChallengeToJSONTyped(value?: DeviceChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_class': DeviceClassesEnumToJSON(value['deviceClass']), + 'device_uid': value['deviceUid'], + 'challenge': value['challenge'], + 'last_used': value['lastUsed'] == null ? value['lastUsed'] : value['lastUsed'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/DeviceChallengeRequest.ts b/packages/client-ts/src/models/DeviceChallengeRequest.ts new file mode 100644 index 0000000000..d82cd63c4c --- /dev/null +++ b/packages/client-ts/src/models/DeviceChallengeRequest.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceClassesEnum } from './DeviceClassesEnum'; +import { + DeviceClassesEnumFromJSON, + DeviceClassesEnumFromJSONTyped, + DeviceClassesEnumToJSON, + DeviceClassesEnumToJSONTyped, +} from './DeviceClassesEnum'; + +/** + * Single device challenge + * @export + * @interface DeviceChallengeRequest + */ +export interface DeviceChallengeRequest { + /** + * + * @type {DeviceClassesEnum} + * @memberof DeviceChallengeRequest + */ + deviceClass: DeviceClassesEnum; + /** + * + * @type {string} + * @memberof DeviceChallengeRequest + */ + deviceUid: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeviceChallengeRequest + */ + challenge: { [key: string]: any; }; + /** + * + * @type {Date} + * @memberof DeviceChallengeRequest + */ + lastUsed: Date | null; +} + + + +/** + * Check if a given object implements the DeviceChallengeRequest interface. + */ +export function instanceOfDeviceChallengeRequest(value: object): value is DeviceChallengeRequest { + if (!('deviceClass' in value) || value['deviceClass'] === undefined) return false; + if (!('deviceUid' in value) || value['deviceUid'] === undefined) return false; + if (!('challenge' in value) || value['challenge'] === undefined) return false; + if (!('lastUsed' in value) || value['lastUsed'] === undefined) return false; + return true; +} + +export function DeviceChallengeRequestFromJSON(json: any): DeviceChallengeRequest { + return DeviceChallengeRequestFromJSONTyped(json, false); +} + +export function DeviceChallengeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceChallengeRequest { + if (json == null) { + return json; + } + return { + + 'deviceClass': DeviceClassesEnumFromJSON(json['device_class']), + 'deviceUid': json['device_uid'], + 'challenge': json['challenge'], + 'lastUsed': (json['last_used'] == null ? null : new Date(json['last_used'])), + }; +} + +export function DeviceChallengeRequestToJSON(json: any): DeviceChallengeRequest { + return DeviceChallengeRequestToJSONTyped(json, false); +} + +export function DeviceChallengeRequestToJSONTyped(value?: DeviceChallengeRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_class': DeviceClassesEnumToJSON(value['deviceClass']), + 'device_uid': value['deviceUid'], + 'challenge': value['challenge'], + 'last_used': value['lastUsed'] == null ? value['lastUsed'] : value['lastUsed'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/DeviceClassesEnum.ts b/packages/client-ts/src/models/DeviceClassesEnum.ts new file mode 100644 index 0000000000..c2d58328ec --- /dev/null +++ b/packages/client-ts/src/models/DeviceClassesEnum.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DeviceClassesEnum = { + Static: 'static', + Totp: 'totp', + Webauthn: 'webauthn', + Duo: 'duo', + Sms: 'sms', + Email: 'email', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DeviceClassesEnum = typeof DeviceClassesEnum[keyof typeof DeviceClassesEnum]; + + +export function instanceOfDeviceClassesEnum(value: any): boolean { + for (const key in DeviceClassesEnum) { + if (Object.prototype.hasOwnProperty.call(DeviceClassesEnum, key)) { + if (DeviceClassesEnum[key as keyof typeof DeviceClassesEnum] === value) { + return true; + } + } + } + return false; +} + +export function DeviceClassesEnumFromJSON(json: any): DeviceClassesEnum { + return DeviceClassesEnumFromJSONTyped(json, false); +} + +export function DeviceClassesEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceClassesEnum { + return json as DeviceClassesEnum; +} + +export function DeviceClassesEnumToJSON(value?: DeviceClassesEnum | null): any { + return value as any; +} + +export function DeviceClassesEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DeviceClassesEnum { + return value as DeviceClassesEnum; +} + diff --git a/packages/client-ts/src/models/DeviceConnection.ts b/packages/client-ts/src/models/DeviceConnection.ts new file mode 100644 index 0000000000..04c5e26860 --- /dev/null +++ b/packages/client-ts/src/models/DeviceConnection.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Connector } from './Connector'; +import { + ConnectorFromJSON, + ConnectorFromJSONTyped, + ConnectorToJSON, + ConnectorToJSONTyped, +} from './Connector'; +import type { DeviceFactSnapshot } from './DeviceFactSnapshot'; +import { + DeviceFactSnapshotFromJSON, + DeviceFactSnapshotFromJSONTyped, + DeviceFactSnapshotToJSON, + DeviceFactSnapshotToJSONTyped, +} from './DeviceFactSnapshot'; + +/** + * + * @export + * @interface DeviceConnection + */ +export interface DeviceConnection { + /** + * + * @type {string} + * @memberof DeviceConnection + */ + device: string; + /** + * + * @type {string} + * @memberof DeviceConnection + */ + connector: string; + /** + * + * @type {Connector} + * @memberof DeviceConnection + */ + readonly connectorObj: Connector; + /** + * + * @type {DeviceFactSnapshot} + * @memberof DeviceConnection + */ + readonly latestSnapshot: DeviceFactSnapshot | null; +} + +/** + * Check if a given object implements the DeviceConnection interface. + */ +export function instanceOfDeviceConnection(value: object): value is DeviceConnection { + if (!('device' in value) || value['device'] === undefined) return false; + if (!('connector' in value) || value['connector'] === undefined) return false; + if (!('connectorObj' in value) || value['connectorObj'] === undefined) return false; + if (!('latestSnapshot' in value) || value['latestSnapshot'] === undefined) return false; + return true; +} + +export function DeviceConnectionFromJSON(json: any): DeviceConnection { + return DeviceConnectionFromJSONTyped(json, false); +} + +export function DeviceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceConnection { + if (json == null) { + return json; + } + return { + + 'device': json['device'], + 'connector': json['connector'], + 'connectorObj': ConnectorFromJSON(json['connector_obj']), + 'latestSnapshot': DeviceFactSnapshotFromJSON(json['latest_snapshot']), + }; +} + +export function DeviceConnectionToJSON(json: any): DeviceConnection { + return DeviceConnectionToJSONTyped(json, false); +} + +export function DeviceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device': value['device'], + 'connector': value['connector'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceFactSnapshot.ts b/packages/client-ts/src/models/DeviceFactSnapshot.ts new file mode 100644 index 0000000000..8772e226a3 --- /dev/null +++ b/packages/client-ts/src/models/DeviceFactSnapshot.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { VendorEnum } from './VendorEnum'; +import { + VendorEnumFromJSON, + VendorEnumFromJSONTyped, + VendorEnumToJSON, + VendorEnumToJSONTyped, +} from './VendorEnum'; +import type { DeviceFacts } from './DeviceFacts'; +import { + DeviceFactsFromJSON, + DeviceFactsFromJSONTyped, + DeviceFactsToJSON, + DeviceFactsToJSONTyped, +} from './DeviceFacts'; + +/** + * + * @export + * @interface DeviceFactSnapshot + */ +export interface DeviceFactSnapshot { + /** + * + * @type {DeviceFacts} + * @memberof DeviceFactSnapshot + */ + data: DeviceFacts; + /** + * + * @type {string} + * @memberof DeviceFactSnapshot + */ + connection: string; + /** + * + * @type {Date} + * @memberof DeviceFactSnapshot + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof DeviceFactSnapshot + */ + readonly expires: Date | null; + /** + * + * @type {VendorEnum} + * @memberof DeviceFactSnapshot + */ + readonly vendor: VendorEnum; +} + + + +/** + * Check if a given object implements the DeviceFactSnapshot interface. + */ +export function instanceOfDeviceFactSnapshot(value: object): value is DeviceFactSnapshot { + if (!('data' in value) || value['data'] === undefined) return false; + if (!('connection' in value) || value['connection'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('expires' in value) || value['expires'] === undefined) return false; + if (!('vendor' in value) || value['vendor'] === undefined) return false; + return true; +} + +export function DeviceFactSnapshotFromJSON(json: any): DeviceFactSnapshot { + return DeviceFactSnapshotFromJSONTyped(json, false); +} + +export function DeviceFactSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceFactSnapshot { + if (json == null) { + return json; + } + return { + + 'data': DeviceFactsFromJSON(json['data']), + 'connection': json['connection'], + 'created': (new Date(json['created'])), + 'expires': (json['expires'] == null ? null : new Date(json['expires'])), + 'vendor': VendorEnumFromJSON(json['vendor']), + }; +} + +export function DeviceFactSnapshotToJSON(json: any): DeviceFactSnapshot { + return DeviceFactSnapshotToJSONTyped(json, false); +} + +export function DeviceFactSnapshotToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'data': DeviceFactsToJSON(value['data']), + 'connection': value['connection'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceFacts.ts b/packages/client-ts/src/models/DeviceFacts.ts new file mode 100644 index 0000000000..da1cb2c55c --- /dev/null +++ b/packages/client-ts/src/models/DeviceFacts.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OperatingSystem } from './OperatingSystem'; +import { + OperatingSystemFromJSON, + OperatingSystemFromJSONTyped, + OperatingSystemToJSON, + OperatingSystemToJSONTyped, +} from './OperatingSystem'; +import type { DeviceUser } from './DeviceUser'; +import { + DeviceUserFromJSON, + DeviceUserFromJSONTyped, + DeviceUserToJSON, + DeviceUserToJSONTyped, +} from './DeviceUser'; +import type { Network } from './Network'; +import { + NetworkFromJSON, + NetworkFromJSONTyped, + NetworkToJSON, + NetworkToJSONTyped, +} from './Network'; +import type { DeviceGroup } from './DeviceGroup'; +import { + DeviceGroupFromJSON, + DeviceGroupFromJSONTyped, + DeviceGroupToJSON, + DeviceGroupToJSONTyped, +} from './DeviceGroup'; +import type { Hardware } from './Hardware'; +import { + HardwareFromJSON, + HardwareFromJSONTyped, + HardwareToJSON, + HardwareToJSONTyped, +} from './Hardware'; +import type { Process } from './Process'; +import { + ProcessFromJSON, + ProcessFromJSONTyped, + ProcessToJSON, + ProcessToJSONTyped, +} from './Process'; +import type { Software } from './Software'; +import { + SoftwareFromJSON, + SoftwareFromJSONTyped, + SoftwareToJSON, + SoftwareToJSONTyped, +} from './Software'; +import type { Disk } from './Disk'; +import { + DiskFromJSON, + DiskFromJSONTyped, + DiskToJSON, + DiskToJSONTyped, +} from './Disk'; + +/** + * + * @export + * @interface DeviceFacts + */ +export interface DeviceFacts { + /** + * + * @type {OperatingSystem} + * @memberof DeviceFacts + */ + os?: OperatingSystem | null; + /** + * + * @type {Array} + * @memberof DeviceFacts + */ + disks?: Array | null; + /** + * + * @type {Network} + * @memberof DeviceFacts + */ + network?: Network | null; + /** + * + * @type {Hardware} + * @memberof DeviceFacts + */ + hardware?: Hardware | null; + /** + * + * @type {Array} + * @memberof DeviceFacts + */ + software?: Array | null; + /** + * + * @type {Array} + * @memberof DeviceFacts + */ + processes?: Array | null; + /** + * + * @type {Array} + * @memberof DeviceFacts + */ + users?: Array | null; + /** + * + * @type {Array} + * @memberof DeviceFacts + */ + groups?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeviceFacts + */ + vendor?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the DeviceFacts interface. + */ +export function instanceOfDeviceFacts(value: object): value is DeviceFacts { + return true; +} + +export function DeviceFactsFromJSON(json: any): DeviceFacts { + return DeviceFactsFromJSONTyped(json, false); +} + +export function DeviceFactsFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceFacts { + if (json == null) { + return json; + } + return { + + 'os': json['os'] == null ? undefined : OperatingSystemFromJSON(json['os']), + 'disks': json['disks'] == null ? undefined : ((json['disks'] as Array).map(DiskFromJSON)), + 'network': json['network'] == null ? undefined : NetworkFromJSON(json['network']), + 'hardware': json['hardware'] == null ? undefined : HardwareFromJSON(json['hardware']), + 'software': json['software'] == null ? undefined : ((json['software'] as Array).map(SoftwareFromJSON)), + 'processes': json['processes'] == null ? undefined : ((json['processes'] as Array).map(ProcessFromJSON)), + 'users': json['users'] == null ? undefined : ((json['users'] as Array).map(DeviceUserFromJSON)), + 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(DeviceGroupFromJSON)), + 'vendor': json['vendor'] == null ? undefined : json['vendor'], + }; +} + +export function DeviceFactsToJSON(json: any): DeviceFacts { + return DeviceFactsToJSONTyped(json, false); +} + +export function DeviceFactsToJSONTyped(value?: DeviceFacts | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'os': OperatingSystemToJSON(value['os']), + 'disks': value['disks'] == null ? undefined : ((value['disks'] as Array).map(DiskToJSON)), + 'network': NetworkToJSON(value['network']), + 'hardware': HardwareToJSON(value['hardware']), + 'software': value['software'] == null ? undefined : ((value['software'] as Array).map(SoftwareToJSON)), + 'processes': value['processes'] == null ? undefined : ((value['processes'] as Array).map(ProcessToJSON)), + 'users': value['users'] == null ? undefined : ((value['users'] as Array).map(DeviceUserToJSON)), + 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(DeviceGroupToJSON)), + 'vendor': value['vendor'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceFactsOSFamily.ts b/packages/client-ts/src/models/DeviceFactsOSFamily.ts new file mode 100644 index 0000000000..0c98dc9e95 --- /dev/null +++ b/packages/client-ts/src/models/DeviceFactsOSFamily.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DeviceFactsOSFamily = { + Linux: 'linux', + Unix: 'unix', + Bsd: 'bsd', + Windows: 'windows', + MacOs: 'mac_os', + Android: 'android', + IOs: 'i_os', + Other: 'other', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DeviceFactsOSFamily = typeof DeviceFactsOSFamily[keyof typeof DeviceFactsOSFamily]; + + +export function instanceOfDeviceFactsOSFamily(value: any): boolean { + for (const key in DeviceFactsOSFamily) { + if (Object.prototype.hasOwnProperty.call(DeviceFactsOSFamily, key)) { + if (DeviceFactsOSFamily[key as keyof typeof DeviceFactsOSFamily] === value) { + return true; + } + } + } + return false; +} + +export function DeviceFactsOSFamilyFromJSON(json: any): DeviceFactsOSFamily { + return DeviceFactsOSFamilyFromJSONTyped(json, false); +} + +export function DeviceFactsOSFamilyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceFactsOSFamily { + return json as DeviceFactsOSFamily; +} + +export function DeviceFactsOSFamilyToJSON(value?: DeviceFactsOSFamily | null): any { + return value as any; +} + +export function DeviceFactsOSFamilyToJSONTyped(value: any, ignoreDiscriminator: boolean): DeviceFactsOSFamily { + return value as DeviceFactsOSFamily; +} + diff --git a/packages/client-ts/src/models/DeviceFactsRequest.ts b/packages/client-ts/src/models/DeviceFactsRequest.ts new file mode 100644 index 0000000000..590976b61d --- /dev/null +++ b/packages/client-ts/src/models/DeviceFactsRequest.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DiskRequest } from './DiskRequest'; +import { + DiskRequestFromJSON, + DiskRequestFromJSONTyped, + DiskRequestToJSON, + DiskRequestToJSONTyped, +} from './DiskRequest'; +import type { HardwareRequest } from './HardwareRequest'; +import { + HardwareRequestFromJSON, + HardwareRequestFromJSONTyped, + HardwareRequestToJSON, + HardwareRequestToJSONTyped, +} from './HardwareRequest'; +import type { OperatingSystemRequest } from './OperatingSystemRequest'; +import { + OperatingSystemRequestFromJSON, + OperatingSystemRequestFromJSONTyped, + OperatingSystemRequestToJSON, + OperatingSystemRequestToJSONTyped, +} from './OperatingSystemRequest'; +import type { SoftwareRequest } from './SoftwareRequest'; +import { + SoftwareRequestFromJSON, + SoftwareRequestFromJSONTyped, + SoftwareRequestToJSON, + SoftwareRequestToJSONTyped, +} from './SoftwareRequest'; +import type { ProcessRequest } from './ProcessRequest'; +import { + ProcessRequestFromJSON, + ProcessRequestFromJSONTyped, + ProcessRequestToJSON, + ProcessRequestToJSONTyped, +} from './ProcessRequest'; +import type { NetworkRequest } from './NetworkRequest'; +import { + NetworkRequestFromJSON, + NetworkRequestFromJSONTyped, + NetworkRequestToJSON, + NetworkRequestToJSONTyped, +} from './NetworkRequest'; +import type { DeviceGroupRequest } from './DeviceGroupRequest'; +import { + DeviceGroupRequestFromJSON, + DeviceGroupRequestFromJSONTyped, + DeviceGroupRequestToJSON, + DeviceGroupRequestToJSONTyped, +} from './DeviceGroupRequest'; +import type { DeviceUserRequest } from './DeviceUserRequest'; +import { + DeviceUserRequestFromJSON, + DeviceUserRequestFromJSONTyped, + DeviceUserRequestToJSON, + DeviceUserRequestToJSONTyped, +} from './DeviceUserRequest'; + +/** + * + * @export + * @interface DeviceFactsRequest + */ +export interface DeviceFactsRequest { + /** + * + * @type {OperatingSystemRequest} + * @memberof DeviceFactsRequest + */ + os?: OperatingSystemRequest | null; + /** + * + * @type {Array} + * @memberof DeviceFactsRequest + */ + disks?: Array | null; + /** + * + * @type {NetworkRequest} + * @memberof DeviceFactsRequest + */ + network?: NetworkRequest | null; + /** + * + * @type {HardwareRequest} + * @memberof DeviceFactsRequest + */ + hardware?: HardwareRequest | null; + /** + * + * @type {Array} + * @memberof DeviceFactsRequest + */ + software?: Array | null; + /** + * + * @type {Array} + * @memberof DeviceFactsRequest + */ + processes?: Array | null; + /** + * + * @type {Array} + * @memberof DeviceFactsRequest + */ + users?: Array | null; + /** + * + * @type {Array} + * @memberof DeviceFactsRequest + */ + groups?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DeviceFactsRequest + */ + vendor?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the DeviceFactsRequest interface. + */ +export function instanceOfDeviceFactsRequest(value: object): value is DeviceFactsRequest { + return true; +} + +export function DeviceFactsRequestFromJSON(json: any): DeviceFactsRequest { + return DeviceFactsRequestFromJSONTyped(json, false); +} + +export function DeviceFactsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceFactsRequest { + if (json == null) { + return json; + } + return { + + 'os': json['os'] == null ? undefined : OperatingSystemRequestFromJSON(json['os']), + 'disks': json['disks'] == null ? undefined : ((json['disks'] as Array).map(DiskRequestFromJSON)), + 'network': json['network'] == null ? undefined : NetworkRequestFromJSON(json['network']), + 'hardware': json['hardware'] == null ? undefined : HardwareRequestFromJSON(json['hardware']), + 'software': json['software'] == null ? undefined : ((json['software'] as Array).map(SoftwareRequestFromJSON)), + 'processes': json['processes'] == null ? undefined : ((json['processes'] as Array).map(ProcessRequestFromJSON)), + 'users': json['users'] == null ? undefined : ((json['users'] as Array).map(DeviceUserRequestFromJSON)), + 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(DeviceGroupRequestFromJSON)), + 'vendor': json['vendor'] == null ? undefined : json['vendor'], + }; +} + +export function DeviceFactsRequestToJSON(json: any): DeviceFactsRequest { + return DeviceFactsRequestToJSONTyped(json, false); +} + +export function DeviceFactsRequestToJSONTyped(value?: DeviceFactsRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'os': OperatingSystemRequestToJSON(value['os']), + 'disks': value['disks'] == null ? undefined : ((value['disks'] as Array).map(DiskRequestToJSON)), + 'network': NetworkRequestToJSON(value['network']), + 'hardware': HardwareRequestToJSON(value['hardware']), + 'software': value['software'] == null ? undefined : ((value['software'] as Array).map(SoftwareRequestToJSON)), + 'processes': value['processes'] == null ? undefined : ((value['processes'] as Array).map(ProcessRequestToJSON)), + 'users': value['users'] == null ? undefined : ((value['users'] as Array).map(DeviceUserRequestToJSON)), + 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(DeviceGroupRequestToJSON)), + 'vendor': value['vendor'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceGroup.ts b/packages/client-ts/src/models/DeviceGroup.ts new file mode 100644 index 0000000000..f5b5e62073 --- /dev/null +++ b/packages/client-ts/src/models/DeviceGroup.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeviceGroup + */ +export interface DeviceGroup { + /** + * + * @type {string} + * @memberof DeviceGroup + */ + id: string; + /** + * + * @type {string} + * @memberof DeviceGroup + */ + name?: string; +} + +/** + * Check if a given object implements the DeviceGroup interface. + */ +export function instanceOfDeviceGroup(value: object): value is DeviceGroup { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function DeviceGroupFromJSON(json: any): DeviceGroup { + return DeviceGroupFromJSONTyped(json, false); +} + +export function DeviceGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceGroup { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function DeviceGroupToJSON(json: any): DeviceGroup { + return DeviceGroupToJSONTyped(json, false); +} + +export function DeviceGroupToJSONTyped(value?: DeviceGroup | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceGroupRequest.ts b/packages/client-ts/src/models/DeviceGroupRequest.ts new file mode 100644 index 0000000000..7517f4e1a3 --- /dev/null +++ b/packages/client-ts/src/models/DeviceGroupRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeviceGroupRequest + */ +export interface DeviceGroupRequest { + /** + * + * @type {string} + * @memberof DeviceGroupRequest + */ + id: string; + /** + * + * @type {string} + * @memberof DeviceGroupRequest + */ + name?: string; +} + +/** + * Check if a given object implements the DeviceGroupRequest interface. + */ +export function instanceOfDeviceGroupRequest(value: object): value is DeviceGroupRequest { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function DeviceGroupRequestFromJSON(json: any): DeviceGroupRequest { + return DeviceGroupRequestFromJSONTyped(json, false); +} + +export function DeviceGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceGroupRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function DeviceGroupRequestToJSON(json: any): DeviceGroupRequest { + return DeviceGroupRequestToJSONTyped(json, false); +} + +export function DeviceGroupRequestToJSONTyped(value?: DeviceGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceSummary.ts b/packages/client-ts/src/models/DeviceSummary.ts new file mode 100644 index 0000000000..bf0d7affe2 --- /dev/null +++ b/packages/client-ts/src/models/DeviceSummary.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Summary of registered devices + * @export + * @interface DeviceSummary + */ +export interface DeviceSummary { + /** + * + * @type {number} + * @memberof DeviceSummary + */ + totalCount: number; + /** + * + * @type {number} + * @memberof DeviceSummary + */ + unreachableCount: number; + /** + * + * @type {number} + * @memberof DeviceSummary + */ + outdatedAgentCount: number; +} + +/** + * Check if a given object implements the DeviceSummary interface. + */ +export function instanceOfDeviceSummary(value: object): value is DeviceSummary { + if (!('totalCount' in value) || value['totalCount'] === undefined) return false; + if (!('unreachableCount' in value) || value['unreachableCount'] === undefined) return false; + if (!('outdatedAgentCount' in value) || value['outdatedAgentCount'] === undefined) return false; + return true; +} + +export function DeviceSummaryFromJSON(json: any): DeviceSummary { + return DeviceSummaryFromJSONTyped(json, false); +} + +export function DeviceSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceSummary { + if (json == null) { + return json; + } + return { + + 'totalCount': json['total_count'], + 'unreachableCount': json['unreachable_count'], + 'outdatedAgentCount': json['outdated_agent_count'], + }; +} + +export function DeviceSummaryToJSON(json: any): DeviceSummary { + return DeviceSummaryToJSONTyped(json, false); +} + +export function DeviceSummaryToJSONTyped(value?: DeviceSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'total_count': value['totalCount'], + 'unreachable_count': value['unreachableCount'], + 'outdated_agent_count': value['outdatedAgentCount'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceUser.ts b/packages/client-ts/src/models/DeviceUser.ts new file mode 100644 index 0000000000..1d9f6fcfe4 --- /dev/null +++ b/packages/client-ts/src/models/DeviceUser.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeviceUser + */ +export interface DeviceUser { + /** + * + * @type {string} + * @memberof DeviceUser + */ + id: string; + /** + * + * @type {string} + * @memberof DeviceUser + */ + username?: string; + /** + * + * @type {string} + * @memberof DeviceUser + */ + name?: string; + /** + * + * @type {string} + * @memberof DeviceUser + */ + home?: string; +} + +/** + * Check if a given object implements the DeviceUser interface. + */ +export function instanceOfDeviceUser(value: object): value is DeviceUser { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function DeviceUserFromJSON(json: any): DeviceUser { + return DeviceUserFromJSONTyped(json, false); +} + +export function DeviceUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceUser { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'username': json['username'] == null ? undefined : json['username'], + 'name': json['name'] == null ? undefined : json['name'], + 'home': json['home'] == null ? undefined : json['home'], + }; +} + +export function DeviceUserToJSON(json: any): DeviceUser { + return DeviceUserToJSONTyped(json, false); +} + +export function DeviceUserToJSONTyped(value?: DeviceUser | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'username': value['username'], + 'name': value['name'], + 'home': value['home'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceUserBinding.ts b/packages/client-ts/src/models/DeviceUserBinding.ts new file mode 100644 index 0000000000..99a56a6186 --- /dev/null +++ b/packages/client-ts/src/models/DeviceUserBinding.ts @@ -0,0 +1,216 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { Policy } from './Policy'; +import { + PolicyFromJSON, + PolicyFromJSONTyped, + PolicyToJSON, + PolicyToJSONTyped, +} from './Policy'; +import type { Connector } from './Connector'; +import { + ConnectorFromJSON, + ConnectorFromJSONTyped, + ConnectorToJSON, + ConnectorToJSONTyped, +} from './Connector'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * PolicyBinding Serializer + * @export + * @interface DeviceUserBinding + */ +export interface DeviceUserBinding { + /** + * + * @type {string} + * @memberof DeviceUserBinding + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof DeviceUserBinding + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof DeviceUserBinding + */ + group?: string | null; + /** + * + * @type {number} + * @memberof DeviceUserBinding + */ + user?: number | null; + /** + * + * @type {Policy} + * @memberof DeviceUserBinding + */ + readonly policyObj: Policy; + /** + * + * @type {PartialGroup} + * @memberof DeviceUserBinding + */ + readonly groupObj: PartialGroup; + /** + * + * @type {PartialUser} + * @memberof DeviceUserBinding + */ + readonly userObj: PartialUser; + /** + * + * @type {string} + * @memberof DeviceUserBinding + */ + target: string; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof DeviceUserBinding + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof DeviceUserBinding + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof DeviceUserBinding + */ + order: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof DeviceUserBinding + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof DeviceUserBinding + */ + failureResult?: boolean; + /** + * + * @type {boolean} + * @memberof DeviceUserBinding + */ + isPrimary?: boolean; + /** + * + * @type {string} + * @memberof DeviceUserBinding + */ + readonly connector: string | null; + /** + * + * @type {Connector} + * @memberof DeviceUserBinding + */ + readonly connectorObj: Connector; +} + +/** + * Check if a given object implements the DeviceUserBinding interface. + */ +export function instanceOfDeviceUserBinding(value: object): value is DeviceUserBinding { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('policyObj' in value) || value['policyObj'] === undefined) return false; + if (!('groupObj' in value) || value['groupObj'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + if (!('target' in value) || value['target'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + if (!('connector' in value) || value['connector'] === undefined) return false; + if (!('connectorObj' in value) || value['connectorObj'] === undefined) return false; + return true; +} + +export function DeviceUserBindingFromJSON(json: any): DeviceUserBinding { + return DeviceUserBindingFromJSONTyped(json, false); +} + +export function DeviceUserBindingFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceUserBinding { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'policyObj': PolicyFromJSON(json['policy_obj']), + 'groupObj': PartialGroupFromJSON(json['group_obj']), + 'userObj': PartialUserFromJSON(json['user_obj']), + 'target': json['target'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + 'connector': json['connector'], + 'connectorObj': ConnectorFromJSON(json['connector_obj']), + }; +} + +export function DeviceUserBindingToJSON(json: any): DeviceUserBinding { + return DeviceUserBindingToJSONTyped(json, false); +} + +export function DeviceUserBindingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'target': value['target'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + 'is_primary': value['isPrimary'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceUserBindingRequest.ts b/packages/client-ts/src/models/DeviceUserBindingRequest.ts new file mode 100644 index 0000000000..b770bdcb80 --- /dev/null +++ b/packages/client-ts/src/models/DeviceUserBindingRequest.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PolicyBinding Serializer + * @export + * @interface DeviceUserBindingRequest + */ +export interface DeviceUserBindingRequest { + /** + * + * @type {string} + * @memberof DeviceUserBindingRequest + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof DeviceUserBindingRequest + */ + group?: string | null; + /** + * + * @type {number} + * @memberof DeviceUserBindingRequest + */ + user?: number | null; + /** + * + * @type {string} + * @memberof DeviceUserBindingRequest + */ + target: string; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof DeviceUserBindingRequest + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof DeviceUserBindingRequest + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof DeviceUserBindingRequest + */ + order: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof DeviceUserBindingRequest + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof DeviceUserBindingRequest + */ + failureResult?: boolean; + /** + * + * @type {boolean} + * @memberof DeviceUserBindingRequest + */ + isPrimary?: boolean; +} + +/** + * Check if a given object implements the DeviceUserBindingRequest interface. + */ +export function instanceOfDeviceUserBindingRequest(value: object): value is DeviceUserBindingRequest { + if (!('target' in value) || value['target'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + return true; +} + +export function DeviceUserBindingRequestFromJSON(json: any): DeviceUserBindingRequest { + return DeviceUserBindingRequestFromJSONTyped(json, false); +} + +export function DeviceUserBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceUserBindingRequest { + if (json == null) { + return json; + } + return { + + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'target': json['target'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + }; +} + +export function DeviceUserBindingRequestToJSON(json: any): DeviceUserBindingRequest { + return DeviceUserBindingRequestToJSONTyped(json, false); +} + +export function DeviceUserBindingRequestToJSONTyped(value?: DeviceUserBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'target': value['target'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + 'is_primary': value['isPrimary'], + }; +} + diff --git a/packages/client-ts/src/models/DeviceUserRequest.ts b/packages/client-ts/src/models/DeviceUserRequest.ts new file mode 100644 index 0000000000..466acb7a7a --- /dev/null +++ b/packages/client-ts/src/models/DeviceUserRequest.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DeviceUserRequest + */ +export interface DeviceUserRequest { + /** + * + * @type {string} + * @memberof DeviceUserRequest + */ + id: string; + /** + * + * @type {string} + * @memberof DeviceUserRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof DeviceUserRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof DeviceUserRequest + */ + home?: string; +} + +/** + * Check if a given object implements the DeviceUserRequest interface. + */ +export function instanceOfDeviceUserRequest(value: object): value is DeviceUserRequest { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function DeviceUserRequestFromJSON(json: any): DeviceUserRequest { + return DeviceUserRequestFromJSONTyped(json, false); +} + +export function DeviceUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceUserRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'username': json['username'] == null ? undefined : json['username'], + 'name': json['name'] == null ? undefined : json['name'], + 'home': json['home'] == null ? undefined : json['home'], + }; +} + +export function DeviceUserRequestToJSON(json: any): DeviceUserRequest { + return DeviceUserRequestToJSONTyped(json, false); +} + +export function DeviceUserRequestToJSONTyped(value?: DeviceUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'username': value['username'], + 'name': value['name'], + 'home': value['home'], + }; +} + diff --git a/packages/client-ts/src/models/DigestAlgorithmEnum.ts b/packages/client-ts/src/models/DigestAlgorithmEnum.ts new file mode 100644 index 0000000000..6878aa5db5 --- /dev/null +++ b/packages/client-ts/src/models/DigestAlgorithmEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DigestAlgorithmEnum = { + HttpWwwW3Org200009Xmldsigsha1: 'http://www.w3.org/2000/09/xmldsig#sha1', + HttpWwwW3Org200104Xmlencsha256: 'http://www.w3.org/2001/04/xmlenc#sha256', + HttpWwwW3Org200104XmldsigMoresha384: 'http://www.w3.org/2001/04/xmldsig-more#sha384', + HttpWwwW3Org200104Xmlencsha512: 'http://www.w3.org/2001/04/xmlenc#sha512', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DigestAlgorithmEnum = typeof DigestAlgorithmEnum[keyof typeof DigestAlgorithmEnum]; + + +export function instanceOfDigestAlgorithmEnum(value: any): boolean { + for (const key in DigestAlgorithmEnum) { + if (Object.prototype.hasOwnProperty.call(DigestAlgorithmEnum, key)) { + if (DigestAlgorithmEnum[key as keyof typeof DigestAlgorithmEnum] === value) { + return true; + } + } + } + return false; +} + +export function DigestAlgorithmEnumFromJSON(json: any): DigestAlgorithmEnum { + return DigestAlgorithmEnumFromJSONTyped(json, false); +} + +export function DigestAlgorithmEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigestAlgorithmEnum { + return json as DigestAlgorithmEnum; +} + +export function DigestAlgorithmEnumToJSON(value?: DigestAlgorithmEnum | null): any { + return value as any; +} + +export function DigestAlgorithmEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DigestAlgorithmEnum { + return value as DigestAlgorithmEnum; +} + diff --git a/packages/client-ts/src/models/DigitsEnum.ts b/packages/client-ts/src/models/DigitsEnum.ts new file mode 100644 index 0000000000..b9f90321cf --- /dev/null +++ b/packages/client-ts/src/models/DigitsEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DigitsEnum = { + _6: '6', + _8: '8', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DigitsEnum = typeof DigitsEnum[keyof typeof DigitsEnum]; + + +export function instanceOfDigitsEnum(value: any): boolean { + for (const key in DigitsEnum) { + if (Object.prototype.hasOwnProperty.call(DigitsEnum, key)) { + if (DigitsEnum[key as keyof typeof DigitsEnum] === value) { + return true; + } + } + } + return false; +} + +export function DigitsEnumFromJSON(json: any): DigitsEnum { + return DigitsEnumFromJSONTyped(json, false); +} + +export function DigitsEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigitsEnum { + return json as DigitsEnum; +} + +export function DigitsEnumToJSON(value?: DigitsEnum | null): any { + return value as any; +} + +export function DigitsEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DigitsEnum { + return value as DigitsEnum; +} + diff --git a/packages/client-ts/src/models/Disk.ts b/packages/client-ts/src/models/Disk.ts new file mode 100644 index 0000000000..6a2327d5aa --- /dev/null +++ b/packages/client-ts/src/models/Disk.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Disk + */ +export interface Disk { + /** + * + * @type {string} + * @memberof Disk + */ + name: string; + /** + * + * @type {string} + * @memberof Disk + */ + mountpoint: string; + /** + * + * @type {string} + * @memberof Disk + */ + label?: string; + /** + * + * @type {number} + * @memberof Disk + */ + capacityTotalBytes?: number; + /** + * + * @type {number} + * @memberof Disk + */ + capacityUsedBytes?: number; + /** + * + * @type {boolean} + * @memberof Disk + */ + encryptionEnabled?: boolean; +} + +/** + * Check if a given object implements the Disk interface. + */ +export function instanceOfDisk(value: object): value is Disk { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('mountpoint' in value) || value['mountpoint'] === undefined) return false; + return true; +} + +export function DiskFromJSON(json: any): Disk { + return DiskFromJSONTyped(json, false); +} + +export function DiskFromJSONTyped(json: any, ignoreDiscriminator: boolean): Disk { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'mountpoint': json['mountpoint'], + 'label': json['label'] == null ? undefined : json['label'], + 'capacityTotalBytes': json['capacity_total_bytes'] == null ? undefined : json['capacity_total_bytes'], + 'capacityUsedBytes': json['capacity_used_bytes'] == null ? undefined : json['capacity_used_bytes'], + 'encryptionEnabled': json['encryption_enabled'] == null ? undefined : json['encryption_enabled'], + }; +} + +export function DiskToJSON(json: any): Disk { + return DiskToJSONTyped(json, false); +} + +export function DiskToJSONTyped(value?: Disk | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mountpoint': value['mountpoint'], + 'label': value['label'], + 'capacity_total_bytes': value['capacityTotalBytes'], + 'capacity_used_bytes': value['capacityUsedBytes'], + 'encryption_enabled': value['encryptionEnabled'], + }; +} + diff --git a/packages/client-ts/src/models/DiskRequest.ts b/packages/client-ts/src/models/DiskRequest.ts new file mode 100644 index 0000000000..dca4c4f04a --- /dev/null +++ b/packages/client-ts/src/models/DiskRequest.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DiskRequest + */ +export interface DiskRequest { + /** + * + * @type {string} + * @memberof DiskRequest + */ + name: string; + /** + * + * @type {string} + * @memberof DiskRequest + */ + mountpoint: string; + /** + * + * @type {string} + * @memberof DiskRequest + */ + label?: string; + /** + * + * @type {number} + * @memberof DiskRequest + */ + capacityTotalBytes?: number; + /** + * + * @type {number} + * @memberof DiskRequest + */ + capacityUsedBytes?: number; + /** + * + * @type {boolean} + * @memberof DiskRequest + */ + encryptionEnabled?: boolean; +} + +/** + * Check if a given object implements the DiskRequest interface. + */ +export function instanceOfDiskRequest(value: object): value is DiskRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('mountpoint' in value) || value['mountpoint'] === undefined) return false; + return true; +} + +export function DiskRequestFromJSON(json: any): DiskRequest { + return DiskRequestFromJSONTyped(json, false); +} + +export function DiskRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DiskRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'mountpoint': json['mountpoint'], + 'label': json['label'] == null ? undefined : json['label'], + 'capacityTotalBytes': json['capacity_total_bytes'] == null ? undefined : json['capacity_total_bytes'], + 'capacityUsedBytes': json['capacity_used_bytes'] == null ? undefined : json['capacity_used_bytes'], + 'encryptionEnabled': json['encryption_enabled'] == null ? undefined : json['encryption_enabled'], + }; +} + +export function DiskRequestToJSON(json: any): DiskRequest { + return DiskRequestToJSONTyped(json, false); +} + +export function DiskRequestToJSONTyped(value?: DiskRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mountpoint': value['mountpoint'], + 'label': value['label'], + 'capacity_total_bytes': value['capacityTotalBytes'], + 'capacity_used_bytes': value['capacityUsedBytes'], + 'encryption_enabled': value['encryptionEnabled'], + }; +} + diff --git a/packages/client-ts/src/models/DockerServiceConnection.ts b/packages/client-ts/src/models/DockerServiceConnection.ts new file mode 100644 index 0000000000..9e8d42181e --- /dev/null +++ b/packages/client-ts/src/models/DockerServiceConnection.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DockerServiceConnection Serializer + * @export + * @interface DockerServiceConnection + */ +export interface DockerServiceConnection { + /** + * + * @type {string} + * @memberof DockerServiceConnection + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof DockerServiceConnection + */ + name: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof DockerServiceConnection + */ + local?: boolean; + /** + * + * @type {string} + * @memberof DockerServiceConnection + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof DockerServiceConnection + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof DockerServiceConnection + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof DockerServiceConnection + */ + readonly 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. + * @type {string} + * @memberof DockerServiceConnection + */ + url: string; + /** + * CA which the endpoint's Certificate is verified against. Can be left empty for no validation. + * @type {string} + * @memberof DockerServiceConnection + */ + tlsVerification?: string | null; + /** + * Certificate/Key used for authentication. Can be left empty for no authentication. + * @type {string} + * @memberof DockerServiceConnection + */ + tlsAuthentication?: string | null; +} + +/** + * Check if a given object implements the DockerServiceConnection interface. + */ +export function instanceOfDockerServiceConnection(value: object): value is DockerServiceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function DockerServiceConnectionFromJSON(json: any): DockerServiceConnection { + return DockerServiceConnectionFromJSONTyped(json, false); +} + +export function DockerServiceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): DockerServiceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'url': json['url'], + 'tlsVerification': json['tls_verification'] == null ? undefined : json['tls_verification'], + 'tlsAuthentication': json['tls_authentication'] == null ? undefined : json['tls_authentication'], + }; +} + +export function DockerServiceConnectionToJSON(json: any): DockerServiceConnection { + return DockerServiceConnectionToJSONTyped(json, false); +} + +export function DockerServiceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + 'url': value['url'], + 'tls_verification': value['tlsVerification'], + 'tls_authentication': value['tlsAuthentication'], + }; +} + diff --git a/packages/client-ts/src/models/DockerServiceConnectionRequest.ts b/packages/client-ts/src/models/DockerServiceConnectionRequest.ts new file mode 100644 index 0000000000..879ebf43e2 --- /dev/null +++ b/packages/client-ts/src/models/DockerServiceConnectionRequest.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DockerServiceConnection Serializer + * @export + * @interface DockerServiceConnectionRequest + */ +export interface DockerServiceConnectionRequest { + /** + * + * @type {string} + * @memberof DockerServiceConnectionRequest + */ + name: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof DockerServiceConnectionRequest + */ + local?: boolean; + /** + * Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. + * @type {string} + * @memberof DockerServiceConnectionRequest + */ + url: string; + /** + * CA which the endpoint's Certificate is verified against. Can be left empty for no validation. + * @type {string} + * @memberof DockerServiceConnectionRequest + */ + tlsVerification?: string | null; + /** + * Certificate/Key used for authentication. Can be left empty for no authentication. + * @type {string} + * @memberof DockerServiceConnectionRequest + */ + tlsAuthentication?: string | null; +} + +/** + * Check if a given object implements the DockerServiceConnectionRequest interface. + */ +export function instanceOfDockerServiceConnectionRequest(value: object): value is DockerServiceConnectionRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function DockerServiceConnectionRequestFromJSON(json: any): DockerServiceConnectionRequest { + return DockerServiceConnectionRequestFromJSONTyped(json, false); +} + +export function DockerServiceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DockerServiceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'url': json['url'], + 'tlsVerification': json['tls_verification'] == null ? undefined : json['tls_verification'], + 'tlsAuthentication': json['tls_authentication'] == null ? undefined : json['tls_authentication'], + }; +} + +export function DockerServiceConnectionRequestToJSON(json: any): DockerServiceConnectionRequest { + return DockerServiceConnectionRequestToJSONTyped(json, false); +} + +export function DockerServiceConnectionRequestToJSONTyped(value?: DockerServiceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + 'url': value['url'], + 'tls_verification': value['tlsVerification'], + 'tls_authentication': value['tlsAuthentication'], + }; +} + diff --git a/packages/client-ts/src/models/Domain.ts b/packages/client-ts/src/models/Domain.ts new file mode 100644 index 0000000000..8d74b1ac30 --- /dev/null +++ b/packages/client-ts/src/models/Domain.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Domain Serializer + * @export + * @interface Domain + */ +export interface Domain { + /** + * + * @type {number} + * @memberof Domain + */ + readonly id: number; + /** + * + * @type {string} + * @memberof Domain + */ + domain: string; + /** + * + * @type {boolean} + * @memberof Domain + */ + isPrimary?: boolean; + /** + * + * @type {string} + * @memberof Domain + */ + tenant: string; +} + +/** + * Check if a given object implements the Domain interface. + */ +export function instanceOfDomain(value: object): value is Domain { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('domain' in value) || value['domain'] === undefined) return false; + if (!('tenant' in value) || value['tenant'] === undefined) return false; + return true; +} + +export function DomainFromJSON(json: any): Domain { + return DomainFromJSONTyped(json, false); +} + +export function DomainFromJSONTyped(json: any, ignoreDiscriminator: boolean): Domain { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'domain': json['domain'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + 'tenant': json['tenant'], + }; +} + +export function DomainToJSON(json: any): Domain { + return DomainToJSONTyped(json, false); +} + +export function DomainToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'domain': value['domain'], + 'is_primary': value['isPrimary'], + 'tenant': value['tenant'], + }; +} + diff --git a/packages/client-ts/src/models/DomainRequest.ts b/packages/client-ts/src/models/DomainRequest.ts new file mode 100644 index 0000000000..df89ea0d72 --- /dev/null +++ b/packages/client-ts/src/models/DomainRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Domain Serializer + * @export + * @interface DomainRequest + */ +export interface DomainRequest { + /** + * + * @type {string} + * @memberof DomainRequest + */ + domain: string; + /** + * + * @type {boolean} + * @memberof DomainRequest + */ + isPrimary?: boolean; + /** + * + * @type {string} + * @memberof DomainRequest + */ + tenant: string; +} + +/** + * Check if a given object implements the DomainRequest interface. + */ +export function instanceOfDomainRequest(value: object): value is DomainRequest { + if (!('domain' in value) || value['domain'] === undefined) return false; + if (!('tenant' in value) || value['tenant'] === undefined) return false; + return true; +} + +export function DomainRequestFromJSON(json: any): DomainRequest { + return DomainRequestFromJSONTyped(json, false); +} + +export function DomainRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DomainRequest { + if (json == null) { + return json; + } + return { + + 'domain': json['domain'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + 'tenant': json['tenant'], + }; +} + +export function DomainRequestToJSON(json: any): DomainRequest { + return DomainRequestToJSONTyped(json, false); +} + +export function DomainRequestToJSONTyped(value?: DomainRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'domain': value['domain'], + 'is_primary': value['isPrimary'], + 'tenant': value['tenant'], + }; +} + diff --git a/packages/client-ts/src/models/DummyChallenge.ts b/packages/client-ts/src/models/DummyChallenge.ts new file mode 100644 index 0000000000..6a53dc7d31 --- /dev/null +++ b/packages/client-ts/src/models/DummyChallenge.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Dummy challenge + * @export + * @interface DummyChallenge + */ +export interface DummyChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof DummyChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof DummyChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof DummyChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof DummyChallenge + */ + name: string; +} + +/** + * Check if a given object implements the DummyChallenge interface. + */ +export function instanceOfDummyChallenge(value: object): value is DummyChallenge { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DummyChallengeFromJSON(json: any): DummyChallenge { + return DummyChallengeFromJSONTyped(json, false); +} + +export function DummyChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DummyChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'name': json['name'], + }; +} + +export function DummyChallengeToJSON(json: any): DummyChallenge { + return DummyChallengeToJSONTyped(json, false); +} + +export function DummyChallengeToJSONTyped(value?: DummyChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/DummyChallengeResponseRequest.ts b/packages/client-ts/src/models/DummyChallengeResponseRequest.ts new file mode 100644 index 0000000000..33724e0455 --- /dev/null +++ b/packages/client-ts/src/models/DummyChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Dummy challenge response + * @export + * @interface DummyChallengeResponseRequest + */ +export interface DummyChallengeResponseRequest { + /** + * + * @type {string} + * @memberof DummyChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the DummyChallengeResponseRequest interface. + */ +export function instanceOfDummyChallengeResponseRequest(value: object): value is DummyChallengeResponseRequest { + return true; +} + +export function DummyChallengeResponseRequestFromJSON(json: any): DummyChallengeResponseRequest { + return DummyChallengeResponseRequestFromJSONTyped(json, false); +} + +export function DummyChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DummyChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function DummyChallengeResponseRequestToJSON(json: any): DummyChallengeResponseRequest { + return DummyChallengeResponseRequestToJSONTyped(json, false); +} + +export function DummyChallengeResponseRequestToJSONTyped(value?: DummyChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/DummyPolicy.ts b/packages/client-ts/src/models/DummyPolicy.ts new file mode 100644 index 0000000000..708dc294fd --- /dev/null +++ b/packages/client-ts/src/models/DummyPolicy.ts @@ -0,0 +1,146 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Dummy Policy Serializer + * @export + * @interface DummyPolicy + */ +export interface DummyPolicy { + /** + * + * @type {string} + * @memberof DummyPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof DummyPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof DummyPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof DummyPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof DummyPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof DummyPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof DummyPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof DummyPolicy + */ + readonly boundTo: number; + /** + * + * @type {boolean} + * @memberof DummyPolicy + */ + result?: boolean; + /** + * + * @type {number} + * @memberof DummyPolicy + */ + waitMin?: number; + /** + * + * @type {number} + * @memberof DummyPolicy + */ + waitMax?: number; +} + +/** + * Check if a given object implements the DummyPolicy interface. + */ +export function instanceOfDummyPolicy(value: object): value is DummyPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + return true; +} + +export function DummyPolicyFromJSON(json: any): DummyPolicy { + return DummyPolicyFromJSONTyped(json, false); +} + +export function DummyPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DummyPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'result': json['result'] == null ? undefined : json['result'], + 'waitMin': json['wait_min'] == null ? undefined : json['wait_min'], + 'waitMax': json['wait_max'] == null ? undefined : json['wait_max'], + }; +} + +export function DummyPolicyToJSON(json: any): DummyPolicy { + return DummyPolicyToJSONTyped(json, false); +} + +export function DummyPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'result': value['result'], + 'wait_min': value['waitMin'], + 'wait_max': value['waitMax'], + }; +} + diff --git a/packages/client-ts/src/models/DummyPolicyRequest.ts b/packages/client-ts/src/models/DummyPolicyRequest.ts new file mode 100644 index 0000000000..cd18ae60f3 --- /dev/null +++ b/packages/client-ts/src/models/DummyPolicyRequest.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Dummy Policy Serializer + * @export + * @interface DummyPolicyRequest + */ +export interface DummyPolicyRequest { + /** + * + * @type {string} + * @memberof DummyPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof DummyPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {boolean} + * @memberof DummyPolicyRequest + */ + result?: boolean; + /** + * + * @type {number} + * @memberof DummyPolicyRequest + */ + waitMin?: number; + /** + * + * @type {number} + * @memberof DummyPolicyRequest + */ + waitMax?: number; +} + +/** + * Check if a given object implements the DummyPolicyRequest interface. + */ +export function instanceOfDummyPolicyRequest(value: object): value is DummyPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DummyPolicyRequestFromJSON(json: any): DummyPolicyRequest { + return DummyPolicyRequestFromJSONTyped(json, false); +} + +export function DummyPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DummyPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'result': json['result'] == null ? undefined : json['result'], + 'waitMin': json['wait_min'] == null ? undefined : json['wait_min'], + 'waitMax': json['wait_max'] == null ? undefined : json['wait_max'], + }; +} + +export function DummyPolicyRequestToJSON(json: any): DummyPolicyRequest { + return DummyPolicyRequestToJSONTyped(json, false); +} + +export function DummyPolicyRequestToJSONTyped(value?: DummyPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'result': value['result'], + 'wait_min': value['waitMin'], + 'wait_max': value['waitMax'], + }; +} + diff --git a/packages/client-ts/src/models/DummyStage.ts b/packages/client-ts/src/models/DummyStage.ts new file mode 100644 index 0000000000..d6e2d03955 --- /dev/null +++ b/packages/client-ts/src/models/DummyStage.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * DummyStage Serializer + * @export + * @interface DummyStage + */ +export interface DummyStage { + /** + * + * @type {string} + * @memberof DummyStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof DummyStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof DummyStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof DummyStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof DummyStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof DummyStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof DummyStage + */ + readonly flowSet: Array; + /** + * + * @type {boolean} + * @memberof DummyStage + */ + throwError?: boolean; +} + +/** + * Check if a given object implements the DummyStage interface. + */ +export function instanceOfDummyStage(value: object): value is DummyStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function DummyStageFromJSON(json: any): DummyStage { + return DummyStageFromJSONTyped(json, false); +} + +export function DummyStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): DummyStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'throwError': json['throw_error'] == null ? undefined : json['throw_error'], + }; +} + +export function DummyStageToJSON(json: any): DummyStage { + return DummyStageToJSONTyped(json, false); +} + +export function DummyStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'throw_error': value['throwError'], + }; +} + diff --git a/packages/client-ts/src/models/DummyStageRequest.ts b/packages/client-ts/src/models/DummyStageRequest.ts new file mode 100644 index 0000000000..deeacaf5fe --- /dev/null +++ b/packages/client-ts/src/models/DummyStageRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DummyStage Serializer + * @export + * @interface DummyStageRequest + */ +export interface DummyStageRequest { + /** + * + * @type {string} + * @memberof DummyStageRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof DummyStageRequest + */ + throwError?: boolean; +} + +/** + * Check if a given object implements the DummyStageRequest interface. + */ +export function instanceOfDummyStageRequest(value: object): value is DummyStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DummyStageRequestFromJSON(json: any): DummyStageRequest { + return DummyStageRequestFromJSONTyped(json, false); +} + +export function DummyStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DummyStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'throwError': json['throw_error'] == null ? undefined : json['throw_error'], + }; +} + +export function DummyStageRequestToJSON(json: any): DummyStageRequest { + return DummyStageRequestToJSONTyped(json, false); +} + +export function DummyStageRequestToJSONTyped(value?: DummyStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'throw_error': value['throwError'], + }; +} + diff --git a/packages/client-ts/src/models/DuoDevice.ts b/packages/client-ts/src/models/DuoDevice.ts new file mode 100644 index 0000000000..e36785c21a --- /dev/null +++ b/packages/client-ts/src/models/DuoDevice.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * Serializer for Duo authenticator devices + * @export + * @interface DuoDevice + */ +export interface DuoDevice { + /** + * + * @type {number} + * @memberof DuoDevice + */ + readonly pk: number; + /** + * The human-readable name of this device. + * @type {string} + * @memberof DuoDevice + */ + name: string; + /** + * + * @type {PartialUser} + * @memberof DuoDevice + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the DuoDevice interface. + */ +export function instanceOfDuoDevice(value: object): value is DuoDevice { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function DuoDeviceFromJSON(json: any): DuoDevice { + return DuoDeviceFromJSONTyped(json, false); +} + +export function DuoDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): DuoDevice { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function DuoDeviceToJSON(json: any): DuoDevice { + return DuoDeviceToJSONTyped(json, false); +} + +export function DuoDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/DuoDeviceEnrollmentStatus.ts b/packages/client-ts/src/models/DuoDeviceEnrollmentStatus.ts new file mode 100644 index 0000000000..8e34e301c8 --- /dev/null +++ b/packages/client-ts/src/models/DuoDeviceEnrollmentStatus.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DuoResponseEnum } from './DuoResponseEnum'; +import { + DuoResponseEnumFromJSON, + DuoResponseEnumFromJSONTyped, + DuoResponseEnumToJSON, + DuoResponseEnumToJSONTyped, +} from './DuoResponseEnum'; + +/** + * + * @export + * @interface DuoDeviceEnrollmentStatus + */ +export interface DuoDeviceEnrollmentStatus { + /** + * + * @type {DuoResponseEnum} + * @memberof DuoDeviceEnrollmentStatus + */ + duoResponse: DuoResponseEnum; +} + + + +/** + * Check if a given object implements the DuoDeviceEnrollmentStatus interface. + */ +export function instanceOfDuoDeviceEnrollmentStatus(value: object): value is DuoDeviceEnrollmentStatus { + if (!('duoResponse' in value) || value['duoResponse'] === undefined) return false; + return true; +} + +export function DuoDeviceEnrollmentStatusFromJSON(json: any): DuoDeviceEnrollmentStatus { + return DuoDeviceEnrollmentStatusFromJSONTyped(json, false); +} + +export function DuoDeviceEnrollmentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DuoDeviceEnrollmentStatus { + if (json == null) { + return json; + } + return { + + 'duoResponse': DuoResponseEnumFromJSON(json['duo_response']), + }; +} + +export function DuoDeviceEnrollmentStatusToJSON(json: any): DuoDeviceEnrollmentStatus { + return DuoDeviceEnrollmentStatusToJSONTyped(json, false); +} + +export function DuoDeviceEnrollmentStatusToJSONTyped(value?: DuoDeviceEnrollmentStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'duo_response': DuoResponseEnumToJSON(value['duoResponse']), + }; +} + diff --git a/packages/client-ts/src/models/DuoDeviceRequest.ts b/packages/client-ts/src/models/DuoDeviceRequest.ts new file mode 100644 index 0000000000..b640e12449 --- /dev/null +++ b/packages/client-ts/src/models/DuoDeviceRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for Duo authenticator devices + * @export + * @interface DuoDeviceRequest + */ +export interface DuoDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof DuoDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the DuoDeviceRequest interface. + */ +export function instanceOfDuoDeviceRequest(value: object): value is DuoDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function DuoDeviceRequestFromJSON(json: any): DuoDeviceRequest { + return DuoDeviceRequestFromJSONTyped(json, false); +} + +export function DuoDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DuoDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function DuoDeviceRequestToJSON(json: any): DuoDeviceRequest { + return DuoDeviceRequestToJSONTyped(json, false); +} + +export function DuoDeviceRequestToJSONTyped(value?: DuoDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/DuoResponseEnum.ts b/packages/client-ts/src/models/DuoResponseEnum.ts new file mode 100644 index 0000000000..1ce94ac390 --- /dev/null +++ b/packages/client-ts/src/models/DuoResponseEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const DuoResponseEnum = { + Success: 'success', + Waiting: 'waiting', + Invalid: 'invalid', + UnknownDefaultOpenApi: '11184809' +} as const; +export type DuoResponseEnum = typeof DuoResponseEnum[keyof typeof DuoResponseEnum]; + + +export function instanceOfDuoResponseEnum(value: any): boolean { + for (const key in DuoResponseEnum) { + if (Object.prototype.hasOwnProperty.call(DuoResponseEnum, key)) { + if (DuoResponseEnum[key as keyof typeof DuoResponseEnum] === value) { + return true; + } + } + } + return false; +} + +export function DuoResponseEnumFromJSON(json: any): DuoResponseEnum { + return DuoResponseEnumFromJSONTyped(json, false); +} + +export function DuoResponseEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DuoResponseEnum { + return json as DuoResponseEnum; +} + +export function DuoResponseEnumToJSON(value?: DuoResponseEnum | null): any { + return value as any; +} + +export function DuoResponseEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DuoResponseEnum { + return value as DuoResponseEnum; +} + diff --git a/packages/client-ts/src/models/EmailChallenge.ts b/packages/client-ts/src/models/EmailChallenge.ts new file mode 100644 index 0000000000..7882903195 --- /dev/null +++ b/packages/client-ts/src/models/EmailChallenge.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Email challenge + * @export + * @interface EmailChallenge + */ +export interface EmailChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof EmailChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof EmailChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof EmailChallenge + */ + responseErrors?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the EmailChallenge interface. + */ +export function instanceOfEmailChallenge(value: object): value is EmailChallenge { + return true; +} + +export function EmailChallengeFromJSON(json: any): EmailChallenge { + return EmailChallengeFromJSONTyped(json, false); +} + +export function EmailChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + }; +} + +export function EmailChallengeToJSON(json: any): EmailChallenge { + return EmailChallengeToJSONTyped(json, false); +} + +export function EmailChallengeToJSONTyped(value?: EmailChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + }; +} + diff --git a/packages/client-ts/src/models/EmailChallengeResponseRequest.ts b/packages/client-ts/src/models/EmailChallengeResponseRequest.ts new file mode 100644 index 0000000000..9defb04593 --- /dev/null +++ b/packages/client-ts/src/models/EmailChallengeResponseRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Email challenge resposen. No fields. This challenge is + * always declared invalid to give the user a chance to retry + * @export + * @interface EmailChallengeResponseRequest + */ +export interface EmailChallengeResponseRequest { + /** + * + * @type {string} + * @memberof EmailChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the EmailChallengeResponseRequest interface. + */ +export function instanceOfEmailChallengeResponseRequest(value: object): value is EmailChallengeResponseRequest { + return true; +} + +export function EmailChallengeResponseRequestFromJSON(json: any): EmailChallengeResponseRequest { + return EmailChallengeResponseRequestFromJSONTyped(json, false); +} + +export function EmailChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function EmailChallengeResponseRequestToJSON(json: any): EmailChallengeResponseRequest { + return EmailChallengeResponseRequestToJSONTyped(json, false); +} + +export function EmailChallengeResponseRequestToJSONTyped(value?: EmailChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/EmailDevice.ts b/packages/client-ts/src/models/EmailDevice.ts new file mode 100644 index 0000000000..7eefa8afc2 --- /dev/null +++ b/packages/client-ts/src/models/EmailDevice.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * Serializer for email authenticator devices + * @export + * @interface EmailDevice + */ +export interface EmailDevice { + /** + * The human-readable name of this device. + * @type {string} + * @memberof EmailDevice + */ + name: string; + /** + * + * @type {number} + * @memberof EmailDevice + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof EmailDevice + */ + readonly email: string; + /** + * + * @type {PartialUser} + * @memberof EmailDevice + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the EmailDevice interface. + */ +export function instanceOfEmailDevice(value: object): value is EmailDevice { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('email' in value) || value['email'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function EmailDeviceFromJSON(json: any): EmailDevice { + return EmailDeviceFromJSONTyped(json, false); +} + +export function EmailDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailDevice { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'pk': json['pk'], + 'email': json['email'], + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function EmailDeviceToJSON(json: any): EmailDevice { + return EmailDeviceToJSONTyped(json, false); +} + +export function EmailDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/EmailDeviceRequest.ts b/packages/client-ts/src/models/EmailDeviceRequest.ts new file mode 100644 index 0000000000..efcfe193ee --- /dev/null +++ b/packages/client-ts/src/models/EmailDeviceRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for email authenticator devices + * @export + * @interface EmailDeviceRequest + */ +export interface EmailDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof EmailDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the EmailDeviceRequest interface. + */ +export function instanceOfEmailDeviceRequest(value: object): value is EmailDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function EmailDeviceRequestFromJSON(json: any): EmailDeviceRequest { + return EmailDeviceRequestFromJSONTyped(json, false); +} + +export function EmailDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function EmailDeviceRequestToJSON(json: any): EmailDeviceRequest { + return EmailDeviceRequestToJSONTyped(json, false); +} + +export function EmailDeviceRequestToJSONTyped(value?: EmailDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/EmailStage.ts b/packages/client-ts/src/models/EmailStage.ts new file mode 100644 index 0000000000..9fcde3910c --- /dev/null +++ b/packages/client-ts/src/models/EmailStage.ts @@ -0,0 +1,234 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * EmailStage Serializer + * @export + * @interface EmailStage + */ +export interface EmailStage { + /** + * + * @type {string} + * @memberof EmailStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof EmailStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof EmailStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof EmailStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof EmailStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof EmailStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof EmailStage + */ + readonly flowSet: Array; + /** + * When enabled, global Email connection settings will be used and connection settings below will be ignored. + * @type {boolean} + * @memberof EmailStage + */ + useGlobalSettings?: boolean; + /** + * + * @type {string} + * @memberof EmailStage + */ + host?: string; + /** + * + * @type {number} + * @memberof EmailStage + */ + port?: number; + /** + * + * @type {string} + * @memberof EmailStage + */ + username?: string; + /** + * + * @type {boolean} + * @memberof EmailStage + */ + useTls?: boolean; + /** + * + * @type {boolean} + * @memberof EmailStage + */ + useSsl?: boolean; + /** + * + * @type {number} + * @memberof EmailStage + */ + timeout?: number; + /** + * + * @type {string} + * @memberof EmailStage + */ + fromAddress?: string; + /** + * Time the token sent is valid (Format: hours=3,minutes=17,seconds=300). + * @type {string} + * @memberof EmailStage + */ + tokenExpiry?: string; + /** + * + * @type {string} + * @memberof EmailStage + */ + subject?: string; + /** + * + * @type {string} + * @memberof EmailStage + */ + template?: string; + /** + * Activate users upon completion of stage. + * @type {boolean} + * @memberof EmailStage + */ + activateUserOnSuccess?: boolean; + /** + * + * @type {number} + * @memberof EmailStage + */ + recoveryMaxAttempts?: number; + /** + * The time window used to count recent account recovery attempts. If the number of attempts exceed recovery_max_attempts within this period, further attempts will be rate-limited. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof EmailStage + */ + recoveryCacheTimeout?: string; +} + +/** + * Check if a given object implements the EmailStage interface. + */ +export function instanceOfEmailStage(value: object): value is EmailStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function EmailStageFromJSON(json: any): EmailStage { + return EmailStageFromJSONTyped(json, false); +} + +export function EmailStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'useGlobalSettings': json['use_global_settings'] == null ? undefined : json['use_global_settings'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'username': json['username'] == null ? undefined : json['username'], + 'useTls': json['use_tls'] == null ? undefined : json['use_tls'], + 'useSsl': json['use_ssl'] == null ? undefined : json['use_ssl'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'fromAddress': json['from_address'] == null ? undefined : json['from_address'], + 'tokenExpiry': json['token_expiry'] == null ? undefined : json['token_expiry'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'template': json['template'] == null ? undefined : json['template'], + 'activateUserOnSuccess': json['activate_user_on_success'] == null ? undefined : json['activate_user_on_success'], + 'recoveryMaxAttempts': json['recovery_max_attempts'] == null ? undefined : json['recovery_max_attempts'], + 'recoveryCacheTimeout': json['recovery_cache_timeout'] == null ? undefined : json['recovery_cache_timeout'], + }; +} + +export function EmailStageToJSON(json: any): EmailStage { + return EmailStageToJSONTyped(json, false); +} + +export function EmailStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'use_global_settings': value['useGlobalSettings'], + 'host': value['host'], + 'port': value['port'], + 'username': value['username'], + 'use_tls': value['useTls'], + 'use_ssl': value['useSsl'], + 'timeout': value['timeout'], + 'from_address': value['fromAddress'], + 'token_expiry': value['tokenExpiry'], + 'subject': value['subject'], + 'template': value['template'], + 'activate_user_on_success': value['activateUserOnSuccess'], + 'recovery_max_attempts': value['recoveryMaxAttempts'], + 'recovery_cache_timeout': value['recoveryCacheTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/EmailStageRequest.ts b/packages/client-ts/src/models/EmailStageRequest.ts new file mode 100644 index 0000000000..9ce3b5f7f4 --- /dev/null +++ b/packages/client-ts/src/models/EmailStageRequest.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * EmailStage Serializer + * @export + * @interface EmailStageRequest + */ +export interface EmailStageRequest { + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + name: string; + /** + * When enabled, global Email connection settings will be used and connection settings below will be ignored. + * @type {boolean} + * @memberof EmailStageRequest + */ + useGlobalSettings?: boolean; + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + host?: string; + /** + * + * @type {number} + * @memberof EmailStageRequest + */ + port?: number; + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + password?: string; + /** + * + * @type {boolean} + * @memberof EmailStageRequest + */ + useTls?: boolean; + /** + * + * @type {boolean} + * @memberof EmailStageRequest + */ + useSsl?: boolean; + /** + * + * @type {number} + * @memberof EmailStageRequest + */ + timeout?: number; + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + fromAddress?: string; + /** + * Time the token sent is valid (Format: hours=3,minutes=17,seconds=300). + * @type {string} + * @memberof EmailStageRequest + */ + tokenExpiry?: string; + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + subject?: string; + /** + * + * @type {string} + * @memberof EmailStageRequest + */ + template?: string; + /** + * Activate users upon completion of stage. + * @type {boolean} + * @memberof EmailStageRequest + */ + activateUserOnSuccess?: boolean; + /** + * + * @type {number} + * @memberof EmailStageRequest + */ + recoveryMaxAttempts?: number; + /** + * The time window used to count recent account recovery attempts. If the number of attempts exceed recovery_max_attempts within this period, further attempts will be rate-limited. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof EmailStageRequest + */ + recoveryCacheTimeout?: string; +} + +/** + * Check if a given object implements the EmailStageRequest interface. + */ +export function instanceOfEmailStageRequest(value: object): value is EmailStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function EmailStageRequestFromJSON(json: any): EmailStageRequest { + return EmailStageRequestFromJSONTyped(json, false); +} + +export function EmailStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'useGlobalSettings': json['use_global_settings'] == null ? undefined : json['use_global_settings'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'username': json['username'] == null ? undefined : json['username'], + 'password': json['password'] == null ? undefined : json['password'], + 'useTls': json['use_tls'] == null ? undefined : json['use_tls'], + 'useSsl': json['use_ssl'] == null ? undefined : json['use_ssl'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'fromAddress': json['from_address'] == null ? undefined : json['from_address'], + 'tokenExpiry': json['token_expiry'] == null ? undefined : json['token_expiry'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'template': json['template'] == null ? undefined : json['template'], + 'activateUserOnSuccess': json['activate_user_on_success'] == null ? undefined : json['activate_user_on_success'], + 'recoveryMaxAttempts': json['recovery_max_attempts'] == null ? undefined : json['recovery_max_attempts'], + 'recoveryCacheTimeout': json['recovery_cache_timeout'] == null ? undefined : json['recovery_cache_timeout'], + }; +} + +export function EmailStageRequestToJSON(json: any): EmailStageRequest { + return EmailStageRequestToJSONTyped(json, false); +} + +export function EmailStageRequestToJSONTyped(value?: EmailStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'use_global_settings': value['useGlobalSettings'], + 'host': value['host'], + 'port': value['port'], + 'username': value['username'], + 'password': value['password'], + 'use_tls': value['useTls'], + 'use_ssl': value['useSsl'], + 'timeout': value['timeout'], + 'from_address': value['fromAddress'], + 'token_expiry': value['tokenExpiry'], + 'subject': value['subject'], + 'template': value['template'], + 'activate_user_on_success': value['activateUserOnSuccess'], + 'recovery_max_attempts': value['recoveryMaxAttempts'], + 'recovery_cache_timeout': value['recoveryCacheTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/Endpoint.ts b/packages/client-ts/src/models/Endpoint.ts new file mode 100644 index 0000000000..d1385fb6a3 --- /dev/null +++ b/packages/client-ts/src/models/Endpoint.ts @@ -0,0 +1,175 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EndpointAuthModeEnum } from './EndpointAuthModeEnum'; +import { + EndpointAuthModeEnumFromJSON, + EndpointAuthModeEnumFromJSONTyped, + EndpointAuthModeEnumToJSON, + EndpointAuthModeEnumToJSONTyped, +} from './EndpointAuthModeEnum'; +import type { ProtocolEnum } from './ProtocolEnum'; +import { + ProtocolEnumFromJSON, + ProtocolEnumFromJSONTyped, + ProtocolEnumToJSON, + ProtocolEnumToJSONTyped, +} from './ProtocolEnum'; +import type { RACProvider } from './RACProvider'; +import { + RACProviderFromJSON, + RACProviderFromJSONTyped, + RACProviderToJSON, + RACProviderToJSONTyped, +} from './RACProvider'; + +/** + * Endpoint Serializer + * @export + * @interface Endpoint + */ +export interface Endpoint { + /** + * + * @type {string} + * @memberof Endpoint + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Endpoint + */ + name: string; + /** + * + * @type {number} + * @memberof Endpoint + */ + provider: number; + /** + * + * @type {RACProvider} + * @memberof Endpoint + */ + readonly providerObj: RACProvider; + /** + * + * @type {ProtocolEnum} + * @memberof Endpoint + */ + protocol: ProtocolEnum; + /** + * + * @type {string} + * @memberof Endpoint + */ + host: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Endpoint + */ + settings?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof Endpoint + */ + propertyMappings?: Array; + /** + * + * @type {EndpointAuthModeEnum} + * @memberof Endpoint + */ + authMode: EndpointAuthModeEnum; + /** + * Build actual launch URL (the provider itself does not have one, just + * individual endpoints) + * @type {string} + * @memberof Endpoint + */ + readonly launchUrl: string | null; + /** + * + * @type {number} + * @memberof Endpoint + */ + maximumConnections?: number; +} + + + +/** + * Check if a given object implements the Endpoint interface. + */ +export function instanceOfEndpoint(value: object): value is Endpoint { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('providerObj' in value) || value['providerObj'] === undefined) return false; + if (!('protocol' in value) || value['protocol'] === undefined) return false; + if (!('host' in value) || value['host'] === undefined) return false; + if (!('authMode' in value) || value['authMode'] === undefined) return false; + if (!('launchUrl' in value) || value['launchUrl'] === undefined) return false; + return true; +} + +export function EndpointFromJSON(json: any): Endpoint { + return EndpointFromJSONTyped(json, false); +} + +export function EndpointFromJSONTyped(json: any, ignoreDiscriminator: boolean): Endpoint { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'provider': json['provider'], + 'providerObj': RACProviderFromJSON(json['provider_obj']), + 'protocol': ProtocolEnumFromJSON(json['protocol']), + 'host': json['host'], + 'settings': json['settings'] == null ? undefined : json['settings'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'authMode': EndpointAuthModeEnumFromJSON(json['auth_mode']), + 'launchUrl': json['launch_url'], + 'maximumConnections': json['maximum_connections'] == null ? undefined : json['maximum_connections'], + }; +} + +export function EndpointToJSON(json: any): Endpoint { + return EndpointToJSONTyped(json, false); +} + +export function EndpointToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'provider': value['provider'], + 'protocol': ProtocolEnumToJSON(value['protocol']), + 'host': value['host'], + 'settings': value['settings'], + 'property_mappings': value['propertyMappings'], + 'auth_mode': EndpointAuthModeEnumToJSON(value['authMode']), + 'maximum_connections': value['maximumConnections'], + }; +} + diff --git a/packages/client-ts/src/models/EndpointAgentChallenge.ts b/packages/client-ts/src/models/EndpointAgentChallenge.ts new file mode 100644 index 0000000000..c767124d84 --- /dev/null +++ b/packages/client-ts/src/models/EndpointAgentChallenge.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Signed challenge for authentik agent to respond to + * @export + * @interface EndpointAgentChallenge + */ +export interface EndpointAgentChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof EndpointAgentChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof EndpointAgentChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof EndpointAgentChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof EndpointAgentChallenge + */ + challenge: string; + /** + * + * @type {number} + * @memberof EndpointAgentChallenge + */ + challengeIdleTimeout: number; +} + +/** + * Check if a given object implements the EndpointAgentChallenge interface. + */ +export function instanceOfEndpointAgentChallenge(value: object): value is EndpointAgentChallenge { + if (!('challenge' in value) || value['challenge'] === undefined) return false; + if (!('challengeIdleTimeout' in value) || value['challengeIdleTimeout'] === undefined) return false; + return true; +} + +export function EndpointAgentChallengeFromJSON(json: any): EndpointAgentChallenge { + return EndpointAgentChallengeFromJSONTyped(json, false); +} + +export function EndpointAgentChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointAgentChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'challenge': json['challenge'], + 'challengeIdleTimeout': json['challenge_idle_timeout'], + }; +} + +export function EndpointAgentChallengeToJSON(json: any): EndpointAgentChallenge { + return EndpointAgentChallengeToJSONTyped(json, false); +} + +export function EndpointAgentChallengeToJSONTyped(value?: EndpointAgentChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'challenge': value['challenge'], + 'challenge_idle_timeout': value['challengeIdleTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/EndpointAgentChallengeResponseRequest.ts b/packages/client-ts/src/models/EndpointAgentChallengeResponseRequest.ts new file mode 100644 index 0000000000..aab69ea263 --- /dev/null +++ b/packages/client-ts/src/models/EndpointAgentChallengeResponseRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response to signed challenge + * @export + * @interface EndpointAgentChallengeResponseRequest + */ +export interface EndpointAgentChallengeResponseRequest { + /** + * + * @type {string} + * @memberof EndpointAgentChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof EndpointAgentChallengeResponseRequest + */ + response?: string | null; +} + +/** + * Check if a given object implements the EndpointAgentChallengeResponseRequest interface. + */ +export function instanceOfEndpointAgentChallengeResponseRequest(value: object): value is EndpointAgentChallengeResponseRequest { + return true; +} + +export function EndpointAgentChallengeResponseRequestFromJSON(json: any): EndpointAgentChallengeResponseRequest { + return EndpointAgentChallengeResponseRequestFromJSONTyped(json, false); +} + +export function EndpointAgentChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointAgentChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'response': json['response'] == null ? undefined : json['response'], + }; +} + +export function EndpointAgentChallengeResponseRequestToJSON(json: any): EndpointAgentChallengeResponseRequest { + return EndpointAgentChallengeResponseRequestToJSONTyped(json, false); +} + +export function EndpointAgentChallengeResponseRequestToJSONTyped(value?: EndpointAgentChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'response': value['response'], + }; +} + diff --git a/packages/client-ts/src/models/EndpointAuthModeEnum.ts b/packages/client-ts/src/models/EndpointAuthModeEnum.ts new file mode 100644 index 0000000000..0ae85544fd --- /dev/null +++ b/packages/client-ts/src/models/EndpointAuthModeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const EndpointAuthModeEnum = { + Static: 'static', + Prompt: 'prompt', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EndpointAuthModeEnum = typeof EndpointAuthModeEnum[keyof typeof EndpointAuthModeEnum]; + + +export function instanceOfEndpointAuthModeEnum(value: any): boolean { + for (const key in EndpointAuthModeEnum) { + if (Object.prototype.hasOwnProperty.call(EndpointAuthModeEnum, key)) { + if (EndpointAuthModeEnum[key as keyof typeof EndpointAuthModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function EndpointAuthModeEnumFromJSON(json: any): EndpointAuthModeEnum { + return EndpointAuthModeEnumFromJSONTyped(json, false); +} + +export function EndpointAuthModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointAuthModeEnum { + return json as EndpointAuthModeEnum; +} + +export function EndpointAuthModeEnumToJSON(value?: EndpointAuthModeEnum | null): any { + return value as any; +} + +export function EndpointAuthModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): EndpointAuthModeEnum { + return value as EndpointAuthModeEnum; +} + diff --git a/packages/client-ts/src/models/EndpointDevice.ts b/packages/client-ts/src/models/EndpointDevice.ts new file mode 100644 index 0000000000..24de871c23 --- /dev/null +++ b/packages/client-ts/src/models/EndpointDevice.ts @@ -0,0 +1,145 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceAccessGroup } from './DeviceAccessGroup'; +import { + DeviceAccessGroupFromJSON, + DeviceAccessGroupFromJSONTyped, + DeviceAccessGroupToJSON, + DeviceAccessGroupToJSONTyped, +} from './DeviceAccessGroup'; +import type { DeviceFactSnapshot } from './DeviceFactSnapshot'; +import { + DeviceFactSnapshotFromJSON, + DeviceFactSnapshotFromJSONTyped, + DeviceFactSnapshotToJSON, + DeviceFactSnapshotToJSONTyped, +} from './DeviceFactSnapshot'; + +/** + * + * @export + * @interface EndpointDevice + */ +export interface EndpointDevice { + /** + * + * @type {string} + * @memberof EndpointDevice + */ + deviceUuid?: string; + /** + * + * @type {string} + * @memberof EndpointDevice + */ + readonly pbmUuid: string; + /** + * + * @type {string} + * @memberof EndpointDevice + */ + name: string; + /** + * + * @type {string} + * @memberof EndpointDevice + */ + accessGroup?: string | null; + /** + * + * @type {DeviceAccessGroup} + * @memberof EndpointDevice + */ + accessGroupObj?: DeviceAccessGroup; + /** + * + * @type {boolean} + * @memberof EndpointDevice + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof EndpointDevice + */ + expires?: Date | null; + /** + * + * @type {DeviceFactSnapshot} + * @memberof EndpointDevice + */ + readonly facts: DeviceFactSnapshot; + /** + * + * @type {{ [key: string]: any; }} + * @memberof EndpointDevice + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the EndpointDevice interface. + */ +export function instanceOfEndpointDevice(value: object): value is EndpointDevice { + if (!('pbmUuid' in value) || value['pbmUuid'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('facts' in value) || value['facts'] === undefined) return false; + return true; +} + +export function EndpointDeviceFromJSON(json: any): EndpointDevice { + return EndpointDeviceFromJSONTyped(json, false); +} + +export function EndpointDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointDevice { + if (json == null) { + return json; + } + return { + + 'deviceUuid': json['device_uuid'] == null ? undefined : json['device_uuid'], + 'pbmUuid': json['pbm_uuid'], + 'name': json['name'], + 'accessGroup': json['access_group'] == null ? undefined : json['access_group'], + 'accessGroupObj': json['access_group_obj'] == null ? undefined : DeviceAccessGroupFromJSON(json['access_group_obj']), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'facts': DeviceFactSnapshotFromJSON(json['facts']), + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function EndpointDeviceToJSON(json: any): EndpointDevice { + return EndpointDeviceToJSONTyped(json, false); +} + +export function EndpointDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_uuid': value['deviceUuid'], + 'name': value['name'], + 'access_group': value['accessGroup'], + 'access_group_obj': DeviceAccessGroupToJSON(value['accessGroupObj']), + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/EndpointDeviceDetails.ts b/packages/client-ts/src/models/EndpointDeviceDetails.ts new file mode 100644 index 0000000000..3db4fd949c --- /dev/null +++ b/packages/client-ts/src/models/EndpointDeviceDetails.ts @@ -0,0 +1,177 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceAccessGroup } from './DeviceAccessGroup'; +import { + DeviceAccessGroupFromJSON, + DeviceAccessGroupFromJSONTyped, + DeviceAccessGroupToJSON, + DeviceAccessGroupToJSONTyped, +} from './DeviceAccessGroup'; +import type { DeviceConnection } from './DeviceConnection'; +import { + DeviceConnectionFromJSON, + DeviceConnectionFromJSONTyped, + DeviceConnectionToJSON, + DeviceConnectionToJSONTyped, +} from './DeviceConnection'; +import type { DeviceFactSnapshot } from './DeviceFactSnapshot'; +import { + DeviceFactSnapshotFromJSON, + DeviceFactSnapshotFromJSONTyped, + DeviceFactSnapshotToJSON, + DeviceFactSnapshotToJSONTyped, +} from './DeviceFactSnapshot'; + +/** + * + * @export + * @interface EndpointDeviceDetails + */ +export interface EndpointDeviceDetails { + /** + * + * @type {string} + * @memberof EndpointDeviceDetails + */ + deviceUuid?: string; + /** + * + * @type {string} + * @memberof EndpointDeviceDetails + */ + readonly pbmUuid: string; + /** + * + * @type {string} + * @memberof EndpointDeviceDetails + */ + name: string; + /** + * + * @type {string} + * @memberof EndpointDeviceDetails + */ + accessGroup?: string | null; + /** + * + * @type {DeviceAccessGroup} + * @memberof EndpointDeviceDetails + */ + accessGroupObj?: DeviceAccessGroup; + /** + * + * @type {boolean} + * @memberof EndpointDeviceDetails + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof EndpointDeviceDetails + */ + expires?: Date | null; + /** + * + * @type {DeviceFactSnapshot} + * @memberof EndpointDeviceDetails + */ + readonly facts: DeviceFactSnapshot; + /** + * + * @type {{ [key: string]: any; }} + * @memberof EndpointDeviceDetails + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof EndpointDeviceDetails + */ + connectionsObj: Array; + /** + * + * @type {Array} + * @memberof EndpointDeviceDetails + */ + readonly policies: Array; + /** + * + * @type {Array} + * @memberof EndpointDeviceDetails + */ + readonly connections: Array; +} + +/** + * Check if a given object implements the EndpointDeviceDetails interface. + */ +export function instanceOfEndpointDeviceDetails(value: object): value is EndpointDeviceDetails { + if (!('pbmUuid' in value) || value['pbmUuid'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('facts' in value) || value['facts'] === undefined) return false; + if (!('connectionsObj' in value) || value['connectionsObj'] === undefined) return false; + if (!('policies' in value) || value['policies'] === undefined) return false; + if (!('connections' in value) || value['connections'] === undefined) return false; + return true; +} + +export function EndpointDeviceDetailsFromJSON(json: any): EndpointDeviceDetails { + return EndpointDeviceDetailsFromJSONTyped(json, false); +} + +export function EndpointDeviceDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointDeviceDetails { + if (json == null) { + return json; + } + return { + + 'deviceUuid': json['device_uuid'] == null ? undefined : json['device_uuid'], + 'pbmUuid': json['pbm_uuid'], + 'name': json['name'], + 'accessGroup': json['access_group'] == null ? undefined : json['access_group'], + 'accessGroupObj': json['access_group_obj'] == null ? undefined : DeviceAccessGroupFromJSON(json['access_group_obj']), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'facts': DeviceFactSnapshotFromJSON(json['facts']), + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'connectionsObj': ((json['connections_obj'] as Array).map(DeviceConnectionFromJSON)), + 'policies': json['policies'], + 'connections': json['connections'], + }; +} + +export function EndpointDeviceDetailsToJSON(json: any): EndpointDeviceDetails { + return EndpointDeviceDetailsToJSONTyped(json, false); +} + +export function EndpointDeviceDetailsToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_uuid': value['deviceUuid'], + 'name': value['name'], + 'access_group': value['accessGroup'], + 'access_group_obj': DeviceAccessGroupToJSON(value['accessGroupObj']), + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'attributes': value['attributes'], + 'connections_obj': ((value['connectionsObj'] as Array).map(DeviceConnectionToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/EndpointDeviceRequest.ts b/packages/client-ts/src/models/EndpointDeviceRequest.ts new file mode 100644 index 0000000000..e04c166198 --- /dev/null +++ b/packages/client-ts/src/models/EndpointDeviceRequest.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceAccessGroupRequest } from './DeviceAccessGroupRequest'; +import { + DeviceAccessGroupRequestFromJSON, + DeviceAccessGroupRequestFromJSONTyped, + DeviceAccessGroupRequestToJSON, + DeviceAccessGroupRequestToJSONTyped, +} from './DeviceAccessGroupRequest'; + +/** + * + * @export + * @interface EndpointDeviceRequest + */ +export interface EndpointDeviceRequest { + /** + * + * @type {string} + * @memberof EndpointDeviceRequest + */ + deviceUuid?: string; + /** + * + * @type {string} + * @memberof EndpointDeviceRequest + */ + name: string; + /** + * + * @type {string} + * @memberof EndpointDeviceRequest + */ + accessGroup?: string | null; + /** + * + * @type {DeviceAccessGroupRequest} + * @memberof EndpointDeviceRequest + */ + accessGroupObj?: DeviceAccessGroupRequest; + /** + * + * @type {boolean} + * @memberof EndpointDeviceRequest + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof EndpointDeviceRequest + */ + expires?: Date | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof EndpointDeviceRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the EndpointDeviceRequest interface. + */ +export function instanceOfEndpointDeviceRequest(value: object): value is EndpointDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function EndpointDeviceRequestFromJSON(json: any): EndpointDeviceRequest { + return EndpointDeviceRequestFromJSONTyped(json, false); +} + +export function EndpointDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointDeviceRequest { + if (json == null) { + return json; + } + return { + + 'deviceUuid': json['device_uuid'] == null ? undefined : json['device_uuid'], + 'name': json['name'], + 'accessGroup': json['access_group'] == null ? undefined : json['access_group'], + 'accessGroupObj': json['access_group_obj'] == null ? undefined : DeviceAccessGroupRequestFromJSON(json['access_group_obj']), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function EndpointDeviceRequestToJSON(json: any): EndpointDeviceRequest { + return EndpointDeviceRequestToJSONTyped(json, false); +} + +export function EndpointDeviceRequestToJSONTyped(value?: EndpointDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_uuid': value['deviceUuid'], + 'name': value['name'], + 'access_group': value['accessGroup'], + 'access_group_obj': DeviceAccessGroupRequestToJSON(value['accessGroupObj']), + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/EndpointRequest.ts b/packages/client-ts/src/models/EndpointRequest.ts new file mode 100644 index 0000000000..49b1a6b16a --- /dev/null +++ b/packages/client-ts/src/models/EndpointRequest.ts @@ -0,0 +1,143 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EndpointAuthModeEnum } from './EndpointAuthModeEnum'; +import { + EndpointAuthModeEnumFromJSON, + EndpointAuthModeEnumFromJSONTyped, + EndpointAuthModeEnumToJSON, + EndpointAuthModeEnumToJSONTyped, +} from './EndpointAuthModeEnum'; +import type { ProtocolEnum } from './ProtocolEnum'; +import { + ProtocolEnumFromJSON, + ProtocolEnumFromJSONTyped, + ProtocolEnumToJSON, + ProtocolEnumToJSONTyped, +} from './ProtocolEnum'; + +/** + * Endpoint Serializer + * @export + * @interface EndpointRequest + */ +export interface EndpointRequest { + /** + * + * @type {string} + * @memberof EndpointRequest + */ + name: string; + /** + * + * @type {number} + * @memberof EndpointRequest + */ + provider: number; + /** + * + * @type {ProtocolEnum} + * @memberof EndpointRequest + */ + protocol: ProtocolEnum; + /** + * + * @type {string} + * @memberof EndpointRequest + */ + host: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof EndpointRequest + */ + settings?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof EndpointRequest + */ + propertyMappings?: Array; + /** + * + * @type {EndpointAuthModeEnum} + * @memberof EndpointRequest + */ + authMode: EndpointAuthModeEnum; + /** + * + * @type {number} + * @memberof EndpointRequest + */ + maximumConnections?: number; +} + + + +/** + * Check if a given object implements the EndpointRequest interface. + */ +export function instanceOfEndpointRequest(value: object): value is EndpointRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('protocol' in value) || value['protocol'] === undefined) return false; + if (!('host' in value) || value['host'] === undefined) return false; + if (!('authMode' in value) || value['authMode'] === undefined) return false; + return true; +} + +export function EndpointRequestFromJSON(json: any): EndpointRequest { + return EndpointRequestFromJSONTyped(json, false); +} + +export function EndpointRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'provider': json['provider'], + 'protocol': ProtocolEnumFromJSON(json['protocol']), + 'host': json['host'], + 'settings': json['settings'] == null ? undefined : json['settings'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'authMode': EndpointAuthModeEnumFromJSON(json['auth_mode']), + 'maximumConnections': json['maximum_connections'] == null ? undefined : json['maximum_connections'], + }; +} + +export function EndpointRequestToJSON(json: any): EndpointRequest { + return EndpointRequestToJSONTyped(json, false); +} + +export function EndpointRequestToJSONTyped(value?: EndpointRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'provider': value['provider'], + 'protocol': ProtocolEnumToJSON(value['protocol']), + 'host': value['host'], + 'settings': value['settings'], + 'property_mappings': value['propertyMappings'], + 'auth_mode': EndpointAuthModeEnumToJSON(value['authMode']), + 'maximum_connections': value['maximumConnections'], + }; +} + diff --git a/packages/client-ts/src/models/EndpointStage.ts b/packages/client-ts/src/models/EndpointStage.ts new file mode 100644 index 0000000000..127bd2fdc1 --- /dev/null +++ b/packages/client-ts/src/models/EndpointStage.ts @@ -0,0 +1,163 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Connector } from './Connector'; +import { + ConnectorFromJSON, + ConnectorFromJSONTyped, + ConnectorToJSON, + ConnectorToJSONTyped, +} from './Connector'; +import type { StageModeEnum } from './StageModeEnum'; +import { + StageModeEnumFromJSON, + StageModeEnumFromJSONTyped, + StageModeEnumToJSON, + StageModeEnumToJSONTyped, +} from './StageModeEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * EndpointStage Serializer + * @export + * @interface EndpointStage + */ +export interface EndpointStage { + /** + * + * @type {string} + * @memberof EndpointStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof EndpointStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof EndpointStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof EndpointStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof EndpointStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof EndpointStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof EndpointStage + */ + readonly flowSet: Array; + /** + * + * @type {string} + * @memberof EndpointStage + */ + connector: string; + /** + * + * @type {Connector} + * @memberof EndpointStage + */ + readonly connectorObj: Connector; + /** + * + * @type {StageModeEnum} + * @memberof EndpointStage + */ + mode?: StageModeEnum; +} + + + +/** + * Check if a given object implements the EndpointStage interface. + */ +export function instanceOfEndpointStage(value: object): value is EndpointStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('connector' in value) || value['connector'] === undefined) return false; + if (!('connectorObj' in value) || value['connectorObj'] === undefined) return false; + return true; +} + +export function EndpointStageFromJSON(json: any): EndpointStage { + return EndpointStageFromJSONTyped(json, false); +} + +export function EndpointStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'connector': json['connector'], + 'connectorObj': ConnectorFromJSON(json['connector_obj']), + 'mode': json['mode'] == null ? undefined : StageModeEnumFromJSON(json['mode']), + }; +} + +export function EndpointStageToJSON(json: any): EndpointStage { + return EndpointStageToJSONTyped(json, false); +} + +export function EndpointStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'connector': value['connector'], + 'mode': StageModeEnumToJSON(value['mode']), + }; +} + diff --git a/packages/client-ts/src/models/EndpointStageRequest.ts b/packages/client-ts/src/models/EndpointStageRequest.ts new file mode 100644 index 0000000000..fe734af9ab --- /dev/null +++ b/packages/client-ts/src/models/EndpointStageRequest.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { StageModeEnum } from './StageModeEnum'; +import { + StageModeEnumFromJSON, + StageModeEnumFromJSONTyped, + StageModeEnumToJSON, + StageModeEnumToJSONTyped, +} from './StageModeEnum'; + +/** + * EndpointStage Serializer + * @export + * @interface EndpointStageRequest + */ +export interface EndpointStageRequest { + /** + * + * @type {string} + * @memberof EndpointStageRequest + */ + name: string; + /** + * + * @type {string} + * @memberof EndpointStageRequest + */ + connector: string; + /** + * + * @type {StageModeEnum} + * @memberof EndpointStageRequest + */ + mode?: StageModeEnum; +} + + + +/** + * Check if a given object implements the EndpointStageRequest interface. + */ +export function instanceOfEndpointStageRequest(value: object): value is EndpointStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('connector' in value) || value['connector'] === undefined) return false; + return true; +} + +export function EndpointStageRequestFromJSON(json: any): EndpointStageRequest { + return EndpointStageRequestFromJSONTyped(json, false); +} + +export function EndpointStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'connector': json['connector'], + 'mode': json['mode'] == null ? undefined : StageModeEnumFromJSON(json['mode']), + }; +} + +export function EndpointStageRequestToJSON(json: any): EndpointStageRequest { + return EndpointStageRequestToJSONTyped(json, false); +} + +export function EndpointStageRequestToJSONTyped(value?: EndpointStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'connector': value['connector'], + 'mode': StageModeEnumToJSON(value['mode']), + }; +} + diff --git a/packages/client-ts/src/models/EnrollRequest.ts b/packages/client-ts/src/models/EnrollRequest.ts new file mode 100644 index 0000000000..7425742530 --- /dev/null +++ b/packages/client-ts/src/models/EnrollRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface EnrollRequest + */ +export interface EnrollRequest { + /** + * + * @type {string} + * @memberof EnrollRequest + */ + deviceSerial: string; + /** + * + * @type {string} + * @memberof EnrollRequest + */ + deviceName: string; +} + +/** + * Check if a given object implements the EnrollRequest interface. + */ +export function instanceOfEnrollRequest(value: object): value is EnrollRequest { + if (!('deviceSerial' in value) || value['deviceSerial'] === undefined) return false; + if (!('deviceName' in value) || value['deviceName'] === undefined) return false; + return true; +} + +export function EnrollRequestFromJSON(json: any): EnrollRequest { + return EnrollRequestFromJSONTyped(json, false); +} + +export function EnrollRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrollRequest { + if (json == null) { + return json; + } + return { + + 'deviceSerial': json['device_serial'], + 'deviceName': json['device_name'], + }; +} + +export function EnrollRequestToJSON(json: any): EnrollRequest { + return EnrollRequestToJSONTyped(json, false); +} + +export function EnrollRequestToJSONTyped(value?: EnrollRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_serial': value['deviceSerial'], + 'device_name': value['deviceName'], + }; +} + diff --git a/packages/client-ts/src/models/EnrollmentToken.ts b/packages/client-ts/src/models/EnrollmentToken.ts new file mode 100644 index 0000000000..0c0a5ee63d --- /dev/null +++ b/packages/client-ts/src/models/EnrollmentToken.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceAccessGroup } from './DeviceAccessGroup'; +import { + DeviceAccessGroupFromJSON, + DeviceAccessGroupFromJSONTyped, + DeviceAccessGroupToJSON, + DeviceAccessGroupToJSONTyped, +} from './DeviceAccessGroup'; + +/** + * + * @export + * @interface EnrollmentToken + */ +export interface EnrollmentToken { + /** + * + * @type {string} + * @memberof EnrollmentToken + */ + readonly tokenUuid: string; + /** + * + * @type {string} + * @memberof EnrollmentToken + */ + deviceGroup?: string | null; + /** + * + * @type {DeviceAccessGroup} + * @memberof EnrollmentToken + */ + readonly deviceGroupObj: DeviceAccessGroup; + /** + * + * @type {string} + * @memberof EnrollmentToken + */ + connector: string; + /** + * + * @type {string} + * @memberof EnrollmentToken + */ + name: string; + /** + * + * @type {boolean} + * @memberof EnrollmentToken + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof EnrollmentToken + */ + expires?: Date | null; +} + +/** + * Check if a given object implements the EnrollmentToken interface. + */ +export function instanceOfEnrollmentToken(value: object): value is EnrollmentToken { + if (!('tokenUuid' in value) || value['tokenUuid'] === undefined) return false; + if (!('deviceGroupObj' in value) || value['deviceGroupObj'] === undefined) return false; + if (!('connector' in value) || value['connector'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function EnrollmentTokenFromJSON(json: any): EnrollmentToken { + return EnrollmentTokenFromJSONTyped(json, false); +} + +export function EnrollmentTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrollmentToken { + if (json == null) { + return json; + } + return { + + 'tokenUuid': json['token_uuid'], + 'deviceGroup': json['device_group'] == null ? undefined : json['device_group'], + 'deviceGroupObj': DeviceAccessGroupFromJSON(json['device_group_obj']), + 'connector': json['connector'], + 'name': json['name'], + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function EnrollmentTokenToJSON(json: any): EnrollmentToken { + return EnrollmentTokenToJSONTyped(json, false); +} + +export function EnrollmentTokenToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_group': value['deviceGroup'], + 'connector': value['connector'], + 'name': value['name'], + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/EnrollmentTokenRequest.ts b/packages/client-ts/src/models/EnrollmentTokenRequest.ts new file mode 100644 index 0000000000..66188cdf72 --- /dev/null +++ b/packages/client-ts/src/models/EnrollmentTokenRequest.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface EnrollmentTokenRequest + */ +export interface EnrollmentTokenRequest { + /** + * + * @type {string} + * @memberof EnrollmentTokenRequest + */ + deviceGroup?: string | null; + /** + * + * @type {string} + * @memberof EnrollmentTokenRequest + */ + connector: string; + /** + * + * @type {string} + * @memberof EnrollmentTokenRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof EnrollmentTokenRequest + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof EnrollmentTokenRequest + */ + expires?: Date | null; +} + +/** + * Check if a given object implements the EnrollmentTokenRequest interface. + */ +export function instanceOfEnrollmentTokenRequest(value: object): value is EnrollmentTokenRequest { + if (!('connector' in value) || value['connector'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function EnrollmentTokenRequestFromJSON(json: any): EnrollmentTokenRequest { + return EnrollmentTokenRequestFromJSONTyped(json, false); +} + +export function EnrollmentTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrollmentTokenRequest { + if (json == null) { + return json; + } + return { + + 'deviceGroup': json['device_group'] == null ? undefined : json['device_group'], + 'connector': json['connector'], + 'name': json['name'], + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function EnrollmentTokenRequestToJSON(json: any): EnrollmentTokenRequest { + return EnrollmentTokenRequestToJSONTyped(json, false); +} + +export function EnrollmentTokenRequestToJSONTyped(value?: EnrollmentTokenRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_group': value['deviceGroup'], + 'connector': value['connector'], + 'name': value['name'], + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/ErrorDetail.ts b/packages/client-ts/src/models/ErrorDetail.ts new file mode 100644 index 0000000000..964ad86695 --- /dev/null +++ b/packages/client-ts/src/models/ErrorDetail.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for rest_framework's error messages + * @export + * @interface ErrorDetail + */ +export interface ErrorDetail { + /** + * + * @type {string} + * @memberof ErrorDetail + */ + string: string; + /** + * + * @type {string} + * @memberof ErrorDetail + */ + code: string; +} + +/** + * Check if a given object implements the ErrorDetail interface. + */ +export function instanceOfErrorDetail(value: object): value is ErrorDetail { + if (!('string' in value) || value['string'] === undefined) return false; + if (!('code' in value) || value['code'] === undefined) return false; + return true; +} + +export function ErrorDetailFromJSON(json: any): ErrorDetail { + return ErrorDetailFromJSONTyped(json, false); +} + +export function ErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorDetail { + if (json == null) { + return json; + } + return { + + 'string': json['string'], + 'code': json['code'], + }; +} + +export function ErrorDetailToJSON(json: any): ErrorDetail { + return ErrorDetailToJSONTyped(json, false); +} + +export function ErrorDetailToJSONTyped(value?: ErrorDetail | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'string': value['string'], + 'code': value['code'], + }; +} + diff --git a/packages/client-ts/src/models/ErrorReportingConfig.ts b/packages/client-ts/src/models/ErrorReportingConfig.ts new file mode 100644 index 0000000000..f64193f1c7 --- /dev/null +++ b/packages/client-ts/src/models/ErrorReportingConfig.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Config for error reporting + * @export + * @interface ErrorReportingConfig + */ +export interface ErrorReportingConfig { + /** + * + * @type {boolean} + * @memberof ErrorReportingConfig + */ + readonly enabled: boolean; + /** + * + * @type {string} + * @memberof ErrorReportingConfig + */ + readonly sentryDsn: string; + /** + * + * @type {string} + * @memberof ErrorReportingConfig + */ + readonly environment: string; + /** + * + * @type {boolean} + * @memberof ErrorReportingConfig + */ + readonly sendPii: boolean; + /** + * + * @type {number} + * @memberof ErrorReportingConfig + */ + readonly tracesSampleRate: number; +} + +/** + * Check if a given object implements the ErrorReportingConfig interface. + */ +export function instanceOfErrorReportingConfig(value: object): value is ErrorReportingConfig { + if (!('enabled' in value) || value['enabled'] === undefined) return false; + if (!('sentryDsn' in value) || value['sentryDsn'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + if (!('sendPii' in value) || value['sendPii'] === undefined) return false; + if (!('tracesSampleRate' in value) || value['tracesSampleRate'] === undefined) return false; + return true; +} + +export function ErrorReportingConfigFromJSON(json: any): ErrorReportingConfig { + return ErrorReportingConfigFromJSONTyped(json, false); +} + +export function ErrorReportingConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorReportingConfig { + if (json == null) { + return json; + } + return { + + 'enabled': json['enabled'], + 'sentryDsn': json['sentry_dsn'], + 'environment': json['environment'], + 'sendPii': json['send_pii'], + 'tracesSampleRate': json['traces_sample_rate'], + }; +} + +export function ErrorReportingConfigToJSON(json: any): ErrorReportingConfig { + return ErrorReportingConfigToJSONTyped(json, false); +} + +export function ErrorReportingConfigToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/Event.ts b/packages/client-ts/src/models/Event.ts new file mode 100644 index 0000000000..c562cfb1d8 --- /dev/null +++ b/packages/client-ts/src/models/Event.ts @@ -0,0 +1,141 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Event Serializer + * @export + * @interface Event + */ +export interface Event { + /** + * + * @type {string} + * @memberof Event + */ + readonly pk: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Event + */ + user?: { [key: string]: any; }; + /** + * + * @type {EventActions} + * @memberof Event + */ + action: EventActions; + /** + * + * @type {string} + * @memberof Event + */ + app: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Event + */ + context?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof Event + */ + clientIp?: string | null; + /** + * + * @type {Date} + * @memberof Event + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof Event + */ + expires?: Date; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Event + */ + brand?: { [key: string]: any; }; +} + + + +/** + * Check if a given object implements the Event interface. + */ +export function instanceOfEvent(value: object): value is Event { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('action' in value) || value['action'] === undefined) return false; + if (!('app' in value) || value['app'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + return true; +} + +export function EventFromJSON(json: any): Event { + return EventFromJSONTyped(json, false); +} + +export function EventFromJSONTyped(json: any, ignoreDiscriminator: boolean): Event { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'] == null ? undefined : json['user'], + 'action': EventActionsFromJSON(json['action']), + 'app': json['app'], + 'context': json['context'] == null ? undefined : json['context'], + 'clientIp': json['client_ip'] == null ? undefined : json['client_ip'], + 'created': (new Date(json['created'])), + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'brand': json['brand'] == null ? undefined : json['brand'], + }; +} + +export function EventToJSON(json: any): Event { + return EventToJSONTyped(json, false); +} + +export function EventToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'action': EventActionsToJSON(value['action']), + 'app': value['app'], + 'context': value['context'], + 'client_ip': value['clientIp'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'brand': value['brand'], + }; +} + diff --git a/packages/client-ts/src/models/EventActions.ts b/packages/client-ts/src/models/EventActions.ts new file mode 100644 index 0000000000..6bd140c615 --- /dev/null +++ b/packages/client-ts/src/models/EventActions.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const EventActions = { + Login: 'login', + LoginFailed: 'login_failed', + Logout: 'logout', + UserWrite: 'user_write', + SuspiciousRequest: 'suspicious_request', + PasswordSet: 'password_set', + SecretView: 'secret_view', + SecretRotate: 'secret_rotate', + InvitationUsed: 'invitation_used', + AuthorizeApplication: 'authorize_application', + SourceLinked: 'source_linked', + ImpersonationStarted: 'impersonation_started', + ImpersonationEnded: 'impersonation_ended', + FlowExecution: 'flow_execution', + PolicyExecution: 'policy_execution', + PolicyException: 'policy_exception', + PropertyMappingException: 'property_mapping_exception', + SystemTaskExecution: 'system_task_execution', + SystemTaskException: 'system_task_exception', + SystemException: 'system_exception', + ConfigurationError: 'configuration_error', + ConfigurationWarning: 'configuration_warning', + ModelCreated: 'model_created', + ModelUpdated: 'model_updated', + ModelDeleted: 'model_deleted', + EmailSent: 'email_sent', + UpdateAvailable: 'update_available', + ExportReady: 'export_ready', + ReviewInitiated: 'review_initiated', + ReviewOverdue: 'review_overdue', + ReviewAttested: 'review_attested', + ReviewCompleted: 'review_completed', + Custom: 'custom_', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventActions = typeof EventActions[keyof typeof EventActions]; + + +export function instanceOfEventActions(value: any): boolean { + for (const key in EventActions) { + if (Object.prototype.hasOwnProperty.call(EventActions, key)) { + if (EventActions[key as keyof typeof EventActions] === value) { + return true; + } + } + } + return false; +} + +export function EventActionsFromJSON(json: any): EventActions { + return EventActionsFromJSONTyped(json, false); +} + +export function EventActionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventActions { + return json as EventActions; +} + +export function EventActionsToJSON(value?: EventActions | null): any { + return value as any; +} + +export function EventActionsToJSONTyped(value: any, ignoreDiscriminator: boolean): EventActions { + return value as EventActions; +} + diff --git a/packages/client-ts/src/models/EventMatcherPolicy.ts b/packages/client-ts/src/models/EventMatcherPolicy.ts new file mode 100644 index 0000000000..626a2e32be --- /dev/null +++ b/packages/client-ts/src/models/EventMatcherPolicy.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ModelEnum } from './ModelEnum'; +import { + ModelEnumFromJSON, + ModelEnumFromJSONTyped, + ModelEnumToJSON, + ModelEnumToJSONTyped, +} from './ModelEnum'; +import type { AppEnum } from './AppEnum'; +import { + AppEnumFromJSON, + AppEnumFromJSONTyped, + AppEnumToJSON, + AppEnumToJSONTyped, +} from './AppEnum'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Event Matcher Policy Serializer + * @export + * @interface EventMatcherPolicy + */ +export interface EventMatcherPolicy { + /** + * + * @type {string} + * @memberof EventMatcherPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof EventMatcherPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof EventMatcherPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof EventMatcherPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof EventMatcherPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof EventMatcherPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof EventMatcherPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof EventMatcherPolicy + */ + readonly boundTo: number; + /** + * Match created events with this action type. When left empty, all action types will be matched. + * @type {EventActions} + * @memberof EventMatcherPolicy + */ + action?: EventActions | null; + /** + * Matches Event's Client IP (strict matching, for network matching use an Expression Policy) + * @type {string} + * @memberof EventMatcherPolicy + */ + clientIp?: string | null; + /** + * Match events created by selected application. When left empty, all applications are matched. + * @type {AppEnum} + * @memberof EventMatcherPolicy + */ + app?: AppEnum | null; + /** + * 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. + * @type {ModelEnum} + * @memberof EventMatcherPolicy + */ + model?: ModelEnum | null; +} + + + +/** + * Check if a given object implements the EventMatcherPolicy interface. + */ +export function instanceOfEventMatcherPolicy(value: object): value is EventMatcherPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + return true; +} + +export function EventMatcherPolicyFromJSON(json: any): EventMatcherPolicy { + return EventMatcherPolicyFromJSONTyped(json, false); +} + +export function EventMatcherPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMatcherPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'action': json['action'] == null ? undefined : EventActionsFromJSON(json['action']), + 'clientIp': json['client_ip'] == null ? undefined : json['client_ip'], + 'app': json['app'] == null ? undefined : AppEnumFromJSON(json['app']), + 'model': json['model'] == null ? undefined : ModelEnumFromJSON(json['model']), + }; +} + +export function EventMatcherPolicyToJSON(json: any): EventMatcherPolicy { + return EventMatcherPolicyToJSONTyped(json, false); +} + +export function EventMatcherPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'action': EventActionsToJSON(value['action']), + 'client_ip': value['clientIp'], + 'app': AppEnumToJSON(value['app']), + 'model': ModelEnumToJSON(value['model']), + }; +} + diff --git a/packages/client-ts/src/models/EventMatcherPolicyRequest.ts b/packages/client-ts/src/models/EventMatcherPolicyRequest.ts new file mode 100644 index 0000000000..2a9a71342e --- /dev/null +++ b/packages/client-ts/src/models/EventMatcherPolicyRequest.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ModelEnum } from './ModelEnum'; +import { + ModelEnumFromJSON, + ModelEnumFromJSONTyped, + ModelEnumToJSON, + ModelEnumToJSONTyped, +} from './ModelEnum'; +import type { AppEnum } from './AppEnum'; +import { + AppEnumFromJSON, + AppEnumFromJSONTyped, + AppEnumToJSON, + AppEnumToJSONTyped, +} from './AppEnum'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Event Matcher Policy Serializer + * @export + * @interface EventMatcherPolicyRequest + */ +export interface EventMatcherPolicyRequest { + /** + * + * @type {string} + * @memberof EventMatcherPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof EventMatcherPolicyRequest + */ + executionLogging?: boolean; + /** + * Match created events with this action type. When left empty, all action types will be matched. + * @type {EventActions} + * @memberof EventMatcherPolicyRequest + */ + action?: EventActions | null; + /** + * Matches Event's Client IP (strict matching, for network matching use an Expression Policy) + * @type {string} + * @memberof EventMatcherPolicyRequest + */ + clientIp?: string | null; + /** + * Match events created by selected application. When left empty, all applications are matched. + * @type {AppEnum} + * @memberof EventMatcherPolicyRequest + */ + app?: AppEnum | null; + /** + * 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. + * @type {ModelEnum} + * @memberof EventMatcherPolicyRequest + */ + model?: ModelEnum | null; +} + + + +/** + * Check if a given object implements the EventMatcherPolicyRequest interface. + */ +export function instanceOfEventMatcherPolicyRequest(value: object): value is EventMatcherPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function EventMatcherPolicyRequestFromJSON(json: any): EventMatcherPolicyRequest { + return EventMatcherPolicyRequestFromJSONTyped(json, false); +} + +export function EventMatcherPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMatcherPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'action': json['action'] == null ? undefined : EventActionsFromJSON(json['action']), + 'clientIp': json['client_ip'] == null ? undefined : json['client_ip'], + 'app': json['app'] == null ? undefined : AppEnumFromJSON(json['app']), + 'model': json['model'] == null ? undefined : ModelEnumFromJSON(json['model']), + }; +} + +export function EventMatcherPolicyRequestToJSON(json: any): EventMatcherPolicyRequest { + return EventMatcherPolicyRequestToJSONTyped(json, false); +} + +export function EventMatcherPolicyRequestToJSONTyped(value?: EventMatcherPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'action': EventActionsToJSON(value['action']), + 'client_ip': value['clientIp'], + 'app': AppEnumToJSON(value['app']), + 'model': ModelEnumToJSON(value['model']), + }; +} + diff --git a/packages/client-ts/src/models/EventRequest.ts b/packages/client-ts/src/models/EventRequest.ts new file mode 100644 index 0000000000..363ad4414d --- /dev/null +++ b/packages/client-ts/src/models/EventRequest.ts @@ -0,0 +1,125 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Event Serializer + * @export + * @interface EventRequest + */ +export interface EventRequest { + /** + * + * @type {{ [key: string]: any; }} + * @memberof EventRequest + */ + user?: { [key: string]: any; }; + /** + * + * @type {EventActions} + * @memberof EventRequest + */ + action: EventActions; + /** + * + * @type {string} + * @memberof EventRequest + */ + app: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof EventRequest + */ + context?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof EventRequest + */ + clientIp?: string | null; + /** + * + * @type {Date} + * @memberof EventRequest + */ + expires?: Date; + /** + * + * @type {{ [key: string]: any; }} + * @memberof EventRequest + */ + brand?: { [key: string]: any; }; +} + + + +/** + * Check if a given object implements the EventRequest interface. + */ +export function instanceOfEventRequest(value: object): value is EventRequest { + if (!('action' in value) || value['action'] === undefined) return false; + if (!('app' in value) || value['app'] === undefined) return false; + return true; +} + +export function EventRequestFromJSON(json: any): EventRequest { + return EventRequestFromJSONTyped(json, false); +} + +export function EventRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'action': EventActionsFromJSON(json['action']), + 'app': json['app'], + 'context': json['context'] == null ? undefined : json['context'], + 'clientIp': json['client_ip'] == null ? undefined : json['client_ip'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'brand': json['brand'] == null ? undefined : json['brand'], + }; +} + +export function EventRequestToJSON(json: any): EventRequest { + return EventRequestToJSONTyped(json, false); +} + +export function EventRequestToJSONTyped(value?: EventRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'action': EventActionsToJSON(value['action']), + 'app': value['app'], + 'context': value['context'], + 'client_ip': value['clientIp'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'brand': value['brand'], + }; +} + diff --git a/packages/client-ts/src/models/EventTopPerUser.ts b/packages/client-ts/src/models/EventTopPerUser.ts new file mode 100644 index 0000000000..c507e4e0a8 --- /dev/null +++ b/packages/client-ts/src/models/EventTopPerUser.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response object of Event's top_per_user + * @export + * @interface EventTopPerUser + */ +export interface EventTopPerUser { + /** + * + * @type {{ [key: string]: any; }} + * @memberof EventTopPerUser + */ + application: { [key: string]: any; }; + /** + * + * @type {number} + * @memberof EventTopPerUser + */ + countedEvents: number; + /** + * + * @type {number} + * @memberof EventTopPerUser + */ + uniqueUsers: number; +} + +/** + * Check if a given object implements the EventTopPerUser interface. + */ +export function instanceOfEventTopPerUser(value: object): value is EventTopPerUser { + if (!('application' in value) || value['application'] === undefined) return false; + if (!('countedEvents' in value) || value['countedEvents'] === undefined) return false; + if (!('uniqueUsers' in value) || value['uniqueUsers'] === undefined) return false; + return true; +} + +export function EventTopPerUserFromJSON(json: any): EventTopPerUser { + return EventTopPerUserFromJSONTyped(json, false); +} + +export function EventTopPerUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventTopPerUser { + if (json == null) { + return json; + } + return { + + 'application': json['application'], + 'countedEvents': json['counted_events'], + 'uniqueUsers': json['unique_users'], + }; +} + +export function EventTopPerUserToJSON(json: any): EventTopPerUser { + return EventTopPerUserToJSONTyped(json, false); +} + +export function EventTopPerUserToJSONTyped(value?: EventTopPerUser | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'application': value['application'], + 'counted_events': value['countedEvents'], + 'unique_users': value['uniqueUsers'], + }; +} + diff --git a/packages/client-ts/src/models/EventVolume.ts b/packages/client-ts/src/models/EventVolume.ts new file mode 100644 index 0000000000..3dc1257721 --- /dev/null +++ b/packages/client-ts/src/models/EventVolume.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Count of events of action created on day + * @export + * @interface EventVolume + */ +export interface EventVolume { + /** + * + * @type {EventActions} + * @memberof EventVolume + */ + action: EventActions; + /** + * + * @type {Date} + * @memberof EventVolume + */ + time: Date; + /** + * + * @type {number} + * @memberof EventVolume + */ + count: number; +} + + + +/** + * Check if a given object implements the EventVolume interface. + */ +export function instanceOfEventVolume(value: object): value is EventVolume { + if (!('action' in value) || value['action'] === undefined) return false; + if (!('time' in value) || value['time'] === undefined) return false; + if (!('count' in value) || value['count'] === undefined) return false; + return true; +} + +export function EventVolumeFromJSON(json: any): EventVolume { + return EventVolumeFromJSONTyped(json, false); +} + +export function EventVolumeFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventVolume { + if (json == null) { + return json; + } + return { + + 'action': EventActionsFromJSON(json['action']), + 'time': (new Date(json['time'])), + 'count': json['count'], + }; +} + +export function EventVolumeToJSON(json: any): EventVolume { + return EventVolumeToJSONTyped(json, false); +} + +export function EventVolumeToJSONTyped(value?: EventVolume | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'action': EventActionsToJSON(value['action']), + 'time': value['time'].toISOString(), + 'count': value['count'], + }; +} + diff --git a/packages/client-ts/src/models/EventsRequestedEnum.ts b/packages/client-ts/src/models/EventsRequestedEnum.ts new file mode 100644 index 0000000000..453a8541b4 --- /dev/null +++ b/packages/client-ts/src/models/EventsRequestedEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const EventsRequestedEnum = { + HttpsSchemasOpenidNetSeceventCaepEventTypeSessionRevoked: 'https://schemas.openid.net/secevent/caep/event-type/session-revoked', + HttpsSchemasOpenidNetSeceventCaepEventTypeCredentialChange: 'https://schemas.openid.net/secevent/caep/event-type/credential-change', + HttpsSchemasOpenidNetSeceventSsfEventTypeVerification: 'https://schemas.openid.net/secevent/ssf/event-type/verification', + UnknownDefaultOpenApi: '11184809' +} as const; +export type EventsRequestedEnum = typeof EventsRequestedEnum[keyof typeof EventsRequestedEnum]; + + +export function instanceOfEventsRequestedEnum(value: any): boolean { + for (const key in EventsRequestedEnum) { + if (Object.prototype.hasOwnProperty.call(EventsRequestedEnum, key)) { + if (EventsRequestedEnum[key as keyof typeof EventsRequestedEnum] === value) { + return true; + } + } + } + return false; +} + +export function EventsRequestedEnumFromJSON(json: any): EventsRequestedEnum { + return EventsRequestedEnumFromJSONTyped(json, false); +} + +export function EventsRequestedEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventsRequestedEnum { + return json as EventsRequestedEnum; +} + +export function EventsRequestedEnumToJSON(value?: EventsRequestedEnum | null): any { + return value as any; +} + +export function EventsRequestedEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): EventsRequestedEnum { + return value as EventsRequestedEnum; +} + diff --git a/packages/client-ts/src/models/ExpiringBaseGrantModel.ts b/packages/client-ts/src/models/ExpiringBaseGrantModel.ts new file mode 100644 index 0000000000..3086f837a9 --- /dev/null +++ b/packages/client-ts/src/models/ExpiringBaseGrantModel.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, + UserToJSONTyped, +} from './User'; +import type { OAuth2Provider } from './OAuth2Provider'; +import { + OAuth2ProviderFromJSON, + OAuth2ProviderFromJSONTyped, + OAuth2ProviderToJSON, + OAuth2ProviderToJSONTyped, +} from './OAuth2Provider'; + +/** + * Serializer for BaseGrantModel and ExpiringBaseGrant + * @export + * @interface ExpiringBaseGrantModel + */ +export interface ExpiringBaseGrantModel { + /** + * + * @type {number} + * @memberof ExpiringBaseGrantModel + */ + readonly pk: number; + /** + * + * @type {OAuth2Provider} + * @memberof ExpiringBaseGrantModel + */ + provider: OAuth2Provider; + /** + * + * @type {User} + * @memberof ExpiringBaseGrantModel + */ + user: User; + /** + * Check if token is expired yet. + * @type {boolean} + * @memberof ExpiringBaseGrantModel + */ + readonly isExpired: boolean; + /** + * + * @type {Date} + * @memberof ExpiringBaseGrantModel + */ + expires?: Date | null; + /** + * + * @type {Array} + * @memberof ExpiringBaseGrantModel + */ + scope: Array; +} + +/** + * Check if a given object implements the ExpiringBaseGrantModel interface. + */ +export function instanceOfExpiringBaseGrantModel(value: object): value is ExpiringBaseGrantModel { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('isExpired' in value) || value['isExpired'] === undefined) return false; + if (!('scope' in value) || value['scope'] === undefined) return false; + return true; +} + +export function ExpiringBaseGrantModelFromJSON(json: any): ExpiringBaseGrantModel { + return ExpiringBaseGrantModelFromJSONTyped(json, false); +} + +export function ExpiringBaseGrantModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpiringBaseGrantModel { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'provider': OAuth2ProviderFromJSON(json['provider']), + 'user': UserFromJSON(json['user']), + 'isExpired': json['is_expired'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'scope': json['scope'], + }; +} + +export function ExpiringBaseGrantModelToJSON(json: any): ExpiringBaseGrantModel { + return ExpiringBaseGrantModelToJSONTyped(json, false); +} + +export function ExpiringBaseGrantModelToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'provider': OAuth2ProviderToJSON(value['provider']), + 'user': UserToJSON(value['user']), + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'scope': value['scope'], + }; +} + diff --git a/packages/client-ts/src/models/ExpressionPolicy.ts b/packages/client-ts/src/models/ExpressionPolicy.ts new file mode 100644 index 0000000000..091fdf3388 --- /dev/null +++ b/packages/client-ts/src/models/ExpressionPolicy.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Membership Policy Serializer + * @export + * @interface ExpressionPolicy + */ +export interface ExpressionPolicy { + /** + * + * @type {string} + * @memberof ExpressionPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof ExpressionPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof ExpressionPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof ExpressionPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof ExpressionPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof ExpressionPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof ExpressionPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof ExpressionPolicy + */ + readonly boundTo: number; + /** + * + * @type {string} + * @memberof ExpressionPolicy + */ + expression: string; +} + +/** + * Check if a given object implements the ExpressionPolicy interface. + */ +export function instanceOfExpressionPolicy(value: object): value is ExpressionPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function ExpressionPolicyFromJSON(json: any): ExpressionPolicy { + return ExpressionPolicyFromJSONTyped(json, false); +} + +export function ExpressionPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpressionPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'expression': json['expression'], + }; +} + +export function ExpressionPolicyToJSON(json: any): ExpressionPolicy { + return ExpressionPolicyToJSONTyped(json, false); +} + +export function ExpressionPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/ExpressionPolicyRequest.ts b/packages/client-ts/src/models/ExpressionPolicyRequest.ts new file mode 100644 index 0000000000..95a1c5ff66 --- /dev/null +++ b/packages/client-ts/src/models/ExpressionPolicyRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Membership Policy Serializer + * @export + * @interface ExpressionPolicyRequest + */ +export interface ExpressionPolicyRequest { + /** + * + * @type {string} + * @memberof ExpressionPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof ExpressionPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {string} + * @memberof ExpressionPolicyRequest + */ + expression: string; +} + +/** + * Check if a given object implements the ExpressionPolicyRequest interface. + */ +export function instanceOfExpressionPolicyRequest(value: object): value is ExpressionPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function ExpressionPolicyRequestFromJSON(json: any): ExpressionPolicyRequest { + return ExpressionPolicyRequestFromJSONTyped(json, false); +} + +export function ExpressionPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpressionPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'expression': json['expression'], + }; +} + +export function ExpressionPolicyRequestToJSON(json: any): ExpressionPolicyRequest { + return ExpressionPolicyRequestToJSONTyped(json, false); +} + +export function ExpressionPolicyRequestToJSONTyped(value?: ExpressionPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/ExtraRoleObjectPermission.ts b/packages/client-ts/src/models/ExtraRoleObjectPermission.ts new file mode 100644 index 0000000000..1242d3f4ea --- /dev/null +++ b/packages/client-ts/src/models/ExtraRoleObjectPermission.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Role permission with additional object-related data + * @export + * @interface ExtraRoleObjectPermission + */ +export interface ExtraRoleObjectPermission { + /** + * + * @type {number} + * @memberof ExtraRoleObjectPermission + */ + readonly id: number; + /** + * + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly codename: string; + /** + * + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly model: string; + /** + * + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly appLabel: string; + /** + * + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + objectPk: string; + /** + * + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly name: string; + /** + * Get app label from permission's model + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly appLabelVerbose: string; + /** + * Get model label from permission's model + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly modelVerbose: string; + /** + * Get model description from attached model. This operation takes at least + * one additional query, and the description is only shown if the role has the + * view_ permission on the object + * @type {string} + * @memberof ExtraRoleObjectPermission + */ + readonly objectDescription: string | null; +} + +/** + * Check if a given object implements the ExtraRoleObjectPermission interface. + */ +export function instanceOfExtraRoleObjectPermission(value: object): value is ExtraRoleObjectPermission { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('codename' in value) || value['codename'] === undefined) return false; + if (!('model' in value) || value['model'] === undefined) return false; + if (!('appLabel' in value) || value['appLabel'] === undefined) return false; + if (!('objectPk' in value) || value['objectPk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('appLabelVerbose' in value) || value['appLabelVerbose'] === undefined) return false; + if (!('modelVerbose' in value) || value['modelVerbose'] === undefined) return false; + if (!('objectDescription' in value) || value['objectDescription'] === undefined) return false; + return true; +} + +export function ExtraRoleObjectPermissionFromJSON(json: any): ExtraRoleObjectPermission { + return ExtraRoleObjectPermissionFromJSONTyped(json, false); +} + +export function ExtraRoleObjectPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtraRoleObjectPermission { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'codename': json['codename'], + 'model': json['model'], + 'appLabel': json['app_label'], + 'objectPk': json['object_pk'], + 'name': json['name'], + 'appLabelVerbose': json['app_label_verbose'], + 'modelVerbose': json['model_verbose'], + 'objectDescription': json['object_description'], + }; +} + +export function ExtraRoleObjectPermissionToJSON(json: any): ExtraRoleObjectPermission { + return ExtraRoleObjectPermissionToJSONTyped(json, false); +} + +export function ExtraRoleObjectPermissionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'object_pk': value['objectPk'], + }; +} + diff --git a/packages/client-ts/src/models/FileList.ts b/packages/client-ts/src/models/FileList.ts new file mode 100644 index 0000000000..12793b7308 --- /dev/null +++ b/packages/client-ts/src/models/FileList.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; + +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface FileList + */ +export interface FileList { + /** + * + * @type {string} + * @memberof FileList + */ + name: string; + /** + * + * @type {string} + * @memberof FileList + */ + mimeType: string; + /** + * + * @type {string} + * @memberof FileList + */ + url: string; + /** + * + * @type {ThemedUrls} + * @memberof FileList + */ + themedUrls?: ThemedUrls | null; +} + +/** + * Check if a given object implements the FileList interface. + */ +export function instanceOfFileList(value: object): value is FileList { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('mimeType' in value) || value['mimeType'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function FileListFromJSON(json: any): FileList { + return FileListFromJSONTyped(json, false); +} + +export function FileListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileList { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'mimeType': json['mime_type'], + 'url': json['url'], + 'themedUrls': json['themed_urls'] == null ? undefined : ThemedUrlsFromJSON(json['themed_urls']), + }; +} + +export function FileListToJSON(json: any): FileList { + return FileListToJSONTyped(json, false); +} + +export function FileListToJSONTyped(value?: FileList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mime_type': value['mimeType'], + 'url': value['url'], + 'themed_urls': ThemedUrlsToJSON(value['themedUrls']), + }; +} + diff --git a/packages/client-ts/src/models/FleetConnector.ts b/packages/client-ts/src/models/FleetConnector.ts new file mode 100644 index 0000000000..5d71bd642d --- /dev/null +++ b/packages/client-ts/src/models/FleetConnector.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * FleetConnector Serializer + * @export + * @interface FleetConnector + */ +export interface FleetConnector { + /** + * + * @type {string} + * @memberof FleetConnector + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof FleetConnector + */ + name: string; + /** + * + * @type {boolean} + * @memberof FleetConnector + */ + enabled?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof FleetConnector + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof FleetConnector + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof FleetConnector + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof FleetConnector + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof FleetConnector + */ + url: string; + /** + * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs + * @type {string} + * @memberof FleetConnector + */ + headersMapping?: string | null; + /** + * + * @type {boolean} + * @memberof FleetConnector + */ + mapUsers?: boolean; + /** + * + * @type {boolean} + * @memberof FleetConnector + */ + mapTeamsAccessGroup?: boolean; +} + +/** + * Check if a given object implements the FleetConnector interface. + */ +export function instanceOfFleetConnector(value: object): value is FleetConnector { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function FleetConnectorFromJSON(json: any): FleetConnector { + return FleetConnectorFromJSONTyped(json, false); +} + +export function FleetConnectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): FleetConnector { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'url': json['url'], + 'headersMapping': json['headers_mapping'] == null ? undefined : json['headers_mapping'], + 'mapUsers': json['map_users'] == null ? undefined : json['map_users'], + 'mapTeamsAccessGroup': json['map_teams_access_group'] == null ? undefined : json['map_teams_access_group'], + }; +} + +export function FleetConnectorToJSON(json: any): FleetConnector { + return FleetConnectorToJSONTyped(json, false); +} + +export function FleetConnectorToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'url': value['url'], + 'headers_mapping': value['headersMapping'], + 'map_users': value['mapUsers'], + 'map_teams_access_group': value['mapTeamsAccessGroup'], + }; +} + diff --git a/packages/client-ts/src/models/FleetConnectorRequest.ts b/packages/client-ts/src/models/FleetConnectorRequest.ts new file mode 100644 index 0000000000..ab03dfdc78 --- /dev/null +++ b/packages/client-ts/src/models/FleetConnectorRequest.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * FleetConnector Serializer + * @export + * @interface FleetConnectorRequest + */ +export interface FleetConnectorRequest { + /** + * + * @type {string} + * @memberof FleetConnectorRequest + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof FleetConnectorRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof FleetConnectorRequest + */ + enabled?: boolean; + /** + * + * @type {string} + * @memberof FleetConnectorRequest + */ + url: string; + /** + * + * @type {string} + * @memberof FleetConnectorRequest + */ + token: string; + /** + * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs + * @type {string} + * @memberof FleetConnectorRequest + */ + headersMapping?: string | null; + /** + * + * @type {boolean} + * @memberof FleetConnectorRequest + */ + mapUsers?: boolean; + /** + * + * @type {boolean} + * @memberof FleetConnectorRequest + */ + mapTeamsAccessGroup?: boolean; +} + +/** + * Check if a given object implements the FleetConnectorRequest interface. + */ +export function instanceOfFleetConnectorRequest(value: object): value is FleetConnectorRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function FleetConnectorRequestFromJSON(json: any): FleetConnectorRequest { + return FleetConnectorRequestFromJSONTyped(json, false); +} + +export function FleetConnectorRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FleetConnectorRequest { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'url': json['url'], + 'token': json['token'], + 'headersMapping': json['headers_mapping'] == null ? undefined : json['headers_mapping'], + 'mapUsers': json['map_users'] == null ? undefined : json['map_users'], + 'mapTeamsAccessGroup': json['map_teams_access_group'] == null ? undefined : json['map_teams_access_group'], + }; +} + +export function FleetConnectorRequestToJSON(json: any): FleetConnectorRequest { + return FleetConnectorRequestToJSONTyped(json, false); +} + +export function FleetConnectorRequestToJSONTyped(value?: FleetConnectorRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'url': value['url'], + 'token': value['token'], + 'headers_mapping': value['headersMapping'], + 'map_users': value['mapUsers'], + 'map_teams_access_group': value['mapTeamsAccessGroup'], + }; +} + diff --git a/packages/client-ts/src/models/Flow.ts b/packages/client-ts/src/models/Flow.ts new file mode 100644 index 0000000000..5ab67c4e09 --- /dev/null +++ b/packages/client-ts/src/models/Flow.ts @@ -0,0 +1,250 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeniedActionEnum } from './DeniedActionEnum'; +import { + DeniedActionEnumFromJSON, + DeniedActionEnumFromJSONTyped, + DeniedActionEnumToJSON, + DeniedActionEnumToJSONTyped, +} from './DeniedActionEnum'; +import type { FlowLayoutEnum } from './FlowLayoutEnum'; +import { + FlowLayoutEnumFromJSON, + FlowLayoutEnumFromJSONTyped, + FlowLayoutEnumToJSON, + FlowLayoutEnumToJSONTyped, +} from './FlowLayoutEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { FlowDesignationEnum } from './FlowDesignationEnum'; +import { + FlowDesignationEnumFromJSON, + FlowDesignationEnumFromJSONTyped, + FlowDesignationEnumToJSON, + FlowDesignationEnumToJSONTyped, +} from './FlowDesignationEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { AuthenticationEnum } from './AuthenticationEnum'; +import { + AuthenticationEnumFromJSON, + AuthenticationEnumFromJSONTyped, + AuthenticationEnumToJSON, + AuthenticationEnumToJSONTyped, +} from './AuthenticationEnum'; + +/** + * Flow Serializer + * @export + * @interface Flow + */ +export interface Flow { + /** + * + * @type {string} + * @memberof Flow + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Flow + */ + readonly policybindingmodelPtrId: string; + /** + * + * @type {string} + * @memberof Flow + */ + name: string; + /** + * Visible in the URL. + * @type {string} + * @memberof Flow + */ + slug: string; + /** + * Shown as the Title in Flow pages. + * @type {string} + * @memberof Flow + */ + title: string; + /** + * Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + * @type {FlowDesignationEnum} + * @memberof Flow + */ + designation: FlowDesignationEnum; + /** + * Background shown during execution + * @type {string} + * @memberof Flow + */ + background?: string; + /** + * Get the URL to the background image + * @type {string} + * @memberof Flow + */ + readonly backgroundUrl: string; + /** + * + * @type {ThemedUrls} + * @memberof Flow + */ + readonly backgroundThemedUrls: ThemedUrls | null; + /** + * + * @type {Array} + * @memberof Flow + */ + readonly stages: Array; + /** + * + * @type {Array} + * @memberof Flow + */ + readonly policies: Array; + /** + * Get count of cached flows + * @type {number} + * @memberof Flow + */ + readonly cacheCount: number; + /** + * + * @type {PolicyEngineMode} + * @memberof Flow + */ + policyEngineMode?: PolicyEngineMode; + /** + * Enable compatibility mode, increases compatibility with password managers on mobile devices. + * @type {boolean} + * @memberof Flow + */ + compatibilityMode?: boolean; + /** + * Get export URL for flow + * @type {string} + * @memberof Flow + */ + readonly exportUrl: string; + /** + * + * @type {FlowLayoutEnum} + * @memberof Flow + */ + layout?: FlowLayoutEnum; + /** + * Configure what should happen when a flow denies access to a user. + * @type {DeniedActionEnum} + * @memberof Flow + */ + deniedAction?: DeniedActionEnum; + /** + * Required level of authentication and authorization to access a flow. + * @type {AuthenticationEnum} + * @memberof Flow + */ + authentication?: AuthenticationEnum; +} + + + +/** + * Check if a given object implements the Flow interface. + */ +export function instanceOfFlow(value: object): value is Flow { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('policybindingmodelPtrId' in value) || value['policybindingmodelPtrId'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('title' in value) || value['title'] === undefined) return false; + if (!('designation' in value) || value['designation'] === undefined) return false; + if (!('backgroundUrl' in value) || value['backgroundUrl'] === undefined) return false; + if (!('backgroundThemedUrls' in value) || value['backgroundThemedUrls'] === undefined) return false; + if (!('stages' in value) || value['stages'] === undefined) return false; + if (!('policies' in value) || value['policies'] === undefined) return false; + if (!('cacheCount' in value) || value['cacheCount'] === undefined) return false; + if (!('exportUrl' in value) || value['exportUrl'] === undefined) return false; + return true; +} + +export function FlowFromJSON(json: any): Flow { + return FlowFromJSONTyped(json, false); +} + +export function FlowFromJSONTyped(json: any, ignoreDiscriminator: boolean): Flow { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'policybindingmodelPtrId': json['policybindingmodel_ptr_id'], + 'name': json['name'], + 'slug': json['slug'], + 'title': json['title'], + 'designation': FlowDesignationEnumFromJSON(json['designation']), + 'background': json['background'] == null ? undefined : json['background'], + 'backgroundUrl': json['background_url'], + 'backgroundThemedUrls': ThemedUrlsFromJSON(json['background_themed_urls']), + 'stages': json['stages'], + 'policies': json['policies'], + 'cacheCount': json['cache_count'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : json['compatibility_mode'], + 'exportUrl': json['export_url'], + 'layout': json['layout'] == null ? undefined : FlowLayoutEnumFromJSON(json['layout']), + 'deniedAction': json['denied_action'] == null ? undefined : DeniedActionEnumFromJSON(json['denied_action']), + 'authentication': json['authentication'] == null ? undefined : AuthenticationEnumFromJSON(json['authentication']), + }; +} + +export function FlowToJSON(json: any): Flow { + return FlowToJSONTyped(json, false); +} + +export function FlowToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'title': value['title'], + 'designation': FlowDesignationEnumToJSON(value['designation']), + 'background': value['background'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'compatibility_mode': value['compatibilityMode'], + 'layout': FlowLayoutEnumToJSON(value['layout']), + 'denied_action': DeniedActionEnumToJSON(value['deniedAction']), + 'authentication': AuthenticationEnumToJSON(value['authentication']), + }; +} + diff --git a/packages/client-ts/src/models/FlowChallengeResponseRequest.ts b/packages/client-ts/src/models/FlowChallengeResponseRequest.ts new file mode 100644 index 0000000000..36223cd8e9 --- /dev/null +++ b/packages/client-ts/src/models/FlowChallengeResponseRequest.ts @@ -0,0 +1,336 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { AppleChallengeResponseRequest } from './AppleChallengeResponseRequest'; +import { + instanceOfAppleChallengeResponseRequest, + AppleChallengeResponseRequestFromJSON, + AppleChallengeResponseRequestFromJSONTyped, + AppleChallengeResponseRequestToJSON, +} from './AppleChallengeResponseRequest'; +import type { AuthenticatorDuoChallengeResponseRequest } from './AuthenticatorDuoChallengeResponseRequest'; +import { + instanceOfAuthenticatorDuoChallengeResponseRequest, + AuthenticatorDuoChallengeResponseRequestFromJSON, + AuthenticatorDuoChallengeResponseRequestFromJSONTyped, + AuthenticatorDuoChallengeResponseRequestToJSON, +} from './AuthenticatorDuoChallengeResponseRequest'; +import type { AuthenticatorEmailChallengeResponseRequest } from './AuthenticatorEmailChallengeResponseRequest'; +import { + instanceOfAuthenticatorEmailChallengeResponseRequest, + AuthenticatorEmailChallengeResponseRequestFromJSON, + AuthenticatorEmailChallengeResponseRequestFromJSONTyped, + AuthenticatorEmailChallengeResponseRequestToJSON, +} from './AuthenticatorEmailChallengeResponseRequest'; +import type { AuthenticatorSMSChallengeResponseRequest } from './AuthenticatorSMSChallengeResponseRequest'; +import { + instanceOfAuthenticatorSMSChallengeResponseRequest, + AuthenticatorSMSChallengeResponseRequestFromJSON, + AuthenticatorSMSChallengeResponseRequestFromJSONTyped, + AuthenticatorSMSChallengeResponseRequestToJSON, +} from './AuthenticatorSMSChallengeResponseRequest'; +import type { AuthenticatorStaticChallengeResponseRequest } from './AuthenticatorStaticChallengeResponseRequest'; +import { + instanceOfAuthenticatorStaticChallengeResponseRequest, + AuthenticatorStaticChallengeResponseRequestFromJSON, + AuthenticatorStaticChallengeResponseRequestFromJSONTyped, + AuthenticatorStaticChallengeResponseRequestToJSON, +} from './AuthenticatorStaticChallengeResponseRequest'; +import type { AuthenticatorTOTPChallengeResponseRequest } from './AuthenticatorTOTPChallengeResponseRequest'; +import { + instanceOfAuthenticatorTOTPChallengeResponseRequest, + AuthenticatorTOTPChallengeResponseRequestFromJSON, + AuthenticatorTOTPChallengeResponseRequestFromJSONTyped, + AuthenticatorTOTPChallengeResponseRequestToJSON, +} from './AuthenticatorTOTPChallengeResponseRequest'; +import type { AuthenticatorValidationChallengeResponseRequest } from './AuthenticatorValidationChallengeResponseRequest'; +import { + instanceOfAuthenticatorValidationChallengeResponseRequest, + AuthenticatorValidationChallengeResponseRequestFromJSON, + AuthenticatorValidationChallengeResponseRequestFromJSONTyped, + AuthenticatorValidationChallengeResponseRequestToJSON, +} from './AuthenticatorValidationChallengeResponseRequest'; +import type { AuthenticatorWebAuthnChallengeResponseRequest } from './AuthenticatorWebAuthnChallengeResponseRequest'; +import { + instanceOfAuthenticatorWebAuthnChallengeResponseRequest, + AuthenticatorWebAuthnChallengeResponseRequestFromJSON, + AuthenticatorWebAuthnChallengeResponseRequestFromJSONTyped, + AuthenticatorWebAuthnChallengeResponseRequestToJSON, +} from './AuthenticatorWebAuthnChallengeResponseRequest'; +import type { AutoSubmitChallengeResponseRequest } from './AutoSubmitChallengeResponseRequest'; +import { + instanceOfAutoSubmitChallengeResponseRequest, + AutoSubmitChallengeResponseRequestFromJSON, + AutoSubmitChallengeResponseRequestFromJSONTyped, + AutoSubmitChallengeResponseRequestToJSON, +} from './AutoSubmitChallengeResponseRequest'; +import type { CaptchaChallengeResponseRequest } from './CaptchaChallengeResponseRequest'; +import { + instanceOfCaptchaChallengeResponseRequest, + CaptchaChallengeResponseRequestFromJSON, + CaptchaChallengeResponseRequestFromJSONTyped, + CaptchaChallengeResponseRequestToJSON, +} from './CaptchaChallengeResponseRequest'; +import type { ConsentChallengeResponseRequest } from './ConsentChallengeResponseRequest'; +import { + instanceOfConsentChallengeResponseRequest, + ConsentChallengeResponseRequestFromJSON, + ConsentChallengeResponseRequestFromJSONTyped, + ConsentChallengeResponseRequestToJSON, +} from './ConsentChallengeResponseRequest'; +import type { DummyChallengeResponseRequest } from './DummyChallengeResponseRequest'; +import { + instanceOfDummyChallengeResponseRequest, + DummyChallengeResponseRequestFromJSON, + DummyChallengeResponseRequestFromJSONTyped, + DummyChallengeResponseRequestToJSON, +} from './DummyChallengeResponseRequest'; +import type { EmailChallengeResponseRequest } from './EmailChallengeResponseRequest'; +import { + instanceOfEmailChallengeResponseRequest, + EmailChallengeResponseRequestFromJSON, + EmailChallengeResponseRequestFromJSONTyped, + EmailChallengeResponseRequestToJSON, +} from './EmailChallengeResponseRequest'; +import type { EndpointAgentChallengeResponseRequest } from './EndpointAgentChallengeResponseRequest'; +import { + instanceOfEndpointAgentChallengeResponseRequest, + EndpointAgentChallengeResponseRequestFromJSON, + EndpointAgentChallengeResponseRequestFromJSONTyped, + EndpointAgentChallengeResponseRequestToJSON, +} from './EndpointAgentChallengeResponseRequest'; +import type { FrameChallengeResponseRequest } from './FrameChallengeResponseRequest'; +import { + instanceOfFrameChallengeResponseRequest, + FrameChallengeResponseRequestFromJSON, + FrameChallengeResponseRequestFromJSONTyped, + FrameChallengeResponseRequestToJSON, +} from './FrameChallengeResponseRequest'; +import type { IdentificationChallengeResponseRequest } from './IdentificationChallengeResponseRequest'; +import { + instanceOfIdentificationChallengeResponseRequest, + IdentificationChallengeResponseRequestFromJSON, + IdentificationChallengeResponseRequestFromJSONTyped, + IdentificationChallengeResponseRequestToJSON, +} from './IdentificationChallengeResponseRequest'; +import type { IframeLogoutChallengeResponseRequest } from './IframeLogoutChallengeResponseRequest'; +import { + instanceOfIframeLogoutChallengeResponseRequest, + IframeLogoutChallengeResponseRequestFromJSON, + IframeLogoutChallengeResponseRequestFromJSONTyped, + IframeLogoutChallengeResponseRequestToJSON, +} from './IframeLogoutChallengeResponseRequest'; +import type { NativeLogoutChallengeResponseRequest } from './NativeLogoutChallengeResponseRequest'; +import { + instanceOfNativeLogoutChallengeResponseRequest, + NativeLogoutChallengeResponseRequestFromJSON, + NativeLogoutChallengeResponseRequestFromJSONTyped, + NativeLogoutChallengeResponseRequestToJSON, +} from './NativeLogoutChallengeResponseRequest'; +import type { OAuthDeviceCodeChallengeResponseRequest } from './OAuthDeviceCodeChallengeResponseRequest'; +import { + instanceOfOAuthDeviceCodeChallengeResponseRequest, + OAuthDeviceCodeChallengeResponseRequestFromJSON, + OAuthDeviceCodeChallengeResponseRequestFromJSONTyped, + OAuthDeviceCodeChallengeResponseRequestToJSON, +} from './OAuthDeviceCodeChallengeResponseRequest'; +import type { OAuthDeviceCodeFinishChallengeResponseRequest } from './OAuthDeviceCodeFinishChallengeResponseRequest'; +import { + instanceOfOAuthDeviceCodeFinishChallengeResponseRequest, + OAuthDeviceCodeFinishChallengeResponseRequestFromJSON, + OAuthDeviceCodeFinishChallengeResponseRequestFromJSONTyped, + OAuthDeviceCodeFinishChallengeResponseRequestToJSON, +} from './OAuthDeviceCodeFinishChallengeResponseRequest'; +import type { PasswordChallengeResponseRequest } from './PasswordChallengeResponseRequest'; +import { + instanceOfPasswordChallengeResponseRequest, + PasswordChallengeResponseRequestFromJSON, + PasswordChallengeResponseRequestFromJSONTyped, + PasswordChallengeResponseRequestToJSON, +} from './PasswordChallengeResponseRequest'; +import type { PlexAuthenticationChallengeResponseRequest } from './PlexAuthenticationChallengeResponseRequest'; +import { + instanceOfPlexAuthenticationChallengeResponseRequest, + PlexAuthenticationChallengeResponseRequestFromJSON, + PlexAuthenticationChallengeResponseRequestFromJSONTyped, + PlexAuthenticationChallengeResponseRequestToJSON, +} from './PlexAuthenticationChallengeResponseRequest'; +import type { PromptChallengeResponseRequest } from './PromptChallengeResponseRequest'; +import { + instanceOfPromptChallengeResponseRequest, + PromptChallengeResponseRequestFromJSON, + PromptChallengeResponseRequestFromJSONTyped, + PromptChallengeResponseRequestToJSON, +} from './PromptChallengeResponseRequest'; +import type { RedirectChallengeResponseRequest } from './RedirectChallengeResponseRequest'; +import { + instanceOfRedirectChallengeResponseRequest, + RedirectChallengeResponseRequestFromJSON, + RedirectChallengeResponseRequestFromJSONTyped, + RedirectChallengeResponseRequestToJSON, +} from './RedirectChallengeResponseRequest'; +import type { TelegramChallengeResponseRequest } from './TelegramChallengeResponseRequest'; +import { + instanceOfTelegramChallengeResponseRequest, + TelegramChallengeResponseRequestFromJSON, + TelegramChallengeResponseRequestFromJSONTyped, + TelegramChallengeResponseRequestToJSON, +} from './TelegramChallengeResponseRequest'; +import type { UserLoginChallengeResponseRequest } from './UserLoginChallengeResponseRequest'; +import { + instanceOfUserLoginChallengeResponseRequest, + UserLoginChallengeResponseRequestFromJSON, + UserLoginChallengeResponseRequestFromJSONTyped, + UserLoginChallengeResponseRequestToJSON, +} from './UserLoginChallengeResponseRequest'; + +/** + * @type FlowChallengeResponseRequest + * + * @export + */ +export type FlowChallengeResponseRequest = { component: 'ak-provider-iframe-logout' } & IframeLogoutChallengeResponseRequest | { component: 'ak-provider-oauth2-device-code' } & OAuthDeviceCodeChallengeResponseRequest | { component: 'ak-provider-oauth2-device-code-finish' } & OAuthDeviceCodeFinishChallengeResponseRequest | { component: 'ak-provider-saml-native-logout' } & NativeLogoutChallengeResponseRequest | { component: 'ak-source-oauth-apple' } & AppleChallengeResponseRequest | { component: 'ak-source-plex' } & PlexAuthenticationChallengeResponseRequest | { component: 'ak-source-telegram' } & TelegramChallengeResponseRequest | { component: 'ak-stage-authenticator-duo' } & AuthenticatorDuoChallengeResponseRequest | { component: 'ak-stage-authenticator-email' } & AuthenticatorEmailChallengeResponseRequest | { component: 'ak-stage-authenticator-sms' } & AuthenticatorSMSChallengeResponseRequest | { component: 'ak-stage-authenticator-static' } & AuthenticatorStaticChallengeResponseRequest | { component: 'ak-stage-authenticator-totp' } & AuthenticatorTOTPChallengeResponseRequest | { component: 'ak-stage-authenticator-validate' } & AuthenticatorValidationChallengeResponseRequest | { component: 'ak-stage-authenticator-webauthn' } & AuthenticatorWebAuthnChallengeResponseRequest | { component: 'ak-stage-autosubmit' } & AutoSubmitChallengeResponseRequest | { component: 'ak-stage-captcha' } & CaptchaChallengeResponseRequest | { component: 'ak-stage-consent' } & ConsentChallengeResponseRequest | { component: 'ak-stage-dummy' } & DummyChallengeResponseRequest | { component: 'ak-stage-email' } & EmailChallengeResponseRequest | { component: 'ak-stage-endpoint-agent' } & EndpointAgentChallengeResponseRequest | { component: 'ak-stage-identification' } & IdentificationChallengeResponseRequest | { component: 'ak-stage-password' } & PasswordChallengeResponseRequest | { component: 'ak-stage-prompt' } & PromptChallengeResponseRequest | { component: 'ak-stage-user-login' } & UserLoginChallengeResponseRequest | { component: 'xak-flow-frame' } & FrameChallengeResponseRequest | { component: 'xak-flow-redirect' } & RedirectChallengeResponseRequest; + +export function FlowChallengeResponseRequestFromJSON(json: any): FlowChallengeResponseRequest { + return FlowChallengeResponseRequestFromJSONTyped(json, false); +} + +export function FlowChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowChallengeResponseRequest { + if (json == null) { + return json; + } + switch (json['component']) { + case 'ak-provider-iframe-logout': + return Object.assign({}, IframeLogoutChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-provider-iframe-logout' } as const); + case 'ak-provider-oauth2-device-code': + return Object.assign({}, OAuthDeviceCodeChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-provider-oauth2-device-code' } as const); + case 'ak-provider-oauth2-device-code-finish': + return Object.assign({}, OAuthDeviceCodeFinishChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-provider-oauth2-device-code-finish' } as const); + case 'ak-provider-saml-native-logout': + return Object.assign({}, NativeLogoutChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-provider-saml-native-logout' } as const); + case 'ak-source-oauth-apple': + return Object.assign({}, AppleChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-source-oauth-apple' } as const); + case 'ak-source-plex': + return Object.assign({}, PlexAuthenticationChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-source-plex' } as const); + case 'ak-source-telegram': + return Object.assign({}, TelegramChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-source-telegram' } as const); + case 'ak-stage-authenticator-duo': + return Object.assign({}, AuthenticatorDuoChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-duo' } as const); + case 'ak-stage-authenticator-email': + return Object.assign({}, AuthenticatorEmailChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-email' } as const); + case 'ak-stage-authenticator-sms': + return Object.assign({}, AuthenticatorSMSChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-sms' } as const); + case 'ak-stage-authenticator-static': + return Object.assign({}, AuthenticatorStaticChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-static' } as const); + case 'ak-stage-authenticator-totp': + return Object.assign({}, AuthenticatorTOTPChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-totp' } as const); + case 'ak-stage-authenticator-validate': + return Object.assign({}, AuthenticatorValidationChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-validate' } as const); + case 'ak-stage-authenticator-webauthn': + return Object.assign({}, AuthenticatorWebAuthnChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-authenticator-webauthn' } as const); + case 'ak-stage-autosubmit': + return Object.assign({}, AutoSubmitChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-autosubmit' } as const); + case 'ak-stage-captcha': + return Object.assign({}, CaptchaChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-captcha' } as const); + case 'ak-stage-consent': + return Object.assign({}, ConsentChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-consent' } as const); + case 'ak-stage-dummy': + return Object.assign({}, DummyChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-dummy' } as const); + case 'ak-stage-email': + return Object.assign({}, EmailChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-email' } as const); + case 'ak-stage-endpoint-agent': + return Object.assign({}, EndpointAgentChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-endpoint-agent' } as const); + case 'ak-stage-identification': + return Object.assign({}, IdentificationChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-identification' } as const); + case 'ak-stage-password': + return Object.assign({}, PasswordChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-password' } as const); + case 'ak-stage-prompt': + return Object.assign({}, PromptChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-prompt' } as const); + case 'ak-stage-user-login': + return Object.assign({}, UserLoginChallengeResponseRequestFromJSONTyped(json, true), { component: 'ak-stage-user-login' } as const); + case 'xak-flow-frame': + return Object.assign({}, FrameChallengeResponseRequestFromJSONTyped(json, true), { component: 'xak-flow-frame' } as const); + case 'xak-flow-redirect': + return Object.assign({}, RedirectChallengeResponseRequestFromJSONTyped(json, true), { component: 'xak-flow-redirect' } as const); + default: + return json; + } +} + +export function FlowChallengeResponseRequestToJSON(json: any): any { + return FlowChallengeResponseRequestToJSONTyped(json, false); +} + +export function FlowChallengeResponseRequestToJSONTyped(value?: FlowChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['component']) { + case 'ak-provider-iframe-logout': + return Object.assign({}, IframeLogoutChallengeResponseRequestToJSON(value), { component: 'ak-provider-iframe-logout' } as const); + case 'ak-provider-oauth2-device-code': + return Object.assign({}, OAuthDeviceCodeChallengeResponseRequestToJSON(value), { component: 'ak-provider-oauth2-device-code' } as const); + case 'ak-provider-oauth2-device-code-finish': + return Object.assign({}, OAuthDeviceCodeFinishChallengeResponseRequestToJSON(value), { component: 'ak-provider-oauth2-device-code-finish' } as const); + case 'ak-provider-saml-native-logout': + return Object.assign({}, NativeLogoutChallengeResponseRequestToJSON(value), { component: 'ak-provider-saml-native-logout' } as const); + case 'ak-source-oauth-apple': + return Object.assign({}, AppleChallengeResponseRequestToJSON(value), { component: 'ak-source-oauth-apple' } as const); + case 'ak-source-plex': + return Object.assign({}, PlexAuthenticationChallengeResponseRequestToJSON(value), { component: 'ak-source-plex' } as const); + case 'ak-source-telegram': + return Object.assign({}, TelegramChallengeResponseRequestToJSON(value), { component: 'ak-source-telegram' } as const); + case 'ak-stage-authenticator-duo': + return Object.assign({}, AuthenticatorDuoChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-duo' } as const); + case 'ak-stage-authenticator-email': + return Object.assign({}, AuthenticatorEmailChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-email' } as const); + case 'ak-stage-authenticator-sms': + return Object.assign({}, AuthenticatorSMSChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-sms' } as const); + case 'ak-stage-authenticator-static': + return Object.assign({}, AuthenticatorStaticChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-static' } as const); + case 'ak-stage-authenticator-totp': + return Object.assign({}, AuthenticatorTOTPChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-totp' } as const); + case 'ak-stage-authenticator-validate': + return Object.assign({}, AuthenticatorValidationChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-validate' } as const); + case 'ak-stage-authenticator-webauthn': + return Object.assign({}, AuthenticatorWebAuthnChallengeResponseRequestToJSON(value), { component: 'ak-stage-authenticator-webauthn' } as const); + case 'ak-stage-autosubmit': + return Object.assign({}, AutoSubmitChallengeResponseRequestToJSON(value), { component: 'ak-stage-autosubmit' } as const); + case 'ak-stage-captcha': + return Object.assign({}, CaptchaChallengeResponseRequestToJSON(value), { component: 'ak-stage-captcha' } as const); + case 'ak-stage-consent': + return Object.assign({}, ConsentChallengeResponseRequestToJSON(value), { component: 'ak-stage-consent' } as const); + case 'ak-stage-dummy': + return Object.assign({}, DummyChallengeResponseRequestToJSON(value), { component: 'ak-stage-dummy' } as const); + case 'ak-stage-email': + return Object.assign({}, EmailChallengeResponseRequestToJSON(value), { component: 'ak-stage-email' } as const); + case 'ak-stage-endpoint-agent': + return Object.assign({}, EndpointAgentChallengeResponseRequestToJSON(value), { component: 'ak-stage-endpoint-agent' } as const); + case 'ak-stage-identification': + return Object.assign({}, IdentificationChallengeResponseRequestToJSON(value), { component: 'ak-stage-identification' } as const); + case 'ak-stage-password': + return Object.assign({}, PasswordChallengeResponseRequestToJSON(value), { component: 'ak-stage-password' } as const); + case 'ak-stage-prompt': + return Object.assign({}, PromptChallengeResponseRequestToJSON(value), { component: 'ak-stage-prompt' } as const); + case 'ak-stage-user-login': + return Object.assign({}, UserLoginChallengeResponseRequestToJSON(value), { component: 'ak-stage-user-login' } as const); + case 'xak-flow-frame': + return Object.assign({}, FrameChallengeResponseRequestToJSON(value), { component: 'xak-flow-frame' } as const); + case 'xak-flow-redirect': + return Object.assign({}, RedirectChallengeResponseRequestToJSON(value), { component: 'xak-flow-redirect' } as const); + default: + return value; + } +} + diff --git a/packages/client-ts/src/models/FlowDesignationEnum.ts b/packages/client-ts/src/models/FlowDesignationEnum.ts new file mode 100644 index 0000000000..a6e0f5c4b9 --- /dev/null +++ b/packages/client-ts/src/models/FlowDesignationEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const FlowDesignationEnum = { + Authentication: 'authentication', + Authorization: 'authorization', + Invalidation: 'invalidation', + Enrollment: 'enrollment', + Unenrollment: 'unenrollment', + Recovery: 'recovery', + StageConfiguration: 'stage_configuration', + UnknownDefaultOpenApi: '11184809' +} as const; +export type FlowDesignationEnum = typeof FlowDesignationEnum[keyof typeof FlowDesignationEnum]; + + +export function instanceOfFlowDesignationEnum(value: any): boolean { + for (const key in FlowDesignationEnum) { + if (Object.prototype.hasOwnProperty.call(FlowDesignationEnum, key)) { + if (FlowDesignationEnum[key as keyof typeof FlowDesignationEnum] === value) { + return true; + } + } + } + return false; +} + +export function FlowDesignationEnumFromJSON(json: any): FlowDesignationEnum { + return FlowDesignationEnumFromJSONTyped(json, false); +} + +export function FlowDesignationEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowDesignationEnum { + return json as FlowDesignationEnum; +} + +export function FlowDesignationEnumToJSON(value?: FlowDesignationEnum | null): any { + return value as any; +} + +export function FlowDesignationEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): FlowDesignationEnum { + return value as FlowDesignationEnum; +} + diff --git a/packages/client-ts/src/models/FlowDiagram.ts b/packages/client-ts/src/models/FlowDiagram.ts new file mode 100644 index 0000000000..1ca13cd995 --- /dev/null +++ b/packages/client-ts/src/models/FlowDiagram.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * response of the flow's diagram action + * @export + * @interface FlowDiagram + */ +export interface FlowDiagram { + /** + * + * @type {string} + * @memberof FlowDiagram + */ + readonly diagram: string; +} + +/** + * Check if a given object implements the FlowDiagram interface. + */ +export function instanceOfFlowDiagram(value: object): value is FlowDiagram { + if (!('diagram' in value) || value['diagram'] === undefined) return false; + return true; +} + +export function FlowDiagramFromJSON(json: any): FlowDiagram { + return FlowDiagramFromJSONTyped(json, false); +} + +export function FlowDiagramFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowDiagram { + if (json == null) { + return json; + } + return { + + 'diagram': json['diagram'], + }; +} + +export function FlowDiagramToJSON(json: any): FlowDiagram { + return FlowDiagramToJSONTyped(json, false); +} + +export function FlowDiagramToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/FlowErrorChallenge.ts b/packages/client-ts/src/models/FlowErrorChallenge.ts new file mode 100644 index 0000000000..15af6a9bbd --- /dev/null +++ b/packages/client-ts/src/models/FlowErrorChallenge.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge class when an unhandled error occurs during a stage. Normal users + * are shown an error message, superusers are shown a full stacktrace. + * @export + * @interface FlowErrorChallenge + */ +export interface FlowErrorChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof FlowErrorChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof FlowErrorChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof FlowErrorChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof FlowErrorChallenge + */ + requestId: string; + /** + * + * @type {string} + * @memberof FlowErrorChallenge + */ + error?: string; + /** + * + * @type {string} + * @memberof FlowErrorChallenge + */ + traceback?: string; +} + +/** + * Check if a given object implements the FlowErrorChallenge interface. + */ +export function instanceOfFlowErrorChallenge(value: object): value is FlowErrorChallenge { + if (!('requestId' in value) || value['requestId'] === undefined) return false; + return true; +} + +export function FlowErrorChallengeFromJSON(json: any): FlowErrorChallenge { + return FlowErrorChallengeFromJSONTyped(json, false); +} + +export function FlowErrorChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowErrorChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'requestId': json['request_id'], + 'error': json['error'] == null ? undefined : json['error'], + 'traceback': json['traceback'] == null ? undefined : json['traceback'], + }; +} + +export function FlowErrorChallengeToJSON(json: any): FlowErrorChallenge { + return FlowErrorChallengeToJSONTyped(json, false); +} + +export function FlowErrorChallengeToJSONTyped(value?: FlowErrorChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'request_id': value['requestId'], + 'error': value['error'], + 'traceback': value['traceback'], + }; +} + diff --git a/packages/client-ts/src/models/FlowImportResult.ts b/packages/client-ts/src/models/FlowImportResult.ts new file mode 100644 index 0000000000..4b0136f33e --- /dev/null +++ b/packages/client-ts/src/models/FlowImportResult.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LogEvent } from './LogEvent'; +import { + LogEventFromJSON, + LogEventFromJSONTyped, + LogEventToJSON, + LogEventToJSONTyped, +} from './LogEvent'; + +/** + * Logs of an attempted flow import + * @export + * @interface FlowImportResult + */ +export interface FlowImportResult { + /** + * + * @type {Array} + * @memberof FlowImportResult + */ + readonly logs: Array; + /** + * + * @type {boolean} + * @memberof FlowImportResult + */ + readonly success: boolean; +} + +/** + * Check if a given object implements the FlowImportResult interface. + */ +export function instanceOfFlowImportResult(value: object): value is FlowImportResult { + if (!('logs' in value) || value['logs'] === undefined) return false; + if (!('success' in value) || value['success'] === undefined) return false; + return true; +} + +export function FlowImportResultFromJSON(json: any): FlowImportResult { + return FlowImportResultFromJSONTyped(json, false); +} + +export function FlowImportResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowImportResult { + if (json == null) { + return json; + } + return { + + 'logs': ((json['logs'] as Array).map(LogEventFromJSON)), + 'success': json['success'], + }; +} + +export function FlowImportResultToJSON(json: any): FlowImportResult { + return FlowImportResultToJSONTyped(json, false); +} + +export function FlowImportResultToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/FlowInspection.ts b/packages/client-ts/src/models/FlowInspection.ts new file mode 100644 index 0000000000..78aab9b1b5 --- /dev/null +++ b/packages/client-ts/src/models/FlowInspection.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowInspectorPlan } from './FlowInspectorPlan'; +import { + FlowInspectorPlanFromJSON, + FlowInspectorPlanFromJSONTyped, + FlowInspectorPlanToJSON, + FlowInspectorPlanToJSONTyped, +} from './FlowInspectorPlan'; + +/** + * Serializer for inspect endpoint + * @export + * @interface FlowInspection + */ +export interface FlowInspection { + /** + * + * @type {Array} + * @memberof FlowInspection + */ + plans: Array; + /** + * + * @type {FlowInspectorPlan} + * @memberof FlowInspection + */ + currentPlan?: FlowInspectorPlan; + /** + * + * @type {boolean} + * @memberof FlowInspection + */ + isCompleted: boolean; +} + +/** + * Check if a given object implements the FlowInspection interface. + */ +export function instanceOfFlowInspection(value: object): value is FlowInspection { + if (!('plans' in value) || value['plans'] === undefined) return false; + if (!('isCompleted' in value) || value['isCompleted'] === undefined) return false; + return true; +} + +export function FlowInspectionFromJSON(json: any): FlowInspection { + return FlowInspectionFromJSONTyped(json, false); +} + +export function FlowInspectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowInspection { + if (json == null) { + return json; + } + return { + + 'plans': ((json['plans'] as Array).map(FlowInspectorPlanFromJSON)), + 'currentPlan': json['current_plan'] == null ? undefined : FlowInspectorPlanFromJSON(json['current_plan']), + 'isCompleted': json['is_completed'], + }; +} + +export function FlowInspectionToJSON(json: any): FlowInspection { + return FlowInspectionToJSONTyped(json, false); +} + +export function FlowInspectionToJSONTyped(value?: FlowInspection | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'plans': ((value['plans'] as Array).map(FlowInspectorPlanToJSON)), + 'current_plan': FlowInspectorPlanToJSON(value['currentPlan']), + 'is_completed': value['isCompleted'], + }; +} + diff --git a/packages/client-ts/src/models/FlowInspectorPlan.ts b/packages/client-ts/src/models/FlowInspectorPlan.ts new file mode 100644 index 0000000000..50c02dabe1 --- /dev/null +++ b/packages/client-ts/src/models/FlowInspectorPlan.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowStageBinding } from './FlowStageBinding'; +import { + FlowStageBindingFromJSON, + FlowStageBindingFromJSONTyped, + FlowStageBindingToJSON, + FlowStageBindingToJSONTyped, +} from './FlowStageBinding'; + +/** + * Serializer for an active FlowPlan + * @export + * @interface FlowInspectorPlan + */ +export interface FlowInspectorPlan { + /** + * + * @type {FlowStageBinding} + * @memberof FlowInspectorPlan + */ + readonly currentStage: FlowStageBinding; + /** + * + * @type {FlowStageBinding} + * @memberof FlowInspectorPlan + */ + readonly nextPlannedStage: FlowStageBinding; + /** + * Get the plan's context, sanitized + * @type {{ [key: string]: any; }} + * @memberof FlowInspectorPlan + */ + readonly planContext: { [key: string]: any; }; + /** + * Get a unique session ID + * @type {string} + * @memberof FlowInspectorPlan + */ + readonly sessionId: string; +} + +/** + * Check if a given object implements the FlowInspectorPlan interface. + */ +export function instanceOfFlowInspectorPlan(value: object): value is FlowInspectorPlan { + if (!('currentStage' in value) || value['currentStage'] === undefined) return false; + if (!('nextPlannedStage' in value) || value['nextPlannedStage'] === undefined) return false; + if (!('planContext' in value) || value['planContext'] === undefined) return false; + if (!('sessionId' in value) || value['sessionId'] === undefined) return false; + return true; +} + +export function FlowInspectorPlanFromJSON(json: any): FlowInspectorPlan { + return FlowInspectorPlanFromJSONTyped(json, false); +} + +export function FlowInspectorPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowInspectorPlan { + if (json == null) { + return json; + } + return { + + 'currentStage': FlowStageBindingFromJSON(json['current_stage']), + 'nextPlannedStage': FlowStageBindingFromJSON(json['next_planned_stage']), + 'planContext': json['plan_context'], + 'sessionId': json['session_id'], + }; +} + +export function FlowInspectorPlanToJSON(json: any): FlowInspectorPlan { + return FlowInspectorPlanToJSONTyped(json, false); +} + +export function FlowInspectorPlanToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/FlowLayoutEnum.ts b/packages/client-ts/src/models/FlowLayoutEnum.ts new file mode 100644 index 0000000000..825e654233 --- /dev/null +++ b/packages/client-ts/src/models/FlowLayoutEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const FlowLayoutEnum = { + Stacked: 'stacked', + ContentLeft: 'content_left', + ContentRight: 'content_right', + SidebarLeft: 'sidebar_left', + SidebarRight: 'sidebar_right', + SidebarLeftFrameBackground: 'sidebar_left_frame_background', + SidebarRightFrameBackground: 'sidebar_right_frame_background', + UnknownDefaultOpenApi: '11184809' +} as const; +export type FlowLayoutEnum = typeof FlowLayoutEnum[keyof typeof FlowLayoutEnum]; + + +export function instanceOfFlowLayoutEnum(value: any): boolean { + for (const key in FlowLayoutEnum) { + if (Object.prototype.hasOwnProperty.call(FlowLayoutEnum, key)) { + if (FlowLayoutEnum[key as keyof typeof FlowLayoutEnum] === value) { + return true; + } + } + } + return false; +} + +export function FlowLayoutEnumFromJSON(json: any): FlowLayoutEnum { + return FlowLayoutEnumFromJSONTyped(json, false); +} + +export function FlowLayoutEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowLayoutEnum { + return json as FlowLayoutEnum; +} + +export function FlowLayoutEnumToJSON(value?: FlowLayoutEnum | null): any { + return value as any; +} + +export function FlowLayoutEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): FlowLayoutEnum { + return value as FlowLayoutEnum; +} + diff --git a/packages/client-ts/src/models/FlowRequest.ts b/packages/client-ts/src/models/FlowRequest.ts new file mode 100644 index 0000000000..f03f970ae2 --- /dev/null +++ b/packages/client-ts/src/models/FlowRequest.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeniedActionEnum } from './DeniedActionEnum'; +import { + DeniedActionEnumFromJSON, + DeniedActionEnumFromJSONTyped, + DeniedActionEnumToJSON, + DeniedActionEnumToJSONTyped, +} from './DeniedActionEnum'; +import type { FlowLayoutEnum } from './FlowLayoutEnum'; +import { + FlowLayoutEnumFromJSON, + FlowLayoutEnumFromJSONTyped, + FlowLayoutEnumToJSON, + FlowLayoutEnumToJSONTyped, +} from './FlowLayoutEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { FlowDesignationEnum } from './FlowDesignationEnum'; +import { + FlowDesignationEnumFromJSON, + FlowDesignationEnumFromJSONTyped, + FlowDesignationEnumToJSON, + FlowDesignationEnumToJSONTyped, +} from './FlowDesignationEnum'; +import type { AuthenticationEnum } from './AuthenticationEnum'; +import { + AuthenticationEnumFromJSON, + AuthenticationEnumFromJSONTyped, + AuthenticationEnumToJSON, + AuthenticationEnumToJSONTyped, +} from './AuthenticationEnum'; + +/** + * Flow Serializer + * @export + * @interface FlowRequest + */ +export interface FlowRequest { + /** + * + * @type {string} + * @memberof FlowRequest + */ + name: string; + /** + * Visible in the URL. + * @type {string} + * @memberof FlowRequest + */ + slug: string; + /** + * Shown as the Title in Flow pages. + * @type {string} + * @memberof FlowRequest + */ + title: string; + /** + * Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + * @type {FlowDesignationEnum} + * @memberof FlowRequest + */ + designation: FlowDesignationEnum; + /** + * Background shown during execution + * @type {string} + * @memberof FlowRequest + */ + background?: string; + /** + * + * @type {PolicyEngineMode} + * @memberof FlowRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * Enable compatibility mode, increases compatibility with password managers on mobile devices. + * @type {boolean} + * @memberof FlowRequest + */ + compatibilityMode?: boolean; + /** + * + * @type {FlowLayoutEnum} + * @memberof FlowRequest + */ + layout?: FlowLayoutEnum; + /** + * Configure what should happen when a flow denies access to a user. + * @type {DeniedActionEnum} + * @memberof FlowRequest + */ + deniedAction?: DeniedActionEnum; + /** + * Required level of authentication and authorization to access a flow. + * @type {AuthenticationEnum} + * @memberof FlowRequest + */ + authentication?: AuthenticationEnum; +} + + + +/** + * Check if a given object implements the FlowRequest interface. + */ +export function instanceOfFlowRequest(value: object): value is FlowRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('title' in value) || value['title'] === undefined) return false; + if (!('designation' in value) || value['designation'] === undefined) return false; + return true; +} + +export function FlowRequestFromJSON(json: any): FlowRequest { + return FlowRequestFromJSONTyped(json, false); +} + +export function FlowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'title': json['title'], + 'designation': FlowDesignationEnumFromJSON(json['designation']), + 'background': json['background'] == null ? undefined : json['background'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : json['compatibility_mode'], + 'layout': json['layout'] == null ? undefined : FlowLayoutEnumFromJSON(json['layout']), + 'deniedAction': json['denied_action'] == null ? undefined : DeniedActionEnumFromJSON(json['denied_action']), + 'authentication': json['authentication'] == null ? undefined : AuthenticationEnumFromJSON(json['authentication']), + }; +} + +export function FlowRequestToJSON(json: any): FlowRequest { + return FlowRequestToJSONTyped(json, false); +} + +export function FlowRequestToJSONTyped(value?: FlowRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'title': value['title'], + 'designation': FlowDesignationEnumToJSON(value['designation']), + 'background': value['background'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'compatibility_mode': value['compatibilityMode'], + 'layout': FlowLayoutEnumToJSON(value['layout']), + 'denied_action': DeniedActionEnumToJSON(value['deniedAction']), + 'authentication': AuthenticationEnumToJSON(value['authentication']), + }; +} + diff --git a/packages/client-ts/src/models/FlowSet.ts b/packages/client-ts/src/models/FlowSet.ts new file mode 100644 index 0000000000..1bf63890ec --- /dev/null +++ b/packages/client-ts/src/models/FlowSet.ts @@ -0,0 +1,188 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeniedActionEnum } from './DeniedActionEnum'; +import { + DeniedActionEnumFromJSON, + DeniedActionEnumFromJSONTyped, + DeniedActionEnumToJSON, + DeniedActionEnumToJSONTyped, +} from './DeniedActionEnum'; +import type { FlowLayoutEnum } from './FlowLayoutEnum'; +import { + FlowLayoutEnumFromJSON, + FlowLayoutEnumFromJSONTyped, + FlowLayoutEnumToJSON, + FlowLayoutEnumToJSONTyped, +} from './FlowLayoutEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { FlowDesignationEnum } from './FlowDesignationEnum'; +import { + FlowDesignationEnumFromJSON, + FlowDesignationEnumFromJSONTyped, + FlowDesignationEnumToJSON, + FlowDesignationEnumToJSONTyped, +} from './FlowDesignationEnum'; + +/** + * Stripped down flow serializer + * @export + * @interface FlowSet + */ +export interface FlowSet { + /** + * + * @type {string} + * @memberof FlowSet + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof FlowSet + */ + readonly policybindingmodelPtrId: string; + /** + * + * @type {string} + * @memberof FlowSet + */ + name: string; + /** + * Visible in the URL. + * @type {string} + * @memberof FlowSet + */ + slug: string; + /** + * Shown as the Title in Flow pages. + * @type {string} + * @memberof FlowSet + */ + title: string; + /** + * Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + * @type {FlowDesignationEnum} + * @memberof FlowSet + */ + designation: FlowDesignationEnum; + /** + * Get the URL to the background image + * @type {string} + * @memberof FlowSet + */ + readonly backgroundUrl: string; + /** + * + * @type {PolicyEngineMode} + * @memberof FlowSet + */ + policyEngineMode?: PolicyEngineMode; + /** + * Enable compatibility mode, increases compatibility with password managers on mobile devices. + * @type {boolean} + * @memberof FlowSet + */ + compatibilityMode?: boolean; + /** + * Get export URL for flow + * @type {string} + * @memberof FlowSet + */ + readonly exportUrl: string; + /** + * + * @type {FlowLayoutEnum} + * @memberof FlowSet + */ + layout?: FlowLayoutEnum; + /** + * Configure what should happen when a flow denies access to a user. + * @type {DeniedActionEnum} + * @memberof FlowSet + */ + deniedAction?: DeniedActionEnum; +} + + + +/** + * Check if a given object implements the FlowSet interface. + */ +export function instanceOfFlowSet(value: object): value is FlowSet { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('policybindingmodelPtrId' in value) || value['policybindingmodelPtrId'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('title' in value) || value['title'] === undefined) return false; + if (!('designation' in value) || value['designation'] === undefined) return false; + if (!('backgroundUrl' in value) || value['backgroundUrl'] === undefined) return false; + if (!('exportUrl' in value) || value['exportUrl'] === undefined) return false; + return true; +} + +export function FlowSetFromJSON(json: any): FlowSet { + return FlowSetFromJSONTyped(json, false); +} + +export function FlowSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowSet { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'policybindingmodelPtrId': json['policybindingmodel_ptr_id'], + 'name': json['name'], + 'slug': json['slug'], + 'title': json['title'], + 'designation': FlowDesignationEnumFromJSON(json['designation']), + 'backgroundUrl': json['background_url'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : json['compatibility_mode'], + 'exportUrl': json['export_url'], + 'layout': json['layout'] == null ? undefined : FlowLayoutEnumFromJSON(json['layout']), + 'deniedAction': json['denied_action'] == null ? undefined : DeniedActionEnumFromJSON(json['denied_action']), + }; +} + +export function FlowSetToJSON(json: any): FlowSet { + return FlowSetToJSONTyped(json, false); +} + +export function FlowSetToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'title': value['title'], + 'designation': FlowDesignationEnumToJSON(value['designation']), + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'compatibility_mode': value['compatibilityMode'], + 'layout': FlowLayoutEnumToJSON(value['layout']), + 'denied_action': DeniedActionEnumToJSON(value['deniedAction']), + }; +} + diff --git a/packages/client-ts/src/models/FlowStageBinding.ts b/packages/client-ts/src/models/FlowStageBinding.ts new file mode 100644 index 0000000000..8f82126bbe --- /dev/null +++ b/packages/client-ts/src/models/FlowStageBinding.ts @@ -0,0 +1,164 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { InvalidResponseActionEnum } from './InvalidResponseActionEnum'; +import { + InvalidResponseActionEnumFromJSON, + InvalidResponseActionEnumFromJSONTyped, + InvalidResponseActionEnumToJSON, + InvalidResponseActionEnumToJSONTyped, +} from './InvalidResponseActionEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { Stage } from './Stage'; +import { + StageFromJSON, + StageFromJSONTyped, + StageToJSON, + StageToJSONTyped, +} from './Stage'; + +/** + * FlowStageBinding Serializer + * @export + * @interface FlowStageBinding + */ +export interface FlowStageBinding { + /** + * + * @type {string} + * @memberof FlowStageBinding + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof FlowStageBinding + */ + readonly policybindingmodelPtrId: string; + /** + * + * @type {string} + * @memberof FlowStageBinding + */ + target: string; + /** + * + * @type {string} + * @memberof FlowStageBinding + */ + stage: string; + /** + * + * @type {Stage} + * @memberof FlowStageBinding + */ + readonly stageObj: Stage; + /** + * Evaluate policies during the Flow planning process. + * @type {boolean} + * @memberof FlowStageBinding + */ + evaluateOnPlan?: boolean; + /** + * Evaluate policies when the Stage is presented to the user. + * @type {boolean} + * @memberof FlowStageBinding + */ + reEvaluatePolicies?: boolean; + /** + * + * @type {number} + * @memberof FlowStageBinding + */ + order: number; + /** + * + * @type {PolicyEngineMode} + * @memberof FlowStageBinding + */ + 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. + * @type {InvalidResponseActionEnum} + * @memberof FlowStageBinding + */ + invalidResponseAction?: InvalidResponseActionEnum; +} + + + +/** + * Check if a given object implements the FlowStageBinding interface. + */ +export function instanceOfFlowStageBinding(value: object): value is FlowStageBinding { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('policybindingmodelPtrId' in value) || value['policybindingmodelPtrId'] === undefined) return false; + if (!('target' in value) || value['target'] === undefined) return false; + if (!('stage' in value) || value['stage'] === undefined) return false; + if (!('stageObj' in value) || value['stageObj'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + return true; +} + +export function FlowStageBindingFromJSON(json: any): FlowStageBinding { + return FlowStageBindingFromJSONTyped(json, false); +} + +export function FlowStageBindingFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowStageBinding { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'policybindingmodelPtrId': json['policybindingmodel_ptr_id'], + 'target': json['target'], + 'stage': json['stage'], + 'stageObj': StageFromJSON(json['stage_obj']), + 'evaluateOnPlan': json['evaluate_on_plan'] == null ? undefined : json['evaluate_on_plan'], + 'reEvaluatePolicies': json['re_evaluate_policies'] == null ? undefined : json['re_evaluate_policies'], + 'order': json['order'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'invalidResponseAction': json['invalid_response_action'] == null ? undefined : InvalidResponseActionEnumFromJSON(json['invalid_response_action']), + }; +} + +export function FlowStageBindingToJSON(json: any): FlowStageBinding { + return FlowStageBindingToJSONTyped(json, false); +} + +export function FlowStageBindingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'target': value['target'], + 'stage': value['stage'], + 'evaluate_on_plan': value['evaluateOnPlan'], + 're_evaluate_policies': value['reEvaluatePolicies'], + 'order': value['order'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'invalid_response_action': InvalidResponseActionEnumToJSON(value['invalidResponseAction']), + }; +} + diff --git a/packages/client-ts/src/models/FlowStageBindingRequest.ts b/packages/client-ts/src/models/FlowStageBindingRequest.ts new file mode 100644 index 0000000000..1a826a116b --- /dev/null +++ b/packages/client-ts/src/models/FlowStageBindingRequest.ts @@ -0,0 +1,133 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { InvalidResponseActionEnum } from './InvalidResponseActionEnum'; +import { + InvalidResponseActionEnumFromJSON, + InvalidResponseActionEnumFromJSONTyped, + InvalidResponseActionEnumToJSON, + InvalidResponseActionEnumToJSONTyped, +} from './InvalidResponseActionEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; + +/** + * FlowStageBinding Serializer + * @export + * @interface FlowStageBindingRequest + */ +export interface FlowStageBindingRequest { + /** + * + * @type {string} + * @memberof FlowStageBindingRequest + */ + target: string; + /** + * + * @type {string} + * @memberof FlowStageBindingRequest + */ + stage: string; + /** + * Evaluate policies during the Flow planning process. + * @type {boolean} + * @memberof FlowStageBindingRequest + */ + evaluateOnPlan?: boolean; + /** + * Evaluate policies when the Stage is presented to the user. + * @type {boolean} + * @memberof FlowStageBindingRequest + */ + reEvaluatePolicies?: boolean; + /** + * + * @type {number} + * @memberof FlowStageBindingRequest + */ + order: number; + /** + * + * @type {PolicyEngineMode} + * @memberof FlowStageBindingRequest + */ + 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. + * @type {InvalidResponseActionEnum} + * @memberof FlowStageBindingRequest + */ + invalidResponseAction?: InvalidResponseActionEnum; +} + + + +/** + * Check if a given object implements the FlowStageBindingRequest interface. + */ +export function instanceOfFlowStageBindingRequest(value: object): value is FlowStageBindingRequest { + if (!('target' in value) || value['target'] === undefined) return false; + if (!('stage' in value) || value['stage'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + return true; +} + +export function FlowStageBindingRequestFromJSON(json: any): FlowStageBindingRequest { + return FlowStageBindingRequestFromJSONTyped(json, false); +} + +export function FlowStageBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FlowStageBindingRequest { + if (json == null) { + return json; + } + return { + + 'target': json['target'], + 'stage': json['stage'], + 'evaluateOnPlan': json['evaluate_on_plan'] == null ? undefined : json['evaluate_on_plan'], + 'reEvaluatePolicies': json['re_evaluate_policies'] == null ? undefined : json['re_evaluate_policies'], + 'order': json['order'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'invalidResponseAction': json['invalid_response_action'] == null ? undefined : InvalidResponseActionEnumFromJSON(json['invalid_response_action']), + }; +} + +export function FlowStageBindingRequestToJSON(json: any): FlowStageBindingRequest { + return FlowStageBindingRequestToJSONTyped(json, false); +} + +export function FlowStageBindingRequestToJSONTyped(value?: FlowStageBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'target': value['target'], + 'stage': value['stage'], + 'evaluate_on_plan': value['evaluateOnPlan'], + 're_evaluate_policies': value['reEvaluatePolicies'], + 'order': value['order'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'invalid_response_action': InvalidResponseActionEnumToJSON(value['invalidResponseAction']), + }; +} + diff --git a/packages/client-ts/src/models/FooterLink.ts b/packages/client-ts/src/models/FooterLink.ts new file mode 100644 index 0000000000..f5a0caf783 --- /dev/null +++ b/packages/client-ts/src/models/FooterLink.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Links returned in Config API + * @export + * @interface FooterLink + */ +export interface FooterLink { + /** + * + * @type {string} + * @memberof FooterLink + */ + readonly href: string | null; + /** + * + * @type {string} + * @memberof FooterLink + */ + readonly name: string; +} + +/** + * Check if a given object implements the FooterLink interface. + */ +export function instanceOfFooterLink(value: object): value is FooterLink { + if (!('href' in value) || value['href'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function FooterLinkFromJSON(json: any): FooterLink { + return FooterLinkFromJSONTyped(json, false); +} + +export function FooterLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): FooterLink { + if (json == null) { + return json; + } + return { + + 'href': json['href'], + 'name': json['name'], + }; +} + +export function FooterLinkToJSON(json: any): FooterLink { + return FooterLinkToJSONTyped(json, false); +} + +export function FooterLinkToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/FrameChallenge.ts b/packages/client-ts/src/models/FrameChallenge.ts new file mode 100644 index 0000000000..d46c68ea81 --- /dev/null +++ b/packages/client-ts/src/models/FrameChallenge.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge type to render a frame + * @export + * @interface FrameChallenge + */ +export interface FrameChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof FrameChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof FrameChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof FrameChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof FrameChallenge + */ + url: string; + /** + * + * @type {boolean} + * @memberof FrameChallenge + */ + loadingOverlay?: boolean; + /** + * + * @type {string} + * @memberof FrameChallenge + */ + loadingText: string; +} + +/** + * Check if a given object implements the FrameChallenge interface. + */ +export function instanceOfFrameChallenge(value: object): value is FrameChallenge { + if (!('url' in value) || value['url'] === undefined) return false; + if (!('loadingText' in value) || value['loadingText'] === undefined) return false; + return true; +} + +export function FrameChallengeFromJSON(json: any): FrameChallenge { + return FrameChallengeFromJSONTyped(json, false); +} + +export function FrameChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrameChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'url': json['url'], + 'loadingOverlay': json['loading_overlay'] == null ? undefined : json['loading_overlay'], + 'loadingText': json['loading_text'], + }; +} + +export function FrameChallengeToJSON(json: any): FrameChallenge { + return FrameChallengeToJSONTyped(json, false); +} + +export function FrameChallengeToJSONTyped(value?: FrameChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'url': value['url'], + 'loading_overlay': value['loadingOverlay'], + 'loading_text': value['loadingText'], + }; +} + diff --git a/packages/client-ts/src/models/FrameChallengeResponseRequest.ts b/packages/client-ts/src/models/FrameChallengeResponseRequest.ts new file mode 100644 index 0000000000..696c55344f --- /dev/null +++ b/packages/client-ts/src/models/FrameChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Base class for all challenge responses + * @export + * @interface FrameChallengeResponseRequest + */ +export interface FrameChallengeResponseRequest { + /** + * + * @type {string} + * @memberof FrameChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the FrameChallengeResponseRequest interface. + */ +export function instanceOfFrameChallengeResponseRequest(value: object): value is FrameChallengeResponseRequest { + return true; +} + +export function FrameChallengeResponseRequestFromJSON(json: any): FrameChallengeResponseRequest { + return FrameChallengeResponseRequestFromJSONTyped(json, false); +} + +export function FrameChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrameChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function FrameChallengeResponseRequestToJSON(json: any): FrameChallengeResponseRequest { + return FrameChallengeResponseRequestToJSONTyped(json, false); +} + +export function FrameChallengeResponseRequestToJSONTyped(value?: FrameChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/GenericError.ts b/packages/client-ts/src/models/GenericError.ts new file mode 100644 index 0000000000..e2220e58d9 --- /dev/null +++ b/packages/client-ts/src/models/GenericError.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Generic API Error + * @export + * @interface GenericError + */ +export interface GenericError { + /** + * + * @type {string} + * @memberof GenericError + */ + detail: string; + /** + * + * @type {string} + * @memberof GenericError + */ + code?: string; +} + +/** + * Check if a given object implements the GenericError interface. + */ +export function instanceOfGenericError(value: object): value is GenericError { + if (!('detail' in value) || value['detail'] === undefined) return false; + return true; +} + +export function GenericErrorFromJSON(json: any): GenericError { + return GenericErrorFromJSONTyped(json, false); +} + +export function GenericErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericError { + if (json == null) { + return json; + } + return { + + 'detail': json['detail'], + 'code': json['code'] == null ? undefined : json['code'], + }; +} + +export function GenericErrorToJSON(json: any): GenericError { + return GenericErrorToJSONTyped(json, false); +} + +export function GenericErrorToJSONTyped(value?: GenericError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'detail': value['detail'], + 'code': value['code'], + }; +} + diff --git a/packages/client-ts/src/models/GeoIPPolicy.ts b/packages/client-ts/src/models/GeoIPPolicy.ts new file mode 100644 index 0000000000..92c2695904 --- /dev/null +++ b/packages/client-ts/src/models/GeoIPPolicy.ts @@ -0,0 +1,210 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GeoIPPolicyCountriesObjInner } from './GeoIPPolicyCountriesObjInner'; +import { + GeoIPPolicyCountriesObjInnerFromJSON, + GeoIPPolicyCountriesObjInnerFromJSONTyped, + GeoIPPolicyCountriesObjInnerToJSON, + GeoIPPolicyCountriesObjInnerToJSONTyped, +} from './GeoIPPolicyCountriesObjInner'; +import type { CountryCodeEnum } from './CountryCodeEnum'; +import { + CountryCodeEnumFromJSON, + CountryCodeEnumFromJSONTyped, + CountryCodeEnumToJSON, + CountryCodeEnumToJSONTyped, +} from './CountryCodeEnum'; + +/** + * GeoIP Policy Serializer + * @export + * @interface GeoIPPolicy + */ +export interface GeoIPPolicy { + /** + * + * @type {string} + * @memberof GeoIPPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof GeoIPPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof GeoIPPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof GeoIPPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof GeoIPPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof GeoIPPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof GeoIPPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof GeoIPPolicy + */ + readonly boundTo: number; + /** + * + * @type {Array} + * @memberof GeoIPPolicy + */ + asns?: Array; + /** + * + * @type {Array} + * @memberof GeoIPPolicy + */ + countries: Array; + /** + * + * @type {Array} + * @memberof GeoIPPolicy + */ + readonly countriesObj: Array; + /** + * + * @type {boolean} + * @memberof GeoIPPolicy + */ + checkHistoryDistance?: boolean; + /** + * + * @type {number} + * @memberof GeoIPPolicy + */ + historyMaxDistanceKm?: number; + /** + * + * @type {number} + * @memberof GeoIPPolicy + */ + distanceToleranceKm?: number; + /** + * + * @type {number} + * @memberof GeoIPPolicy + */ + historyLoginCount?: number; + /** + * + * @type {boolean} + * @memberof GeoIPPolicy + */ + checkImpossibleTravel?: boolean; + /** + * + * @type {number} + * @memberof GeoIPPolicy + */ + impossibleToleranceKm?: number; +} + +/** + * Check if a given object implements the GeoIPPolicy interface. + */ +export function instanceOfGeoIPPolicy(value: object): value is GeoIPPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + if (!('countries' in value) || value['countries'] === undefined) return false; + if (!('countriesObj' in value) || value['countriesObj'] === undefined) return false; + return true; +} + +export function GeoIPPolicyFromJSON(json: any): GeoIPPolicy { + return GeoIPPolicyFromJSONTyped(json, false); +} + +export function GeoIPPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoIPPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'asns': json['asns'] == null ? undefined : json['asns'], + 'countries': ((json['countries'] as Array).map(CountryCodeEnumFromJSON)), + 'countriesObj': ((json['countries_obj'] as Array).map(GeoIPPolicyCountriesObjInnerFromJSON)), + 'checkHistoryDistance': json['check_history_distance'] == null ? undefined : json['check_history_distance'], + 'historyMaxDistanceKm': json['history_max_distance_km'] == null ? undefined : json['history_max_distance_km'], + 'distanceToleranceKm': json['distance_tolerance_km'] == null ? undefined : json['distance_tolerance_km'], + 'historyLoginCount': json['history_login_count'] == null ? undefined : json['history_login_count'], + 'checkImpossibleTravel': json['check_impossible_travel'] == null ? undefined : json['check_impossible_travel'], + 'impossibleToleranceKm': json['impossible_tolerance_km'] == null ? undefined : json['impossible_tolerance_km'], + }; +} + +export function GeoIPPolicyToJSON(json: any): GeoIPPolicy { + return GeoIPPolicyToJSONTyped(json, false); +} + +export function GeoIPPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'asns': value['asns'], + 'countries': ((value['countries'] as Array).map(CountryCodeEnumToJSON)), + 'check_history_distance': value['checkHistoryDistance'], + 'history_max_distance_km': value['historyMaxDistanceKm'], + 'distance_tolerance_km': value['distanceToleranceKm'], + 'history_login_count': value['historyLoginCount'], + 'check_impossible_travel': value['checkImpossibleTravel'], + 'impossible_tolerance_km': value['impossibleToleranceKm'], + }; +} + diff --git a/packages/client-ts/src/models/GeoIPPolicyCountriesObjInner.ts b/packages/client-ts/src/models/GeoIPPolicyCountriesObjInner.ts new file mode 100644 index 0000000000..adc68cdfa3 --- /dev/null +++ b/packages/client-ts/src/models/GeoIPPolicyCountriesObjInner.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface GeoIPPolicyCountriesObjInner + */ +export interface GeoIPPolicyCountriesObjInner { + /** + * + * @type {string} + * @memberof GeoIPPolicyCountriesObjInner + */ + code: string; + /** + * + * @type {string} + * @memberof GeoIPPolicyCountriesObjInner + */ + name: string; +} + +/** + * Check if a given object implements the GeoIPPolicyCountriesObjInner interface. + */ +export function instanceOfGeoIPPolicyCountriesObjInner(value: object): value is GeoIPPolicyCountriesObjInner { + if (!('code' in value) || value['code'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function GeoIPPolicyCountriesObjInnerFromJSON(json: any): GeoIPPolicyCountriesObjInner { + return GeoIPPolicyCountriesObjInnerFromJSONTyped(json, false); +} + +export function GeoIPPolicyCountriesObjInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoIPPolicyCountriesObjInner { + if (json == null) { + return json; + } + return { + + 'code': json['code'], + 'name': json['name'], + }; +} + +export function GeoIPPolicyCountriesObjInnerToJSON(json: any): GeoIPPolicyCountriesObjInner { + return GeoIPPolicyCountriesObjInnerToJSONTyped(json, false); +} + +export function GeoIPPolicyCountriesObjInnerToJSONTyped(value?: GeoIPPolicyCountriesObjInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'code': value['code'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/GeoIPPolicyRequest.ts b/packages/client-ts/src/models/GeoIPPolicyRequest.ts new file mode 100644 index 0000000000..2631cf5e9a --- /dev/null +++ b/packages/client-ts/src/models/GeoIPPolicyRequest.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CountryCodeEnum } from './CountryCodeEnum'; +import { + CountryCodeEnumFromJSON, + CountryCodeEnumFromJSONTyped, + CountryCodeEnumToJSON, + CountryCodeEnumToJSONTyped, +} from './CountryCodeEnum'; + +/** + * GeoIP Policy Serializer + * @export + * @interface GeoIPPolicyRequest + */ +export interface GeoIPPolicyRequest { + /** + * + * @type {string} + * @memberof GeoIPPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof GeoIPPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {Array} + * @memberof GeoIPPolicyRequest + */ + asns?: Array; + /** + * + * @type {Array} + * @memberof GeoIPPolicyRequest + */ + countries: Array; + /** + * + * @type {boolean} + * @memberof GeoIPPolicyRequest + */ + checkHistoryDistance?: boolean; + /** + * + * @type {number} + * @memberof GeoIPPolicyRequest + */ + historyMaxDistanceKm?: number; + /** + * + * @type {number} + * @memberof GeoIPPolicyRequest + */ + distanceToleranceKm?: number; + /** + * + * @type {number} + * @memberof GeoIPPolicyRequest + */ + historyLoginCount?: number; + /** + * + * @type {boolean} + * @memberof GeoIPPolicyRequest + */ + checkImpossibleTravel?: boolean; + /** + * + * @type {number} + * @memberof GeoIPPolicyRequest + */ + impossibleToleranceKm?: number; +} + +/** + * Check if a given object implements the GeoIPPolicyRequest interface. + */ +export function instanceOfGeoIPPolicyRequest(value: object): value is GeoIPPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('countries' in value) || value['countries'] === undefined) return false; + return true; +} + +export function GeoIPPolicyRequestFromJSON(json: any): GeoIPPolicyRequest { + return GeoIPPolicyRequestFromJSONTyped(json, false); +} + +export function GeoIPPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoIPPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'asns': json['asns'] == null ? undefined : json['asns'], + 'countries': ((json['countries'] as Array).map(CountryCodeEnumFromJSON)), + 'checkHistoryDistance': json['check_history_distance'] == null ? undefined : json['check_history_distance'], + 'historyMaxDistanceKm': json['history_max_distance_km'] == null ? undefined : json['history_max_distance_km'], + 'distanceToleranceKm': json['distance_tolerance_km'] == null ? undefined : json['distance_tolerance_km'], + 'historyLoginCount': json['history_login_count'] == null ? undefined : json['history_login_count'], + 'checkImpossibleTravel': json['check_impossible_travel'] == null ? undefined : json['check_impossible_travel'], + 'impossibleToleranceKm': json['impossible_tolerance_km'] == null ? undefined : json['impossible_tolerance_km'], + }; +} + +export function GeoIPPolicyRequestToJSON(json: any): GeoIPPolicyRequest { + return GeoIPPolicyRequestToJSONTyped(json, false); +} + +export function GeoIPPolicyRequestToJSONTyped(value?: GeoIPPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'asns': value['asns'], + 'countries': ((value['countries'] as Array).map(CountryCodeEnumToJSON)), + 'check_history_distance': value['checkHistoryDistance'], + 'history_max_distance_km': value['historyMaxDistanceKm'], + 'distance_tolerance_km': value['distanceToleranceKm'], + 'history_login_count': value['historyLoginCount'], + 'check_impossible_travel': value['checkImpossibleTravel'], + 'impossible_tolerance_km': value['impossibleToleranceKm'], + }; +} + diff --git a/packages/client-ts/src/models/GeoipBindingEnum.ts b/packages/client-ts/src/models/GeoipBindingEnum.ts new file mode 100644 index 0000000000..6ad05b2148 --- /dev/null +++ b/packages/client-ts/src/models/GeoipBindingEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const GeoipBindingEnum = { + NoBinding: 'no_binding', + BindContinent: 'bind_continent', + BindContinentCountry: 'bind_continent_country', + BindContinentCountryCity: 'bind_continent_country_city', + UnknownDefaultOpenApi: '11184809' +} as const; +export type GeoipBindingEnum = typeof GeoipBindingEnum[keyof typeof GeoipBindingEnum]; + + +export function instanceOfGeoipBindingEnum(value: any): boolean { + for (const key in GeoipBindingEnum) { + if (Object.prototype.hasOwnProperty.call(GeoipBindingEnum, key)) { + if (GeoipBindingEnum[key as keyof typeof GeoipBindingEnum] === value) { + return true; + } + } + } + return false; +} + +export function GeoipBindingEnumFromJSON(json: any): GeoipBindingEnum { + return GeoipBindingEnumFromJSONTyped(json, false); +} + +export function GeoipBindingEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoipBindingEnum { + return json as GeoipBindingEnum; +} + +export function GeoipBindingEnumToJSON(value?: GeoipBindingEnum | null): any { + return value as any; +} + +export function GeoipBindingEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): GeoipBindingEnum { + return value as GeoipBindingEnum; +} + diff --git a/packages/client-ts/src/models/GlobalTaskStatus.ts b/packages/client-ts/src/models/GlobalTaskStatus.ts new file mode 100644 index 0000000000..55859dcf60 --- /dev/null +++ b/packages/client-ts/src/models/GlobalTaskStatus.ts @@ -0,0 +1,137 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface GlobalTaskStatus + */ +export interface GlobalTaskStatus { + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly queued: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly consumed: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly preprocess: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly running: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly postprocess: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly rejected: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly done: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly info: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly warning: number; + /** + * + * @type {number} + * @memberof GlobalTaskStatus + */ + readonly error: number; +} + +/** + * Check if a given object implements the GlobalTaskStatus interface. + */ +export function instanceOfGlobalTaskStatus(value: object): value is GlobalTaskStatus { + if (!('queued' in value) || value['queued'] === undefined) return false; + if (!('consumed' in value) || value['consumed'] === undefined) return false; + if (!('preprocess' in value) || value['preprocess'] === undefined) return false; + if (!('running' in value) || value['running'] === undefined) return false; + if (!('postprocess' in value) || value['postprocess'] === undefined) return false; + if (!('rejected' in value) || value['rejected'] === undefined) return false; + if (!('done' in value) || value['done'] === undefined) return false; + if (!('info' in value) || value['info'] === undefined) return false; + if (!('warning' in value) || value['warning'] === undefined) return false; + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function GlobalTaskStatusFromJSON(json: any): GlobalTaskStatus { + return GlobalTaskStatusFromJSONTyped(json, false); +} + +export function GlobalTaskStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalTaskStatus { + if (json == null) { + return json; + } + return { + + 'queued': json['queued'], + 'consumed': json['consumed'], + 'preprocess': json['preprocess'], + 'running': json['running'], + 'postprocess': json['postprocess'], + 'rejected': json['rejected'], + 'done': json['done'], + 'info': json['info'], + 'warning': json['warning'], + 'error': json['error'], + }; +} + +export function GlobalTaskStatusToJSON(json: any): GlobalTaskStatus { + return GlobalTaskStatusToJSONTyped(json, false); +} + +export function GlobalTaskStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/GoogleChromeConnector.ts b/packages/client-ts/src/models/GoogleChromeConnector.ts new file mode 100644 index 0000000000..44a1c48ba0 --- /dev/null +++ b/packages/client-ts/src/models/GoogleChromeConnector.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleChromeConnector Serializer + * @export + * @interface GoogleChromeConnector + */ +export interface GoogleChromeConnector { + /** + * + * @type {string} + * @memberof GoogleChromeConnector + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof GoogleChromeConnector + */ + name: string; + /** + * + * @type {boolean} + * @memberof GoogleChromeConnector + */ + enabled?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof GoogleChromeConnector + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof GoogleChromeConnector + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof GoogleChromeConnector + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof GoogleChromeConnector + */ + readonly metaModelName: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GoogleChromeConnector + */ + credentials: { [key: string]: any; }; + /** + * Full URL to be used in Google Workspace configuration + * @type {string} + * @memberof GoogleChromeConnector + */ + readonly chromeUrl: string | null; +} + +/** + * Check if a given object implements the GoogleChromeConnector interface. + */ +export function instanceOfGoogleChromeConnector(value: object): value is GoogleChromeConnector { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('credentials' in value) || value['credentials'] === undefined) return false; + if (!('chromeUrl' in value) || value['chromeUrl'] === undefined) return false; + return true; +} + +export function GoogleChromeConnectorFromJSON(json: any): GoogleChromeConnector { + return GoogleChromeConnectorFromJSONTyped(json, false); +} + +export function GoogleChromeConnectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleChromeConnector { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'credentials': json['credentials'], + 'chromeUrl': json['chrome_url'], + }; +} + +export function GoogleChromeConnectorToJSON(json: any): GoogleChromeConnector { + return GoogleChromeConnectorToJSONTyped(json, false); +} + +export function GoogleChromeConnectorToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'credentials': value['credentials'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleChromeConnectorRequest.ts b/packages/client-ts/src/models/GoogleChromeConnectorRequest.ts new file mode 100644 index 0000000000..b97a4a6ddc --- /dev/null +++ b/packages/client-ts/src/models/GoogleChromeConnectorRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleChromeConnector Serializer + * @export + * @interface GoogleChromeConnectorRequest + */ +export interface GoogleChromeConnectorRequest { + /** + * + * @type {string} + * @memberof GoogleChromeConnectorRequest + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof GoogleChromeConnectorRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof GoogleChromeConnectorRequest + */ + enabled?: boolean; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GoogleChromeConnectorRequest + */ + credentials: { [key: string]: any; }; +} + +/** + * Check if a given object implements the GoogleChromeConnectorRequest interface. + */ +export function instanceOfGoogleChromeConnectorRequest(value: object): value is GoogleChromeConnectorRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('credentials' in value) || value['credentials'] === undefined) return false; + return true; +} + +export function GoogleChromeConnectorRequestFromJSON(json: any): GoogleChromeConnectorRequest { + return GoogleChromeConnectorRequestFromJSONTyped(json, false); +} + +export function GoogleChromeConnectorRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleChromeConnectorRequest { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'credentials': json['credentials'], + }; +} + +export function GoogleChromeConnectorRequestToJSON(json: any): GoogleChromeConnectorRequest { + return GoogleChromeConnectorRequestToJSONTyped(json, false); +} + +export function GoogleChromeConnectorRequestToJSONTyped(value?: GoogleChromeConnectorRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'credentials': value['credentials'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleEndpointDevice.ts b/packages/client-ts/src/models/GoogleEndpointDevice.ts new file mode 100644 index 0000000000..2cb1771235 --- /dev/null +++ b/packages/client-ts/src/models/GoogleEndpointDevice.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for Endpoint authenticator devices + * @export + * @interface GoogleEndpointDevice + */ +export interface GoogleEndpointDevice { + /** + * + * @type {string} + * @memberof GoogleEndpointDevice + */ + pk?: string; + /** + * The human-readable name of this device. + * @type {string} + * @memberof GoogleEndpointDevice + */ + name: string; +} + +/** + * Check if a given object implements the GoogleEndpointDevice interface. + */ +export function instanceOfGoogleEndpointDevice(value: object): value is GoogleEndpointDevice { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function GoogleEndpointDeviceFromJSON(json: any): GoogleEndpointDevice { + return GoogleEndpointDeviceFromJSONTyped(json, false); +} + +export function GoogleEndpointDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleEndpointDevice { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'name': json['name'], + }; +} + +export function GoogleEndpointDeviceToJSON(json: any): GoogleEndpointDevice { + return GoogleEndpointDeviceToJSONTyped(json, false); +} + +export function GoogleEndpointDeviceToJSONTyped(value?: GoogleEndpointDevice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleEndpointDeviceRequest.ts b/packages/client-ts/src/models/GoogleEndpointDeviceRequest.ts new file mode 100644 index 0000000000..d7301e18bb --- /dev/null +++ b/packages/client-ts/src/models/GoogleEndpointDeviceRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for Endpoint authenticator devices + * @export + * @interface GoogleEndpointDeviceRequest + */ +export interface GoogleEndpointDeviceRequest { + /** + * + * @type {string} + * @memberof GoogleEndpointDeviceRequest + */ + pk?: string; + /** + * The human-readable name of this device. + * @type {string} + * @memberof GoogleEndpointDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the GoogleEndpointDeviceRequest interface. + */ +export function instanceOfGoogleEndpointDeviceRequest(value: object): value is GoogleEndpointDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function GoogleEndpointDeviceRequestFromJSON(json: any): GoogleEndpointDeviceRequest { + return GoogleEndpointDeviceRequestFromJSONTyped(json, false); +} + +export function GoogleEndpointDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleEndpointDeviceRequest { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'name': json['name'], + }; +} + +export function GoogleEndpointDeviceRequestToJSON(json: any): GoogleEndpointDeviceRequest { + return GoogleEndpointDeviceRequestToJSONTyped(json, false); +} + +export function GoogleEndpointDeviceRequestToJSONTyped(value?: GoogleEndpointDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProvider.ts b/packages/client-ts/src/models/GoogleWorkspaceProvider.ts new file mode 100644 index 0000000000..67fd888494 --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProvider.ts @@ -0,0 +1,239 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction'; +import { + OutgoingSyncDeleteActionFromJSON, + OutgoingSyncDeleteActionFromJSONTyped, + OutgoingSyncDeleteActionToJSON, + OutgoingSyncDeleteActionToJSONTyped, +} from './OutgoingSyncDeleteAction'; + +/** + * GoogleWorkspaceProvider Serializer + * @export + * @interface GoogleWorkspaceProvider + */ +export interface GoogleWorkspaceProvider { + /** + * + * @type {number} + * @memberof GoogleWorkspaceProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + name: string; + /** + * + * @type {Array} + * @memberof GoogleWorkspaceProvider + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof GoogleWorkspaceProvider + */ + propertyMappingsGroup?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + delegatedSubject: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GoogleWorkspaceProvider + */ + credentials: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + scopes?: string; + /** + * + * @type {boolean} + * @memberof GoogleWorkspaceProvider + */ + excludeUsersServiceAccount?: boolean; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + filterGroup?: string | null; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof GoogleWorkspaceProvider + */ + userDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof GoogleWorkspaceProvider + */ + groupDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + defaultGroupEmailDomain: string; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof GoogleWorkspaceProvider + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof GoogleWorkspaceProvider + */ + syncPageTimeout?: string; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof GoogleWorkspaceProvider + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the GoogleWorkspaceProvider interface. + */ +export function instanceOfGoogleWorkspaceProvider(value: object): value is GoogleWorkspaceProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('delegatedSubject' in value) || value['delegatedSubject'] === undefined) return false; + if (!('credentials' in value) || value['credentials'] === undefined) return false; + if (!('defaultGroupEmailDomain' in value) || value['defaultGroupEmailDomain'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderFromJSON(json: any): GoogleWorkspaceProvider { + return GoogleWorkspaceProviderFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'component': json['component'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'delegatedSubject': json['delegated_subject'], + 'credentials': json['credentials'], + 'scopes': json['scopes'] == null ? undefined : json['scopes'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'], + 'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']), + 'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']), + 'defaultGroupEmailDomain': json['default_group_email_domain'], + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function GoogleWorkspaceProviderToJSON(json: any): GoogleWorkspaceProvider { + return GoogleWorkspaceProviderToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'delegated_subject': value['delegatedSubject'], + 'credentials': value['credentials'], + 'scopes': value['scopes'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'filter_group': value['filterGroup'], + 'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']), + 'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']), + 'default_group_email_domain': value['defaultGroupEmailDomain'], + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderGroup.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderGroup.ts new file mode 100644 index 0000000000..8bd941f40a --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderGroup.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * GoogleWorkspaceProviderGroup Serializer + * @export + * @interface GoogleWorkspaceProviderGroup + */ +export interface GoogleWorkspaceProviderGroup { + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderGroup + */ + readonly id: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderGroup + */ + googleId: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderGroup + */ + group: string; + /** + * + * @type {PartialGroup} + * @memberof GoogleWorkspaceProviderGroup + */ + readonly groupObj: PartialGroup; + /** + * + * @type {number} + * @memberof GoogleWorkspaceProviderGroup + */ + provider: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GoogleWorkspaceProviderGroup + */ + readonly attributes: { [key: string]: any; }; +} + +/** + * Check if a given object implements the GoogleWorkspaceProviderGroup interface. + */ +export function instanceOfGoogleWorkspaceProviderGroup(value: object): value is GoogleWorkspaceProviderGroup { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('googleId' in value) || value['googleId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('groupObj' in value) || value['groupObj'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderGroupFromJSON(json: any): GoogleWorkspaceProviderGroup { + return GoogleWorkspaceProviderGroupFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderGroup { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'googleId': json['google_id'], + 'group': json['group'], + 'groupObj': PartialGroupFromJSON(json['group_obj']), + 'provider': json['provider'], + 'attributes': json['attributes'], + }; +} + +export function GoogleWorkspaceProviderGroupToJSON(json: any): GoogleWorkspaceProviderGroup { + return GoogleWorkspaceProviderGroupToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'google_id': value['googleId'], + 'group': value['group'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderGroupRequest.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderGroupRequest.ts new file mode 100644 index 0000000000..bd6f774dc3 --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderGroupRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleWorkspaceProviderGroup Serializer + * @export + * @interface GoogleWorkspaceProviderGroupRequest + */ +export interface GoogleWorkspaceProviderGroupRequest { + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderGroupRequest + */ + googleId: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderGroupRequest + */ + group: string; + /** + * + * @type {number} + * @memberof GoogleWorkspaceProviderGroupRequest + */ + provider: number; +} + +/** + * Check if a given object implements the GoogleWorkspaceProviderGroupRequest interface. + */ +export function instanceOfGoogleWorkspaceProviderGroupRequest(value: object): value is GoogleWorkspaceProviderGroupRequest { + if (!('googleId' in value) || value['googleId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderGroupRequestFromJSON(json: any): GoogleWorkspaceProviderGroupRequest { + return GoogleWorkspaceProviderGroupRequestFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderGroupRequest { + if (json == null) { + return json; + } + return { + + 'googleId': json['google_id'], + 'group': json['group'], + 'provider': json['provider'], + }; +} + +export function GoogleWorkspaceProviderGroupRequestToJSON(json: any): GoogleWorkspaceProviderGroupRequest { + return GoogleWorkspaceProviderGroupRequestToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderGroupRequestToJSONTyped(value?: GoogleWorkspaceProviderGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'google_id': value['googleId'], + 'group': value['group'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderMapping.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderMapping.ts new file mode 100644 index 0000000000..f7be269437 --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleWorkspaceProviderMapping Serializer + * @export + * @interface GoogleWorkspaceProviderMapping + */ +export interface GoogleWorkspaceProviderMapping { + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + readonly pk: 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. + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + name: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof GoogleWorkspaceProviderMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the GoogleWorkspaceProviderMapping interface. + */ +export function instanceOfGoogleWorkspaceProviderMapping(value: object): value is GoogleWorkspaceProviderMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderMappingFromJSON(json: any): GoogleWorkspaceProviderMapping { + return GoogleWorkspaceProviderMappingFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function GoogleWorkspaceProviderMappingToJSON(json: any): GoogleWorkspaceProviderMapping { + return GoogleWorkspaceProviderMappingToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderMappingRequest.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderMappingRequest.ts new file mode 100644 index 0000000000..e85fdb519e --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleWorkspaceProviderMapping Serializer + * @export + * @interface GoogleWorkspaceProviderMappingRequest + */ +export interface GoogleWorkspaceProviderMappingRequest { + /** + * 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. + * @type {string} + * @memberof GoogleWorkspaceProviderMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the GoogleWorkspaceProviderMappingRequest interface. + */ +export function instanceOfGoogleWorkspaceProviderMappingRequest(value: object): value is GoogleWorkspaceProviderMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderMappingRequestFromJSON(json: any): GoogleWorkspaceProviderMappingRequest { + return GoogleWorkspaceProviderMappingRequestFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function GoogleWorkspaceProviderMappingRequestToJSON(json: any): GoogleWorkspaceProviderMappingRequest { + return GoogleWorkspaceProviderMappingRequestToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderMappingRequestToJSONTyped(value?: GoogleWorkspaceProviderMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderRequest.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderRequest.ts new file mode 100644 index 0000000000..32c930fd2a --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderRequest.ts @@ -0,0 +1,183 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction'; +import { + OutgoingSyncDeleteActionFromJSON, + OutgoingSyncDeleteActionFromJSONTyped, + OutgoingSyncDeleteActionToJSON, + OutgoingSyncDeleteActionToJSONTyped, +} from './OutgoingSyncDeleteAction'; + +/** + * GoogleWorkspaceProvider Serializer + * @export + * @interface GoogleWorkspaceProviderRequest + */ +export interface GoogleWorkspaceProviderRequest { + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderRequest + */ + name: string; + /** + * + * @type {Array} + * @memberof GoogleWorkspaceProviderRequest + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof GoogleWorkspaceProviderRequest + */ + propertyMappingsGroup?: Array; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderRequest + */ + delegatedSubject: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GoogleWorkspaceProviderRequest + */ + credentials: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderRequest + */ + scopes?: string; + /** + * + * @type {boolean} + * @memberof GoogleWorkspaceProviderRequest + */ + excludeUsersServiceAccount?: boolean; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderRequest + */ + filterGroup?: string | null; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof GoogleWorkspaceProviderRequest + */ + userDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof GoogleWorkspaceProviderRequest + */ + groupDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderRequest + */ + defaultGroupEmailDomain: string; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof GoogleWorkspaceProviderRequest + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof GoogleWorkspaceProviderRequest + */ + syncPageTimeout?: string; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof GoogleWorkspaceProviderRequest + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the GoogleWorkspaceProviderRequest interface. + */ +export function instanceOfGoogleWorkspaceProviderRequest(value: object): value is GoogleWorkspaceProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('delegatedSubject' in value) || value['delegatedSubject'] === undefined) return false; + if (!('credentials' in value) || value['credentials'] === undefined) return false; + if (!('defaultGroupEmailDomain' in value) || value['defaultGroupEmailDomain'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderRequestFromJSON(json: any): GoogleWorkspaceProviderRequest { + return GoogleWorkspaceProviderRequestFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'delegatedSubject': json['delegated_subject'], + 'credentials': json['credentials'], + 'scopes': json['scopes'] == null ? undefined : json['scopes'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'], + 'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']), + 'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']), + 'defaultGroupEmailDomain': json['default_group_email_domain'], + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function GoogleWorkspaceProviderRequestToJSON(json: any): GoogleWorkspaceProviderRequest { + return GoogleWorkspaceProviderRequestToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderRequestToJSONTyped(value?: GoogleWorkspaceProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'delegated_subject': value['delegatedSubject'], + 'credentials': value['credentials'], + 'scopes': value['scopes'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'filter_group': value['filterGroup'], + 'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']), + 'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']), + 'default_group_email_domain': value['defaultGroupEmailDomain'], + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderUser.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderUser.ts new file mode 100644 index 0000000000..ad287f17ab --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderUser.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * GoogleWorkspaceProviderUser Serializer + * @export + * @interface GoogleWorkspaceProviderUser + */ +export interface GoogleWorkspaceProviderUser { + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderUser + */ + readonly id: string; + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderUser + */ + googleId: string; + /** + * + * @type {number} + * @memberof GoogleWorkspaceProviderUser + */ + user: number; + /** + * + * @type {PartialUser} + * @memberof GoogleWorkspaceProviderUser + */ + readonly userObj: PartialUser; + /** + * + * @type {number} + * @memberof GoogleWorkspaceProviderUser + */ + provider: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GoogleWorkspaceProviderUser + */ + readonly attributes: { [key: string]: any; }; +} + +/** + * Check if a given object implements the GoogleWorkspaceProviderUser interface. + */ +export function instanceOfGoogleWorkspaceProviderUser(value: object): value is GoogleWorkspaceProviderUser { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('googleId' in value) || value['googleId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderUserFromJSON(json: any): GoogleWorkspaceProviderUser { + return GoogleWorkspaceProviderUserFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderUser { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'googleId': json['google_id'], + 'user': json['user'], + 'userObj': PartialUserFromJSON(json['user_obj']), + 'provider': json['provider'], + 'attributes': json['attributes'], + }; +} + +export function GoogleWorkspaceProviderUserToJSON(json: any): GoogleWorkspaceProviderUser { + return GoogleWorkspaceProviderUserToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderUserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'google_id': value['googleId'], + 'user': value['user'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/GoogleWorkspaceProviderUserRequest.ts b/packages/client-ts/src/models/GoogleWorkspaceProviderUserRequest.ts new file mode 100644 index 0000000000..ca99d012a3 --- /dev/null +++ b/packages/client-ts/src/models/GoogleWorkspaceProviderUserRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleWorkspaceProviderUser Serializer + * @export + * @interface GoogleWorkspaceProviderUserRequest + */ +export interface GoogleWorkspaceProviderUserRequest { + /** + * + * @type {string} + * @memberof GoogleWorkspaceProviderUserRequest + */ + googleId: string; + /** + * + * @type {number} + * @memberof GoogleWorkspaceProviderUserRequest + */ + user: number; + /** + * + * @type {number} + * @memberof GoogleWorkspaceProviderUserRequest + */ + provider: number; +} + +/** + * Check if a given object implements the GoogleWorkspaceProviderUserRequest interface. + */ +export function instanceOfGoogleWorkspaceProviderUserRequest(value: object): value is GoogleWorkspaceProviderUserRequest { + if (!('googleId' in value) || value['googleId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function GoogleWorkspaceProviderUserRequestFromJSON(json: any): GoogleWorkspaceProviderUserRequest { + return GoogleWorkspaceProviderUserRequestFromJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderUserRequest { + if (json == null) { + return json; + } + return { + + 'googleId': json['google_id'], + 'user': json['user'], + 'provider': json['provider'], + }; +} + +export function GoogleWorkspaceProviderUserRequestToJSON(json: any): GoogleWorkspaceProviderUserRequest { + return GoogleWorkspaceProviderUserRequestToJSONTyped(json, false); +} + +export function GoogleWorkspaceProviderUserRequestToJSONTyped(value?: GoogleWorkspaceProviderUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'google_id': value['googleId'], + 'user': value['user'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/Group.ts b/packages/client-ts/src/models/Group.ts new file mode 100644 index 0000000000..b8d0e3255c --- /dev/null +++ b/packages/client-ts/src/models/Group.ts @@ -0,0 +1,192 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { Role } from './Role'; +import { + RoleFromJSON, + RoleFromJSONTyped, + RoleToJSON, + RoleToJSONTyped, +} from './Role'; +import type { RelatedGroup } from './RelatedGroup'; +import { + RelatedGroupFromJSON, + RelatedGroupFromJSONTyped, + RelatedGroupToJSON, + RelatedGroupToJSONTyped, +} from './RelatedGroup'; + +/** + * Group Serializer + * @export + * @interface Group + */ +export interface Group { + /** + * + * @type {string} + * @memberof Group + */ + readonly pk: string; + /** + * + * @type {number} + * @memberof Group + */ + readonly numPk: number; + /** + * + * @type {string} + * @memberof Group + */ + name: string; + /** + * Users added to this group will be superusers. + * @type {boolean} + * @memberof Group + */ + isSuperuser?: boolean; + /** + * + * @type {Array} + * @memberof Group + */ + parents?: Array; + /** + * + * @type {Array} + * @memberof Group + */ + readonly parentsObj: Array | null; + /** + * + * @type {Array} + * @memberof Group + */ + users?: Array; + /** + * + * @type {Array} + * @memberof Group + */ + readonly usersObj: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Group + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof Group + */ + roles?: Array; + /** + * + * @type {Array} + * @memberof Group + */ + readonly rolesObj: Array; + /** + * + * @type {Array} + * @memberof Group + */ + readonly inheritedRolesObj: Array | null; + /** + * + * @type {Array} + * @memberof Group + */ + readonly children: Array; + /** + * + * @type {Array} + * @memberof Group + */ + readonly childrenObj: Array | null; +} + +/** + * Check if a given object implements the Group interface. + */ +export function instanceOfGroup(value: object): value is Group { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('numPk' in value) || value['numPk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('parentsObj' in value) || value['parentsObj'] === undefined) return false; + if (!('usersObj' in value) || value['usersObj'] === undefined) return false; + if (!('rolesObj' in value) || value['rolesObj'] === undefined) return false; + if (!('inheritedRolesObj' in value) || value['inheritedRolesObj'] === undefined) return false; + if (!('children' in value) || value['children'] === undefined) return false; + if (!('childrenObj' in value) || value['childrenObj'] === undefined) return false; + return true; +} + +export function GroupFromJSON(json: any): Group { + return GroupFromJSONTyped(json, false); +} + +export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Group { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'numPk': json['num_pk'], + 'name': json['name'], + 'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'], + 'parents': json['parents'] == null ? undefined : json['parents'], + 'parentsObj': (json['parents_obj'] == null ? null : (json['parents_obj'] as Array).map(RelatedGroupFromJSON)), + 'users': json['users'] == null ? undefined : json['users'], + 'usersObj': (json['users_obj'] == null ? null : (json['users_obj'] as Array).map(PartialUserFromJSON)), + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'roles': json['roles'] == null ? undefined : json['roles'], + 'rolesObj': ((json['roles_obj'] as Array).map(RoleFromJSON)), + 'inheritedRolesObj': (json['inherited_roles_obj'] == null ? null : (json['inherited_roles_obj'] as Array).map(RoleFromJSON)), + 'children': json['children'], + 'childrenObj': (json['children_obj'] == null ? null : (json['children_obj'] as Array).map(RelatedGroupFromJSON)), + }; +} + +export function GroupToJSON(json: any): Group { + return GroupToJSONTyped(json, false); +} + +export function GroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'is_superuser': value['isSuperuser'], + 'parents': value['parents'], + 'users': value['users'], + 'attributes': value['attributes'], + 'roles': value['roles'], + }; +} + diff --git a/packages/client-ts/src/models/GroupKerberosSourceConnection.ts b/packages/client-ts/src/models/GroupKerberosSourceConnection.ts new file mode 100644 index 0000000000..8d76ec3ede --- /dev/null +++ b/packages/client-ts/src/models/GroupKerberosSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupKerberosSourceConnection + */ +export interface GroupKerberosSourceConnection { + /** + * + * @type {number} + * @memberof GroupKerberosSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupKerberosSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupKerberosSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupKerberosSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupKerberosSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupKerberosSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupKerberosSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupKerberosSourceConnection interface. + */ +export function instanceOfGroupKerberosSourceConnection(value: object): value is GroupKerberosSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupKerberosSourceConnectionFromJSON(json: any): GroupKerberosSourceConnection { + return GroupKerberosSourceConnectionFromJSONTyped(json, false); +} + +export function GroupKerberosSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupKerberosSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupKerberosSourceConnectionToJSON(json: any): GroupKerberosSourceConnection { + return GroupKerberosSourceConnectionToJSONTyped(json, false); +} + +export function GroupKerberosSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupKerberosSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupKerberosSourceConnectionRequest.ts new file mode 100644 index 0000000000..1e14319537 --- /dev/null +++ b/packages/client-ts/src/models/GroupKerberosSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupKerberosSourceConnectionRequest + */ +export interface GroupKerberosSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupKerberosSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupKerberosSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupKerberosSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupKerberosSourceConnectionRequest interface. + */ +export function instanceOfGroupKerberosSourceConnectionRequest(value: object): value is GroupKerberosSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupKerberosSourceConnectionRequestFromJSON(json: any): GroupKerberosSourceConnectionRequest { + return GroupKerberosSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupKerberosSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupKerberosSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupKerberosSourceConnectionRequestToJSON(json: any): GroupKerberosSourceConnectionRequest { + return GroupKerberosSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupKerberosSourceConnectionRequestToJSONTyped(value?: GroupKerberosSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupLDAPSourceConnection.ts b/packages/client-ts/src/models/GroupLDAPSourceConnection.ts new file mode 100644 index 0000000000..866438094f --- /dev/null +++ b/packages/client-ts/src/models/GroupLDAPSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupLDAPSourceConnection + */ +export interface GroupLDAPSourceConnection { + /** + * + * @type {number} + * @memberof GroupLDAPSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupLDAPSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupLDAPSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupLDAPSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupLDAPSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupLDAPSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupLDAPSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupLDAPSourceConnection interface. + */ +export function instanceOfGroupLDAPSourceConnection(value: object): value is GroupLDAPSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupLDAPSourceConnectionFromJSON(json: any): GroupLDAPSourceConnection { + return GroupLDAPSourceConnectionFromJSONTyped(json, false); +} + +export function GroupLDAPSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupLDAPSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupLDAPSourceConnectionToJSON(json: any): GroupLDAPSourceConnection { + return GroupLDAPSourceConnectionToJSONTyped(json, false); +} + +export function GroupLDAPSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupLDAPSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupLDAPSourceConnectionRequest.ts new file mode 100644 index 0000000000..d8218cbcc2 --- /dev/null +++ b/packages/client-ts/src/models/GroupLDAPSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupLDAPSourceConnectionRequest + */ +export interface GroupLDAPSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupLDAPSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupLDAPSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupLDAPSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupLDAPSourceConnectionRequest interface. + */ +export function instanceOfGroupLDAPSourceConnectionRequest(value: object): value is GroupLDAPSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupLDAPSourceConnectionRequestFromJSON(json: any): GroupLDAPSourceConnectionRequest { + return GroupLDAPSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupLDAPSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupLDAPSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupLDAPSourceConnectionRequestToJSON(json: any): GroupLDAPSourceConnectionRequest { + return GroupLDAPSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupLDAPSourceConnectionRequestToJSONTyped(value?: GroupLDAPSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupMatchingModeEnum.ts b/packages/client-ts/src/models/GroupMatchingModeEnum.ts new file mode 100644 index 0000000000..24799a31c0 --- /dev/null +++ b/packages/client-ts/src/models/GroupMatchingModeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const GroupMatchingModeEnum = { + Identifier: 'identifier', + NameLink: 'name_link', + NameDeny: 'name_deny', + UnknownDefaultOpenApi: '11184809' +} as const; +export type GroupMatchingModeEnum = typeof GroupMatchingModeEnum[keyof typeof GroupMatchingModeEnum]; + + +export function instanceOfGroupMatchingModeEnum(value: any): boolean { + for (const key in GroupMatchingModeEnum) { + if (Object.prototype.hasOwnProperty.call(GroupMatchingModeEnum, key)) { + if (GroupMatchingModeEnum[key as keyof typeof GroupMatchingModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function GroupMatchingModeEnumFromJSON(json: any): GroupMatchingModeEnum { + return GroupMatchingModeEnumFromJSONTyped(json, false); +} + +export function GroupMatchingModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupMatchingModeEnum { + return json as GroupMatchingModeEnum; +} + +export function GroupMatchingModeEnumToJSON(value?: GroupMatchingModeEnum | null): any { + return value as any; +} + +export function GroupMatchingModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): GroupMatchingModeEnum { + return value as GroupMatchingModeEnum; +} + diff --git a/packages/client-ts/src/models/GroupOAuthSourceConnection.ts b/packages/client-ts/src/models/GroupOAuthSourceConnection.ts new file mode 100644 index 0000000000..a9e9358ec5 --- /dev/null +++ b/packages/client-ts/src/models/GroupOAuthSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupOAuthSourceConnection + */ +export interface GroupOAuthSourceConnection { + /** + * + * @type {number} + * @memberof GroupOAuthSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupOAuthSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupOAuthSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupOAuthSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupOAuthSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupOAuthSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupOAuthSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupOAuthSourceConnection interface. + */ +export function instanceOfGroupOAuthSourceConnection(value: object): value is GroupOAuthSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupOAuthSourceConnectionFromJSON(json: any): GroupOAuthSourceConnection { + return GroupOAuthSourceConnectionFromJSONTyped(json, false); +} + +export function GroupOAuthSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupOAuthSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupOAuthSourceConnectionToJSON(json: any): GroupOAuthSourceConnection { + return GroupOAuthSourceConnectionToJSONTyped(json, false); +} + +export function GroupOAuthSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupOAuthSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupOAuthSourceConnectionRequest.ts new file mode 100644 index 0000000000..9853a4bded --- /dev/null +++ b/packages/client-ts/src/models/GroupOAuthSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupOAuthSourceConnectionRequest + */ +export interface GroupOAuthSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupOAuthSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupOAuthSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupOAuthSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupOAuthSourceConnectionRequest interface. + */ +export function instanceOfGroupOAuthSourceConnectionRequest(value: object): value is GroupOAuthSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupOAuthSourceConnectionRequestFromJSON(json: any): GroupOAuthSourceConnectionRequest { + return GroupOAuthSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupOAuthSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupOAuthSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupOAuthSourceConnectionRequestToJSON(json: any): GroupOAuthSourceConnectionRequest { + return GroupOAuthSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupOAuthSourceConnectionRequestToJSONTyped(value?: GroupOAuthSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupPlexSourceConnection.ts b/packages/client-ts/src/models/GroupPlexSourceConnection.ts new file mode 100644 index 0000000000..c89de13a2b --- /dev/null +++ b/packages/client-ts/src/models/GroupPlexSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupPlexSourceConnection + */ +export interface GroupPlexSourceConnection { + /** + * + * @type {number} + * @memberof GroupPlexSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupPlexSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupPlexSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupPlexSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupPlexSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupPlexSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupPlexSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupPlexSourceConnection interface. + */ +export function instanceOfGroupPlexSourceConnection(value: object): value is GroupPlexSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupPlexSourceConnectionFromJSON(json: any): GroupPlexSourceConnection { + return GroupPlexSourceConnectionFromJSONTyped(json, false); +} + +export function GroupPlexSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupPlexSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupPlexSourceConnectionToJSON(json: any): GroupPlexSourceConnection { + return GroupPlexSourceConnectionToJSONTyped(json, false); +} + +export function GroupPlexSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupPlexSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupPlexSourceConnectionRequest.ts new file mode 100644 index 0000000000..e7d7946956 --- /dev/null +++ b/packages/client-ts/src/models/GroupPlexSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupPlexSourceConnectionRequest + */ +export interface GroupPlexSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupPlexSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupPlexSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupPlexSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupPlexSourceConnectionRequest interface. + */ +export function instanceOfGroupPlexSourceConnectionRequest(value: object): value is GroupPlexSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupPlexSourceConnectionRequestFromJSON(json: any): GroupPlexSourceConnectionRequest { + return GroupPlexSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupPlexSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupPlexSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupPlexSourceConnectionRequestToJSON(json: any): GroupPlexSourceConnectionRequest { + return GroupPlexSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupPlexSourceConnectionRequestToJSONTyped(value?: GroupPlexSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupRequest.ts b/packages/client-ts/src/models/GroupRequest.ts new file mode 100644 index 0000000000..09318aed52 --- /dev/null +++ b/packages/client-ts/src/models/GroupRequest.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Serializer + * @export + * @interface GroupRequest + */ +export interface GroupRequest { + /** + * + * @type {string} + * @memberof GroupRequest + */ + name: string; + /** + * Users added to this group will be superusers. + * @type {boolean} + * @memberof GroupRequest + */ + isSuperuser?: boolean; + /** + * + * @type {Array} + * @memberof GroupRequest + */ + parents?: Array; + /** + * + * @type {Array} + * @memberof GroupRequest + */ + users?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GroupRequest + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof GroupRequest + */ + roles?: Array; +} + +/** + * Check if a given object implements the GroupRequest interface. + */ +export function instanceOfGroupRequest(value: object): value is GroupRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function GroupRequestFromJSON(json: any): GroupRequest { + return GroupRequestFromJSONTyped(json, false); +} + +export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'], + 'parents': json['parents'] == null ? undefined : json['parents'], + 'users': json['users'] == null ? undefined : json['users'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'roles': json['roles'] == null ? undefined : json['roles'], + }; +} + +export function GroupRequestToJSON(json: any): GroupRequest { + return GroupRequestToJSONTyped(json, false); +} + +export function GroupRequestToJSONTyped(value?: GroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'is_superuser': value['isSuperuser'], + 'parents': value['parents'], + 'users': value['users'], + 'attributes': value['attributes'], + 'roles': value['roles'], + }; +} + diff --git a/packages/client-ts/src/models/GroupSAMLSourceConnection.ts b/packages/client-ts/src/models/GroupSAMLSourceConnection.ts new file mode 100644 index 0000000000..52748df997 --- /dev/null +++ b/packages/client-ts/src/models/GroupSAMLSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupSAMLSourceConnection + */ +export interface GroupSAMLSourceConnection { + /** + * + * @type {number} + * @memberof GroupSAMLSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupSAMLSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupSAMLSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupSAMLSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupSAMLSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupSAMLSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupSAMLSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupSAMLSourceConnection interface. + */ +export function instanceOfGroupSAMLSourceConnection(value: object): value is GroupSAMLSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupSAMLSourceConnectionFromJSON(json: any): GroupSAMLSourceConnection { + return GroupSAMLSourceConnectionFromJSONTyped(json, false); +} + +export function GroupSAMLSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupSAMLSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupSAMLSourceConnectionToJSON(json: any): GroupSAMLSourceConnection { + return GroupSAMLSourceConnectionToJSONTyped(json, false); +} + +export function GroupSAMLSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupSAMLSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupSAMLSourceConnectionRequest.ts new file mode 100644 index 0000000000..ff8b32f045 --- /dev/null +++ b/packages/client-ts/src/models/GroupSAMLSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupSAMLSourceConnectionRequest + */ +export interface GroupSAMLSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupSAMLSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupSAMLSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupSAMLSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupSAMLSourceConnectionRequest interface. + */ +export function instanceOfGroupSAMLSourceConnectionRequest(value: object): value is GroupSAMLSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupSAMLSourceConnectionRequestFromJSON(json: any): GroupSAMLSourceConnectionRequest { + return GroupSAMLSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupSAMLSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupSAMLSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupSAMLSourceConnectionRequestToJSON(json: any): GroupSAMLSourceConnectionRequest { + return GroupSAMLSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupSAMLSourceConnectionRequestToJSONTyped(value?: GroupSAMLSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupSourceConnection.ts b/packages/client-ts/src/models/GroupSourceConnection.ts new file mode 100644 index 0000000000..754f31dc8e --- /dev/null +++ b/packages/client-ts/src/models/GroupSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupSourceConnection + */ +export interface GroupSourceConnection { + /** + * + * @type {number} + * @memberof GroupSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupSourceConnection interface. + */ +export function instanceOfGroupSourceConnection(value: object): value is GroupSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupSourceConnectionFromJSON(json: any): GroupSourceConnection { + return GroupSourceConnectionFromJSONTyped(json, false); +} + +export function GroupSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupSourceConnectionToJSON(json: any): GroupSourceConnection { + return GroupSourceConnectionToJSONTyped(json, false); +} + +export function GroupSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupSourceConnectionRequest.ts new file mode 100644 index 0000000000..0b0fdb4769 --- /dev/null +++ b/packages/client-ts/src/models/GroupSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupSourceConnectionRequest + */ +export interface GroupSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupSourceConnectionRequest interface. + */ +export function instanceOfGroupSourceConnectionRequest(value: object): value is GroupSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupSourceConnectionRequestFromJSON(json: any): GroupSourceConnectionRequest { + return GroupSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupSourceConnectionRequestToJSON(json: any): GroupSourceConnectionRequest { + return GroupSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupSourceConnectionRequestToJSONTyped(value?: GroupSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupTelegramSourceConnection.ts b/packages/client-ts/src/models/GroupTelegramSourceConnection.ts new file mode 100644 index 0000000000..2c7b9d8692 --- /dev/null +++ b/packages/client-ts/src/models/GroupTelegramSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * Group Source Connection + * @export + * @interface GroupTelegramSourceConnection + */ +export interface GroupTelegramSourceConnection { + /** + * + * @type {number} + * @memberof GroupTelegramSourceConnection + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof GroupTelegramSourceConnection + */ + group: string; + /** + * + * @type {string} + * @memberof GroupTelegramSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof GroupTelegramSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof GroupTelegramSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof GroupTelegramSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof GroupTelegramSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the GroupTelegramSourceConnection interface. + */ +export function instanceOfGroupTelegramSourceConnection(value: object): value is GroupTelegramSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function GroupTelegramSourceConnectionFromJSON(json: any): GroupTelegramSourceConnection { + return GroupTelegramSourceConnectionFromJSONTyped(json, false); +} + +export function GroupTelegramSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupTelegramSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'group': json['group'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function GroupTelegramSourceConnectionToJSON(json: any): GroupTelegramSourceConnection { + return GroupTelegramSourceConnectionToJSONTyped(json, false); +} + +export function GroupTelegramSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/GroupTelegramSourceConnectionRequest.ts b/packages/client-ts/src/models/GroupTelegramSourceConnectionRequest.ts new file mode 100644 index 0000000000..65533dd480 --- /dev/null +++ b/packages/client-ts/src/models/GroupTelegramSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface GroupTelegramSourceConnectionRequest + */ +export interface GroupTelegramSourceConnectionRequest { + /** + * + * @type {string} + * @memberof GroupTelegramSourceConnectionRequest + */ + group: string; + /** + * + * @type {string} + * @memberof GroupTelegramSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof GroupTelegramSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the GroupTelegramSourceConnectionRequest interface. + */ +export function instanceOfGroupTelegramSourceConnectionRequest(value: object): value is GroupTelegramSourceConnectionRequest { + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function GroupTelegramSourceConnectionRequestFromJSON(json: any): GroupTelegramSourceConnectionRequest { + return GroupTelegramSourceConnectionRequestFromJSONTyped(json, false); +} + +export function GroupTelegramSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupTelegramSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function GroupTelegramSourceConnectionRequestToJSON(json: any): GroupTelegramSourceConnectionRequest { + return GroupTelegramSourceConnectionRequestToJSONTyped(json, false); +} + +export function GroupTelegramSourceConnectionRequestToJSONTyped(value?: GroupTelegramSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/Hardware.ts b/packages/client-ts/src/models/Hardware.ts new file mode 100644 index 0000000000..e97101aef0 --- /dev/null +++ b/packages/client-ts/src/models/Hardware.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Hardware + */ +export interface Hardware { + /** + * + * @type {string} + * @memberof Hardware + */ + model?: string; + /** + * + * @type {string} + * @memberof Hardware + */ + manufacturer?: string; + /** + * + * @type {string} + * @memberof Hardware + */ + serial: string; + /** + * + * @type {string} + * @memberof Hardware + */ + cpuName?: string; + /** + * + * @type {number} + * @memberof Hardware + */ + cpuCount?: number; + /** + * + * @type {number} + * @memberof Hardware + */ + memoryBytes?: number; +} + +/** + * Check if a given object implements the Hardware interface. + */ +export function instanceOfHardware(value: object): value is Hardware { + if (!('serial' in value) || value['serial'] === undefined) return false; + return true; +} + +export function HardwareFromJSON(json: any): Hardware { + return HardwareFromJSONTyped(json, false); +} + +export function HardwareFromJSONTyped(json: any, ignoreDiscriminator: boolean): Hardware { + if (json == null) { + return json; + } + return { + + 'model': json['model'] == null ? undefined : json['model'], + 'manufacturer': json['manufacturer'] == null ? undefined : json['manufacturer'], + 'serial': json['serial'], + 'cpuName': json['cpu_name'] == null ? undefined : json['cpu_name'], + 'cpuCount': json['cpu_count'] == null ? undefined : json['cpu_count'], + 'memoryBytes': json['memory_bytes'] == null ? undefined : json['memory_bytes'], + }; +} + +export function HardwareToJSON(json: any): Hardware { + return HardwareToJSONTyped(json, false); +} + +export function HardwareToJSONTyped(value?: Hardware | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'model': value['model'], + 'manufacturer': value['manufacturer'], + 'serial': value['serial'], + 'cpu_name': value['cpuName'], + 'cpu_count': value['cpuCount'], + 'memory_bytes': value['memoryBytes'], + }; +} + diff --git a/packages/client-ts/src/models/HardwareRequest.ts b/packages/client-ts/src/models/HardwareRequest.ts new file mode 100644 index 0000000000..08102f18fd --- /dev/null +++ b/packages/client-ts/src/models/HardwareRequest.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface HardwareRequest + */ +export interface HardwareRequest { + /** + * + * @type {string} + * @memberof HardwareRequest + */ + model?: string; + /** + * + * @type {string} + * @memberof HardwareRequest + */ + manufacturer?: string; + /** + * + * @type {string} + * @memberof HardwareRequest + */ + serial: string; + /** + * + * @type {string} + * @memberof HardwareRequest + */ + cpuName?: string; + /** + * + * @type {number} + * @memberof HardwareRequest + */ + cpuCount?: number; + /** + * + * @type {number} + * @memberof HardwareRequest + */ + memoryBytes?: number; +} + +/** + * Check if a given object implements the HardwareRequest interface. + */ +export function instanceOfHardwareRequest(value: object): value is HardwareRequest { + if (!('serial' in value) || value['serial'] === undefined) return false; + return true; +} + +export function HardwareRequestFromJSON(json: any): HardwareRequest { + return HardwareRequestFromJSONTyped(json, false); +} + +export function HardwareRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): HardwareRequest { + if (json == null) { + return json; + } + return { + + 'model': json['model'] == null ? undefined : json['model'], + 'manufacturer': json['manufacturer'] == null ? undefined : json['manufacturer'], + 'serial': json['serial'], + 'cpuName': json['cpu_name'] == null ? undefined : json['cpu_name'], + 'cpuCount': json['cpu_count'] == null ? undefined : json['cpu_count'], + 'memoryBytes': json['memory_bytes'] == null ? undefined : json['memory_bytes'], + }; +} + +export function HardwareRequestToJSON(json: any): HardwareRequest { + return HardwareRequestToJSONTyped(json, false); +} + +export function HardwareRequestToJSONTyped(value?: HardwareRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'model': value['model'], + 'manufacturer': value['manufacturer'], + 'serial': value['serial'], + 'cpu_name': value['cpuName'], + 'cpu_count': value['cpuCount'], + 'memory_bytes': value['memoryBytes'], + }; +} + diff --git a/packages/client-ts/src/models/IdentificationChallenge.ts b/packages/client-ts/src/models/IdentificationChallenge.ts new file mode 100644 index 0000000000..b21faf5514 --- /dev/null +++ b/packages/client-ts/src/models/IdentificationChallenge.ts @@ -0,0 +1,252 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; +import type { FlowDesignationEnum } from './FlowDesignationEnum'; +import { + FlowDesignationEnumFromJSON, + FlowDesignationEnumFromJSONTyped, + FlowDesignationEnumToJSON, + FlowDesignationEnumToJSONTyped, +} from './FlowDesignationEnum'; +import type { LoginSource } from './LoginSource'; +import { + LoginSourceFromJSON, + LoginSourceFromJSONTyped, + LoginSourceToJSON, + LoginSourceToJSONTyped, +} from './LoginSource'; +import type { CaptchaChallenge } from './CaptchaChallenge'; +import { + CaptchaChallengeFromJSON, + CaptchaChallengeFromJSONTyped, + CaptchaChallengeToJSON, + CaptchaChallengeToJSONTyped, +} from './CaptchaChallenge'; + +/** + * Identification challenges with all UI elements + * @export + * @interface IdentificationChallenge + */ +export interface IdentificationChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof IdentificationChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof IdentificationChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {Array} + * @memberof IdentificationChallenge + */ + userFields: Array | null; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + pendingUserIdentifier?: string | null; + /** + * + * @type {boolean} + * @memberof IdentificationChallenge + */ + passwordFields: boolean; + /** + * + * @type {boolean} + * @memberof IdentificationChallenge + */ + allowShowPassword?: boolean; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + applicationPre?: string; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + applicationPreLaunch?: string; + /** + * + * @type {FlowDesignationEnum} + * @memberof IdentificationChallenge + */ + flowDesignation: FlowDesignationEnum; + /** + * + * @type {CaptchaChallenge} + * @memberof IdentificationChallenge + */ + captchaStage?: CaptchaChallenge | null; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + enrollUrl?: string; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + recoveryUrl?: string; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + passwordlessUrl?: string; + /** + * + * @type {string} + * @memberof IdentificationChallenge + */ + primaryAction: string; + /** + * + * @type {Array} + * @memberof IdentificationChallenge + */ + sources?: Array; + /** + * + * @type {boolean} + * @memberof IdentificationChallenge + */ + showSourceLabels: boolean; + /** + * + * @type {boolean} + * @memberof IdentificationChallenge + */ + enableRememberMe?: boolean; + /** + * + * @type {{ [key: string]: any; }} + * @memberof IdentificationChallenge + */ + passkeyChallenge?: { [key: string]: any; } | null; +} + + + +/** + * Check if a given object implements the IdentificationChallenge interface. + */ +export function instanceOfIdentificationChallenge(value: object): value is IdentificationChallenge { + if (!('userFields' in value) || value['userFields'] === undefined) return false; + if (!('passwordFields' in value) || value['passwordFields'] === undefined) return false; + if (!('flowDesignation' in value) || value['flowDesignation'] === undefined) return false; + if (!('primaryAction' in value) || value['primaryAction'] === undefined) return false; + if (!('showSourceLabels' in value) || value['showSourceLabels'] === undefined) return false; + return true; +} + +export function IdentificationChallengeFromJSON(json: any): IdentificationChallenge { + return IdentificationChallengeFromJSONTyped(json, false); +} + +export function IdentificationChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentificationChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'userFields': json['user_fields'] == null ? null : json['user_fields'], + 'pendingUserIdentifier': json['pending_user_identifier'] == null ? undefined : json['pending_user_identifier'], + 'passwordFields': json['password_fields'], + 'allowShowPassword': json['allow_show_password'] == null ? undefined : json['allow_show_password'], + 'applicationPre': json['application_pre'] == null ? undefined : json['application_pre'], + 'applicationPreLaunch': json['application_pre_launch'] == null ? undefined : json['application_pre_launch'], + 'flowDesignation': FlowDesignationEnumFromJSON(json['flow_designation']), + 'captchaStage': json['captcha_stage'] == null ? undefined : CaptchaChallengeFromJSON(json['captcha_stage']), + 'enrollUrl': json['enroll_url'] == null ? undefined : json['enroll_url'], + 'recoveryUrl': json['recovery_url'] == null ? undefined : json['recovery_url'], + 'passwordlessUrl': json['passwordless_url'] == null ? undefined : json['passwordless_url'], + 'primaryAction': json['primary_action'], + 'sources': json['sources'] == null ? undefined : ((json['sources'] as Array).map(LoginSourceFromJSON)), + 'showSourceLabels': json['show_source_labels'], + 'enableRememberMe': json['enable_remember_me'] == null ? undefined : json['enable_remember_me'], + 'passkeyChallenge': json['passkey_challenge'] == null ? undefined : json['passkey_challenge'], + }; +} + +export function IdentificationChallengeToJSON(json: any): IdentificationChallenge { + return IdentificationChallengeToJSONTyped(json, false); +} + +export function IdentificationChallengeToJSONTyped(value?: IdentificationChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'user_fields': value['userFields'], + 'pending_user_identifier': value['pendingUserIdentifier'], + 'password_fields': value['passwordFields'], + 'allow_show_password': value['allowShowPassword'], + 'application_pre': value['applicationPre'], + 'application_pre_launch': value['applicationPreLaunch'], + 'flow_designation': FlowDesignationEnumToJSON(value['flowDesignation']), + 'captcha_stage': CaptchaChallengeToJSON(value['captchaStage']), + 'enroll_url': value['enrollUrl'], + 'recovery_url': value['recoveryUrl'], + 'passwordless_url': value['passwordlessUrl'], + 'primary_action': value['primaryAction'], + 'sources': value['sources'] == null ? undefined : ((value['sources'] as Array).map(LoginSourceToJSON)), + 'show_source_labels': value['showSourceLabels'], + 'enable_remember_me': value['enableRememberMe'], + 'passkey_challenge': value['passkeyChallenge'], + }; +} + diff --git a/packages/client-ts/src/models/IdentificationChallengeResponseRequest.ts b/packages/client-ts/src/models/IdentificationChallengeResponseRequest.ts new file mode 100644 index 0000000000..5f4a65b601 --- /dev/null +++ b/packages/client-ts/src/models/IdentificationChallengeResponseRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Identification challenge + * @export + * @interface IdentificationChallengeResponseRequest + */ +export interface IdentificationChallengeResponseRequest { + /** + * + * @type {string} + * @memberof IdentificationChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof IdentificationChallengeResponseRequest + */ + uidField?: string | null; + /** + * + * @type {string} + * @memberof IdentificationChallengeResponseRequest + */ + password?: string | null; + /** + * + * @type {string} + * @memberof IdentificationChallengeResponseRequest + */ + captchaToken?: string | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof IdentificationChallengeResponseRequest + */ + passkey?: { [key: string]: any; } | null; +} + +/** + * Check if a given object implements the IdentificationChallengeResponseRequest interface. + */ +export function instanceOfIdentificationChallengeResponseRequest(value: object): value is IdentificationChallengeResponseRequest { + return true; +} + +export function IdentificationChallengeResponseRequestFromJSON(json: any): IdentificationChallengeResponseRequest { + return IdentificationChallengeResponseRequestFromJSONTyped(json, false); +} + +export function IdentificationChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentificationChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'uidField': json['uid_field'] == null ? undefined : json['uid_field'], + 'password': json['password'] == null ? undefined : json['password'], + 'captchaToken': json['captcha_token'] == null ? undefined : json['captcha_token'], + 'passkey': json['passkey'] == null ? undefined : json['passkey'], + }; +} + +export function IdentificationChallengeResponseRequestToJSON(json: any): IdentificationChallengeResponseRequest { + return IdentificationChallengeResponseRequestToJSONTyped(json, false); +} + +export function IdentificationChallengeResponseRequestToJSONTyped(value?: IdentificationChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'uid_field': value['uidField'], + 'password': value['password'], + 'captcha_token': value['captchaToken'], + 'passkey': value['passkey'], + }; +} + diff --git a/packages/client-ts/src/models/IdentificationStage.ts b/packages/client-ts/src/models/IdentificationStage.ts new file mode 100644 index 0000000000..3eef13eb9a --- /dev/null +++ b/packages/client-ts/src/models/IdentificationStage.ts @@ -0,0 +1,233 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserFieldsEnum } from './UserFieldsEnum'; +import { + UserFieldsEnumFromJSON, + UserFieldsEnumFromJSONTyped, + UserFieldsEnumToJSON, + UserFieldsEnumToJSONTyped, +} from './UserFieldsEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * IdentificationStage Serializer + * @export + * @interface IdentificationStage + */ +export interface IdentificationStage { + /** + * + * @type {string} + * @memberof IdentificationStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof IdentificationStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof IdentificationStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof IdentificationStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof IdentificationStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof IdentificationStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof IdentificationStage + */ + readonly flowSet: Array; + /** + * Fields of the user object to match against. (Hold shift to select multiple options) + * @type {Array} + * @memberof IdentificationStage + */ + userFields?: Array; + /** + * When set, shows a password field, instead of showing the password field as separate step. + * @type {string} + * @memberof IdentificationStage + */ + passwordStage?: string | null; + /** + * When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage. + * @type {string} + * @memberof IdentificationStage + */ + captchaStage?: string | null; + /** + * When enabled, user fields are matched regardless of their casing. + * @type {boolean} + * @memberof IdentificationStage + */ + caseInsensitiveMatching?: boolean; + /** + * 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 + * @type {boolean} + * @memberof IdentificationStage + */ + showMatchedUser?: boolean; + /** + * Optional enrollment flow, which is linked at the bottom of the page. + * @type {string} + * @memberof IdentificationStage + */ + enrollmentFlow?: string | null; + /** + * Optional recovery flow, which is linked at the bottom of the page. + * @type {string} + * @memberof IdentificationStage + */ + recoveryFlow?: string | null; + /** + * Optional passwordless flow, which is linked at the bottom of the page. + * @type {string} + * @memberof IdentificationStage + */ + passwordlessFlow?: string | null; + /** + * Specify which sources should be shown. + * @type {Array} + * @memberof IdentificationStage + */ + sources?: Array; + /** + * + * @type {boolean} + * @memberof IdentificationStage + */ + showSourceLabels?: boolean; + /** + * When enabled, the stage will succeed and continue even when incorrect user info is entered. + * @type {boolean} + * @memberof IdentificationStage + */ + pretendUserExists?: boolean; + /** + * Show the user the 'Remember me on this device' toggle, allowing repeat users to skip straight to entering their password. + * @type {boolean} + * @memberof IdentificationStage + */ + enableRememberMe?: boolean; + /** + * When set, and conditional WebAuthn is available, allow the user to use their passkey as a first factor. + * @type {string} + * @memberof IdentificationStage + */ + webauthnStage?: string | null; +} + +/** + * Check if a given object implements the IdentificationStage interface. + */ +export function instanceOfIdentificationStage(value: object): value is IdentificationStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function IdentificationStageFromJSON(json: any): IdentificationStage { + return IdentificationStageFromJSONTyped(json, false); +} + +export function IdentificationStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentificationStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'userFields': json['user_fields'] == null ? undefined : ((json['user_fields'] as Array).map(UserFieldsEnumFromJSON)), + 'passwordStage': json['password_stage'] == null ? undefined : json['password_stage'], + 'captchaStage': json['captcha_stage'] == null ? undefined : json['captcha_stage'], + 'caseInsensitiveMatching': json['case_insensitive_matching'] == null ? undefined : json['case_insensitive_matching'], + 'showMatchedUser': json['show_matched_user'] == null ? undefined : json['show_matched_user'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'recoveryFlow': json['recovery_flow'] == null ? undefined : json['recovery_flow'], + 'passwordlessFlow': json['passwordless_flow'] == null ? undefined : json['passwordless_flow'], + 'sources': json['sources'] == null ? undefined : json['sources'], + 'showSourceLabels': json['show_source_labels'] == null ? undefined : json['show_source_labels'], + 'pretendUserExists': json['pretend_user_exists'] == null ? undefined : json['pretend_user_exists'], + 'enableRememberMe': json['enable_remember_me'] == null ? undefined : json['enable_remember_me'], + 'webauthnStage': json['webauthn_stage'] == null ? undefined : json['webauthn_stage'], + }; +} + +export function IdentificationStageToJSON(json: any): IdentificationStage { + return IdentificationStageToJSONTyped(json, false); +} + +export function IdentificationStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'user_fields': value['userFields'] == null ? undefined : ((value['userFields'] as Array).map(UserFieldsEnumToJSON)), + 'password_stage': value['passwordStage'], + 'captcha_stage': value['captchaStage'], + 'case_insensitive_matching': value['caseInsensitiveMatching'], + 'show_matched_user': value['showMatchedUser'], + 'enrollment_flow': value['enrollmentFlow'], + 'recovery_flow': value['recoveryFlow'], + 'passwordless_flow': value['passwordlessFlow'], + 'sources': value['sources'], + 'show_source_labels': value['showSourceLabels'], + 'pretend_user_exists': value['pretendUserExists'], + 'enable_remember_me': value['enableRememberMe'], + 'webauthn_stage': value['webauthnStage'], + }; +} + diff --git a/packages/client-ts/src/models/IdentificationStageRequest.ts b/packages/client-ts/src/models/IdentificationStageRequest.ts new file mode 100644 index 0000000000..23f7fe86fc --- /dev/null +++ b/packages/client-ts/src/models/IdentificationStageRequest.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserFieldsEnum } from './UserFieldsEnum'; +import { + UserFieldsEnumFromJSON, + UserFieldsEnumFromJSONTyped, + UserFieldsEnumToJSON, + UserFieldsEnumToJSONTyped, +} from './UserFieldsEnum'; + +/** + * IdentificationStage Serializer + * @export + * @interface IdentificationStageRequest + */ +export interface IdentificationStageRequest { + /** + * + * @type {string} + * @memberof IdentificationStageRequest + */ + name: string; + /** + * Fields of the user object to match against. (Hold shift to select multiple options) + * @type {Array} + * @memberof IdentificationStageRequest + */ + userFields?: Array; + /** + * When set, shows a password field, instead of showing the password field as separate step. + * @type {string} + * @memberof IdentificationStageRequest + */ + passwordStage?: string | null; + /** + * When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage. + * @type {string} + * @memberof IdentificationStageRequest + */ + captchaStage?: string | null; + /** + * When enabled, user fields are matched regardless of their casing. + * @type {boolean} + * @memberof IdentificationStageRequest + */ + caseInsensitiveMatching?: boolean; + /** + * 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 + * @type {boolean} + * @memberof IdentificationStageRequest + */ + showMatchedUser?: boolean; + /** + * Optional enrollment flow, which is linked at the bottom of the page. + * @type {string} + * @memberof IdentificationStageRequest + */ + enrollmentFlow?: string | null; + /** + * Optional recovery flow, which is linked at the bottom of the page. + * @type {string} + * @memberof IdentificationStageRequest + */ + recoveryFlow?: string | null; + /** + * Optional passwordless flow, which is linked at the bottom of the page. + * @type {string} + * @memberof IdentificationStageRequest + */ + passwordlessFlow?: string | null; + /** + * Specify which sources should be shown. + * @type {Array} + * @memberof IdentificationStageRequest + */ + sources?: Array; + /** + * + * @type {boolean} + * @memberof IdentificationStageRequest + */ + showSourceLabels?: boolean; + /** + * When enabled, the stage will succeed and continue even when incorrect user info is entered. + * @type {boolean} + * @memberof IdentificationStageRequest + */ + pretendUserExists?: boolean; + /** + * Show the user the 'Remember me on this device' toggle, allowing repeat users to skip straight to entering their password. + * @type {boolean} + * @memberof IdentificationStageRequest + */ + enableRememberMe?: boolean; + /** + * When set, and conditional WebAuthn is available, allow the user to use their passkey as a first factor. + * @type {string} + * @memberof IdentificationStageRequest + */ + webauthnStage?: string | null; +} + +/** + * Check if a given object implements the IdentificationStageRequest interface. + */ +export function instanceOfIdentificationStageRequest(value: object): value is IdentificationStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function IdentificationStageRequestFromJSON(json: any): IdentificationStageRequest { + return IdentificationStageRequestFromJSONTyped(json, false); +} + +export function IdentificationStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentificationStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'userFields': json['user_fields'] == null ? undefined : ((json['user_fields'] as Array).map(UserFieldsEnumFromJSON)), + 'passwordStage': json['password_stage'] == null ? undefined : json['password_stage'], + 'captchaStage': json['captcha_stage'] == null ? undefined : json['captcha_stage'], + 'caseInsensitiveMatching': json['case_insensitive_matching'] == null ? undefined : json['case_insensitive_matching'], + 'showMatchedUser': json['show_matched_user'] == null ? undefined : json['show_matched_user'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'recoveryFlow': json['recovery_flow'] == null ? undefined : json['recovery_flow'], + 'passwordlessFlow': json['passwordless_flow'] == null ? undefined : json['passwordless_flow'], + 'sources': json['sources'] == null ? undefined : json['sources'], + 'showSourceLabels': json['show_source_labels'] == null ? undefined : json['show_source_labels'], + 'pretendUserExists': json['pretend_user_exists'] == null ? undefined : json['pretend_user_exists'], + 'enableRememberMe': json['enable_remember_me'] == null ? undefined : json['enable_remember_me'], + 'webauthnStage': json['webauthn_stage'] == null ? undefined : json['webauthn_stage'], + }; +} + +export function IdentificationStageRequestToJSON(json: any): IdentificationStageRequest { + return IdentificationStageRequestToJSONTyped(json, false); +} + +export function IdentificationStageRequestToJSONTyped(value?: IdentificationStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'user_fields': value['userFields'] == null ? undefined : ((value['userFields'] as Array).map(UserFieldsEnumToJSON)), + 'password_stage': value['passwordStage'], + 'captcha_stage': value['captchaStage'], + 'case_insensitive_matching': value['caseInsensitiveMatching'], + 'show_matched_user': value['showMatchedUser'], + 'enrollment_flow': value['enrollmentFlow'], + 'recovery_flow': value['recoveryFlow'], + 'passwordless_flow': value['passwordlessFlow'], + 'sources': value['sources'], + 'show_source_labels': value['showSourceLabels'], + 'pretend_user_exists': value['pretendUserExists'], + 'enable_remember_me': value['enableRememberMe'], + 'webauthn_stage': value['webauthnStage'], + }; +} + diff --git a/packages/client-ts/src/models/IframeLogoutChallenge.ts b/packages/client-ts/src/models/IframeLogoutChallenge.ts new file mode 100644 index 0000000000..050941a4b6 --- /dev/null +++ b/packages/client-ts/src/models/IframeLogoutChallenge.ts @@ -0,0 +1,111 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { LogoutURL } from './LogoutURL'; +import { + LogoutURLFromJSON, + LogoutURLFromJSONTyped, + LogoutURLToJSON, + LogoutURLToJSONTyped, +} from './LogoutURL'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge for iframe logout + * @export + * @interface IframeLogoutChallenge + */ +export interface IframeLogoutChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof IframeLogoutChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof IframeLogoutChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof IframeLogoutChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {Array} + * @memberof IframeLogoutChallenge + */ + logoutUrls?: Array; +} + +/** + * Check if a given object implements the IframeLogoutChallenge interface. + */ +export function instanceOfIframeLogoutChallenge(value: object): value is IframeLogoutChallenge { + return true; +} + +export function IframeLogoutChallengeFromJSON(json: any): IframeLogoutChallenge { + return IframeLogoutChallengeFromJSONTyped(json, false); +} + +export function IframeLogoutChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): IframeLogoutChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'logoutUrls': json['logout_urls'] == null ? undefined : ((json['logout_urls'] as Array).map(LogoutURLFromJSON)), + }; +} + +export function IframeLogoutChallengeToJSON(json: any): IframeLogoutChallenge { + return IframeLogoutChallengeToJSONTyped(json, false); +} + +export function IframeLogoutChallengeToJSONTyped(value?: IframeLogoutChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'logout_urls': value['logoutUrls'] == null ? undefined : ((value['logoutUrls'] as Array).map(LogoutURLToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/IframeLogoutChallengeResponseRequest.ts b/packages/client-ts/src/models/IframeLogoutChallengeResponseRequest.ts new file mode 100644 index 0000000000..fc0e945d01 --- /dev/null +++ b/packages/client-ts/src/models/IframeLogoutChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response for iframe logout + * @export + * @interface IframeLogoutChallengeResponseRequest + */ +export interface IframeLogoutChallengeResponseRequest { + /** + * + * @type {string} + * @memberof IframeLogoutChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the IframeLogoutChallengeResponseRequest interface. + */ +export function instanceOfIframeLogoutChallengeResponseRequest(value: object): value is IframeLogoutChallengeResponseRequest { + return true; +} + +export function IframeLogoutChallengeResponseRequestFromJSON(json: any): IframeLogoutChallengeResponseRequest { + return IframeLogoutChallengeResponseRequestFromJSONTyped(json, false); +} + +export function IframeLogoutChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IframeLogoutChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function IframeLogoutChallengeResponseRequestToJSON(json: any): IframeLogoutChallengeResponseRequest { + return IframeLogoutChallengeResponseRequestToJSONTyped(json, false); +} + +export function IframeLogoutChallengeResponseRequestToJSONTyped(value?: IframeLogoutChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/ImpersonationRequest.ts b/packages/client-ts/src/models/ImpersonationRequest.ts new file mode 100644 index 0000000000..3aebaeac73 --- /dev/null +++ b/packages/client-ts/src/models/ImpersonationRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ImpersonationRequest + */ +export interface ImpersonationRequest { + /** + * + * @type {string} + * @memberof ImpersonationRequest + */ + reason: string; +} + +/** + * Check if a given object implements the ImpersonationRequest interface. + */ +export function instanceOfImpersonationRequest(value: object): value is ImpersonationRequest { + if (!('reason' in value) || value['reason'] === undefined) return false; + return true; +} + +export function ImpersonationRequestFromJSON(json: any): ImpersonationRequest { + return ImpersonationRequestFromJSONTyped(json, false); +} + +export function ImpersonationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImpersonationRequest { + if (json == null) { + return json; + } + return { + + 'reason': json['reason'], + }; +} + +export function ImpersonationRequestToJSON(json: any): ImpersonationRequest { + return ImpersonationRequestToJSONTyped(json, false); +} + +export function ImpersonationRequestToJSONTyped(value?: ImpersonationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'reason': value['reason'], + }; +} + diff --git a/packages/client-ts/src/models/InitialPermissions.ts b/packages/client-ts/src/models/InitialPermissions.ts new file mode 100644 index 0000000000..10a9c3baa9 --- /dev/null +++ b/packages/client-ts/src/models/InitialPermissions.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Permission } from './Permission'; +import { + PermissionFromJSON, + PermissionFromJSONTyped, + PermissionToJSON, + PermissionToJSONTyped, +} from './Permission'; + +/** + * InitialPermissions serializer + * @export + * @interface InitialPermissions + */ +export interface InitialPermissions { + /** + * + * @type {number} + * @memberof InitialPermissions + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof InitialPermissions + */ + name: string; + /** + * + * @type {string} + * @memberof InitialPermissions + */ + role: string; + /** + * + * @type {Array} + * @memberof InitialPermissions + */ + permissions?: Array; + /** + * + * @type {Array} + * @memberof InitialPermissions + */ + readonly permissionsObj: Array; +} + +/** + * Check if a given object implements the InitialPermissions interface. + */ +export function instanceOfInitialPermissions(value: object): value is InitialPermissions { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('role' in value) || value['role'] === undefined) return false; + if (!('permissionsObj' in value) || value['permissionsObj'] === undefined) return false; + return true; +} + +export function InitialPermissionsFromJSON(json: any): InitialPermissions { + return InitialPermissionsFromJSONTyped(json, false); +} + +export function InitialPermissionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): InitialPermissions { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'role': json['role'], + 'permissions': json['permissions'] == null ? undefined : json['permissions'], + 'permissionsObj': ((json['permissions_obj'] as Array).map(PermissionFromJSON)), + }; +} + +export function InitialPermissionsToJSON(json: any): InitialPermissions { + return InitialPermissionsToJSONTyped(json, false); +} + +export function InitialPermissionsToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'role': value['role'], + 'permissions': value['permissions'], + }; +} + diff --git a/packages/client-ts/src/models/InitialPermissionsRequest.ts b/packages/client-ts/src/models/InitialPermissionsRequest.ts new file mode 100644 index 0000000000..839c2da0c9 --- /dev/null +++ b/packages/client-ts/src/models/InitialPermissionsRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * InitialPermissions serializer + * @export + * @interface InitialPermissionsRequest + */ +export interface InitialPermissionsRequest { + /** + * + * @type {string} + * @memberof InitialPermissionsRequest + */ + name: string; + /** + * + * @type {string} + * @memberof InitialPermissionsRequest + */ + role: string; + /** + * + * @type {Array} + * @memberof InitialPermissionsRequest + */ + permissions?: Array; +} + +/** + * Check if a given object implements the InitialPermissionsRequest interface. + */ +export function instanceOfInitialPermissionsRequest(value: object): value is InitialPermissionsRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('role' in value) || value['role'] === undefined) return false; + return true; +} + +export function InitialPermissionsRequestFromJSON(json: any): InitialPermissionsRequest { + return InitialPermissionsRequestFromJSONTyped(json, false); +} + +export function InitialPermissionsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InitialPermissionsRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'role': json['role'], + 'permissions': json['permissions'] == null ? undefined : json['permissions'], + }; +} + +export function InitialPermissionsRequestToJSON(json: any): InitialPermissionsRequest { + return InitialPermissionsRequestToJSONTyped(json, false); +} + +export function InitialPermissionsRequestToJSONTyped(value?: InitialPermissionsRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'role': value['role'], + 'permissions': value['permissions'], + }; +} + diff --git a/packages/client-ts/src/models/InstallID.ts b/packages/client-ts/src/models/InstallID.ts new file mode 100644 index 0000000000..50b798c00f --- /dev/null +++ b/packages/client-ts/src/models/InstallID.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface InstallID + */ +export interface InstallID { + /** + * + * @type {string} + * @memberof InstallID + */ + installId: string; +} + +/** + * Check if a given object implements the InstallID interface. + */ +export function instanceOfInstallID(value: object): value is InstallID { + if (!('installId' in value) || value['installId'] === undefined) return false; + return true; +} + +export function InstallIDFromJSON(json: any): InstallID { + return InstallIDFromJSONTyped(json, false); +} + +export function InstallIDFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstallID { + if (json == null) { + return json; + } + return { + + 'installId': json['install_id'], + }; +} + +export function InstallIDToJSON(json: any): InstallID { + return InstallIDToJSONTyped(json, false); +} + +export function InstallIDToJSONTyped(value?: InstallID | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'install_id': value['installId'], + }; +} + diff --git a/packages/client-ts/src/models/IntentEnum.ts b/packages/client-ts/src/models/IntentEnum.ts new file mode 100644 index 0000000000..5b954e7bbf --- /dev/null +++ b/packages/client-ts/src/models/IntentEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const IntentEnum = { + Verification: 'verification', + Api: 'api', + Recovery: 'recovery', + AppPassword: 'app_password', + UnknownDefaultOpenApi: '11184809' +} as const; +export type IntentEnum = typeof IntentEnum[keyof typeof IntentEnum]; + + +export function instanceOfIntentEnum(value: any): boolean { + for (const key in IntentEnum) { + if (Object.prototype.hasOwnProperty.call(IntentEnum, key)) { + if (IntentEnum[key as keyof typeof IntentEnum] === value) { + return true; + } + } + } + return false; +} + +export function IntentEnumFromJSON(json: any): IntentEnum { + return IntentEnumFromJSONTyped(json, false); +} + +export function IntentEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntentEnum { + return json as IntentEnum; +} + +export function IntentEnumToJSON(value?: IntentEnum | null): any { + return value as any; +} + +export function IntentEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): IntentEnum { + return value as IntentEnum; +} + diff --git a/packages/client-ts/src/models/InvalidResponseActionEnum.ts b/packages/client-ts/src/models/InvalidResponseActionEnum.ts new file mode 100644 index 0000000000..d79d3c8b32 --- /dev/null +++ b/packages/client-ts/src/models/InvalidResponseActionEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const InvalidResponseActionEnum = { + Retry: 'retry', + Restart: 'restart', + RestartWithContext: 'restart_with_context', + UnknownDefaultOpenApi: '11184809' +} as const; +export type InvalidResponseActionEnum = typeof InvalidResponseActionEnum[keyof typeof InvalidResponseActionEnum]; + + +export function instanceOfInvalidResponseActionEnum(value: any): boolean { + for (const key in InvalidResponseActionEnum) { + if (Object.prototype.hasOwnProperty.call(InvalidResponseActionEnum, key)) { + if (InvalidResponseActionEnum[key as keyof typeof InvalidResponseActionEnum] === value) { + return true; + } + } + } + return false; +} + +export function InvalidResponseActionEnumFromJSON(json: any): InvalidResponseActionEnum { + return InvalidResponseActionEnumFromJSONTyped(json, false); +} + +export function InvalidResponseActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvalidResponseActionEnum { + return json as InvalidResponseActionEnum; +} + +export function InvalidResponseActionEnumToJSON(value?: InvalidResponseActionEnum | null): any { + return value as any; +} + +export function InvalidResponseActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): InvalidResponseActionEnum { + return value as InvalidResponseActionEnum; +} + diff --git a/packages/client-ts/src/models/Invitation.ts b/packages/client-ts/src/models/Invitation.ts new file mode 100644 index 0000000000..c454d27708 --- /dev/null +++ b/packages/client-ts/src/models/Invitation.ts @@ -0,0 +1,137 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { Flow } from './Flow'; +import { + FlowFromJSON, + FlowFromJSONTyped, + FlowToJSON, + FlowToJSONTyped, +} from './Flow'; + +/** + * Invitation Serializer + * @export + * @interface Invitation + */ +export interface Invitation { + /** + * + * @type {string} + * @memberof Invitation + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Invitation + */ + name: string; + /** + * + * @type {Date} + * @memberof Invitation + */ + expires?: Date | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Invitation + */ + fixedData?: { [key: string]: any; }; + /** + * + * @type {PartialUser} + * @memberof Invitation + */ + readonly createdBy: PartialUser; + /** + * When enabled, the invitation will be deleted after usage. + * @type {boolean} + * @memberof Invitation + */ + singleUse?: boolean; + /** + * When set, only the configured flow can use this invitation. + * @type {string} + * @memberof Invitation + */ + flow?: string | null; + /** + * + * @type {Flow} + * @memberof Invitation + */ + readonly flowObj: Flow; +} + +/** + * Check if a given object implements the Invitation interface. + */ +export function instanceOfInvitation(value: object): value is Invitation { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('createdBy' in value) || value['createdBy'] === undefined) return false; + if (!('flowObj' in value) || value['flowObj'] === undefined) return false; + return true; +} + +export function InvitationFromJSON(json: any): Invitation { + return InvitationFromJSONTyped(json, false); +} + +export function InvitationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Invitation { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'fixedData': json['fixed_data'] == null ? undefined : json['fixed_data'], + 'createdBy': PartialUserFromJSON(json['created_by']), + 'singleUse': json['single_use'] == null ? undefined : json['single_use'], + 'flow': json['flow'] == null ? undefined : json['flow'], + 'flowObj': FlowFromJSON(json['flow_obj']), + }; +} + +export function InvitationToJSON(json: any): Invitation { + return InvitationToJSONTyped(json, false); +} + +export function InvitationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'fixed_data': value['fixedData'], + 'single_use': value['singleUse'], + 'flow': value['flow'], + }; +} + diff --git a/packages/client-ts/src/models/InvitationRequest.ts b/packages/client-ts/src/models/InvitationRequest.ts new file mode 100644 index 0000000000..7db079cd78 --- /dev/null +++ b/packages/client-ts/src/models/InvitationRequest.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Invitation Serializer + * @export + * @interface InvitationRequest + */ +export interface InvitationRequest { + /** + * + * @type {string} + * @memberof InvitationRequest + */ + name: string; + /** + * + * @type {Date} + * @memberof InvitationRequest + */ + expires?: Date | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof InvitationRequest + */ + fixedData?: { [key: string]: any; }; + /** + * When enabled, the invitation will be deleted after usage. + * @type {boolean} + * @memberof InvitationRequest + */ + singleUse?: boolean; + /** + * When set, only the configured flow can use this invitation. + * @type {string} + * @memberof InvitationRequest + */ + flow?: string | null; +} + +/** + * Check if a given object implements the InvitationRequest interface. + */ +export function instanceOfInvitationRequest(value: object): value is InvitationRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function InvitationRequestFromJSON(json: any): InvitationRequest { + return InvitationRequestFromJSONTyped(json, false); +} + +export function InvitationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'fixedData': json['fixed_data'] == null ? undefined : json['fixed_data'], + 'singleUse': json['single_use'] == null ? undefined : json['single_use'], + 'flow': json['flow'] == null ? undefined : json['flow'], + }; +} + +export function InvitationRequestToJSON(json: any): InvitationRequest { + return InvitationRequestToJSONTyped(json, false); +} + +export function InvitationRequestToJSONTyped(value?: InvitationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'fixed_data': value['fixedData'], + 'single_use': value['singleUse'], + 'flow': value['flow'], + }; +} + diff --git a/packages/client-ts/src/models/InvitationSendEmailRequest.ts b/packages/client-ts/src/models/InvitationSendEmailRequest.ts new file mode 100644 index 0000000000..cfc3e94684 --- /dev/null +++ b/packages/client-ts/src/models/InvitationSendEmailRequest.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for sending invitation emails + * @export + * @interface InvitationSendEmailRequest + */ +export interface InvitationSendEmailRequest { + /** + * + * @type {Array} + * @memberof InvitationSendEmailRequest + */ + emailAddresses: Array; + /** + * + * @type {Array} + * @memberof InvitationSendEmailRequest + */ + ccAddresses?: Array; + /** + * + * @type {Array} + * @memberof InvitationSendEmailRequest + */ + bccAddresses?: Array; + /** + * + * @type {string} + * @memberof InvitationSendEmailRequest + */ + template?: string; +} + +/** + * Check if a given object implements the InvitationSendEmailRequest interface. + */ +export function instanceOfInvitationSendEmailRequest(value: object): value is InvitationSendEmailRequest { + if (!('emailAddresses' in value) || value['emailAddresses'] === undefined) return false; + return true; +} + +export function InvitationSendEmailRequestFromJSON(json: any): InvitationSendEmailRequest { + return InvitationSendEmailRequestFromJSONTyped(json, false); +} + +export function InvitationSendEmailRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationSendEmailRequest { + if (json == null) { + return json; + } + return { + + 'emailAddresses': json['email_addresses'], + 'ccAddresses': json['cc_addresses'] == null ? undefined : json['cc_addresses'], + 'bccAddresses': json['bcc_addresses'] == null ? undefined : json['bcc_addresses'], + 'template': json['template'] == null ? undefined : json['template'], + }; +} + +export function InvitationSendEmailRequestToJSON(json: any): InvitationSendEmailRequest { + return InvitationSendEmailRequestToJSONTyped(json, false); +} + +export function InvitationSendEmailRequestToJSONTyped(value?: InvitationSendEmailRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'email_addresses': value['emailAddresses'], + 'cc_addresses': value['ccAddresses'], + 'bcc_addresses': value['bccAddresses'], + 'template': value['template'], + }; +} + diff --git a/packages/client-ts/src/models/InvitationStage.ts b/packages/client-ts/src/models/InvitationStage.ts new file mode 100644 index 0000000000..87f1aece54 --- /dev/null +++ b/packages/client-ts/src/models/InvitationStage.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * InvitationStage Serializer + * @export + * @interface InvitationStage + */ +export interface InvitationStage { + /** + * + * @type {string} + * @memberof InvitationStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof InvitationStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof InvitationStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof InvitationStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof InvitationStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof InvitationStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof InvitationStage + */ + readonly flowSet: Array; + /** + * 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. + * @type {boolean} + * @memberof InvitationStage + */ + continueFlowWithoutInvitation?: boolean; +} + +/** + * Check if a given object implements the InvitationStage interface. + */ +export function instanceOfInvitationStage(value: object): value is InvitationStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function InvitationStageFromJSON(json: any): InvitationStage { + return InvitationStageFromJSONTyped(json, false); +} + +export function InvitationStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'continueFlowWithoutInvitation': json['continue_flow_without_invitation'] == null ? undefined : json['continue_flow_without_invitation'], + }; +} + +export function InvitationStageToJSON(json: any): InvitationStage { + return InvitationStageToJSONTyped(json, false); +} + +export function InvitationStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'continue_flow_without_invitation': value['continueFlowWithoutInvitation'], + }; +} + diff --git a/packages/client-ts/src/models/InvitationStageRequest.ts b/packages/client-ts/src/models/InvitationStageRequest.ts new file mode 100644 index 0000000000..d0d9d7b52f --- /dev/null +++ b/packages/client-ts/src/models/InvitationStageRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * InvitationStage Serializer + * @export + * @interface InvitationStageRequest + */ +export interface InvitationStageRequest { + /** + * + * @type {string} + * @memberof InvitationStageRequest + */ + name: string; + /** + * 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. + * @type {boolean} + * @memberof InvitationStageRequest + */ + continueFlowWithoutInvitation?: boolean; +} + +/** + * Check if a given object implements the InvitationStageRequest interface. + */ +export function instanceOfInvitationStageRequest(value: object): value is InvitationStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function InvitationStageRequestFromJSON(json: any): InvitationStageRequest { + return InvitationStageRequestFromJSONTyped(json, false); +} + +export function InvitationStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'continueFlowWithoutInvitation': json['continue_flow_without_invitation'] == null ? undefined : json['continue_flow_without_invitation'], + }; +} + +export function InvitationStageRequestToJSON(json: any): InvitationStageRequest { + return InvitationStageRequestToJSONTyped(json, false); +} + +export function InvitationStageRequestToJSONTyped(value?: InvitationStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'continue_flow_without_invitation': value['continueFlowWithoutInvitation'], + }; +} + diff --git a/packages/client-ts/src/models/IssuerModeEnum.ts b/packages/client-ts/src/models/IssuerModeEnum.ts new file mode 100644 index 0000000000..7c1e9f12c0 --- /dev/null +++ b/packages/client-ts/src/models/IssuerModeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const IssuerModeEnum = { + Global: 'global', + PerProvider: 'per_provider', + UnknownDefaultOpenApi: '11184809' +} as const; +export type IssuerModeEnum = typeof IssuerModeEnum[keyof typeof IssuerModeEnum]; + + +export function instanceOfIssuerModeEnum(value: any): boolean { + for (const key in IssuerModeEnum) { + if (Object.prototype.hasOwnProperty.call(IssuerModeEnum, key)) { + if (IssuerModeEnum[key as keyof typeof IssuerModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function IssuerModeEnumFromJSON(json: any): IssuerModeEnum { + return IssuerModeEnumFromJSONTyped(json, false); +} + +export function IssuerModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): IssuerModeEnum { + return json as IssuerModeEnum; +} + +export function IssuerModeEnumToJSON(value?: IssuerModeEnum | null): any { + return value as any; +} + +export function IssuerModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): IssuerModeEnum { + return value as IssuerModeEnum; +} + diff --git a/packages/client-ts/src/models/KadminTypeEnum.ts b/packages/client-ts/src/models/KadminTypeEnum.ts new file mode 100644 index 0000000000..a25de800ba --- /dev/null +++ b/packages/client-ts/src/models/KadminTypeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const KadminTypeEnum = { + Mit: 'MIT', + Heimdal: 'Heimdal', + UnknownDefaultOpenApi: '11184809' +} as const; +export type KadminTypeEnum = typeof KadminTypeEnum[keyof typeof KadminTypeEnum]; + + +export function instanceOfKadminTypeEnum(value: any): boolean { + for (const key in KadminTypeEnum) { + if (Object.prototype.hasOwnProperty.call(KadminTypeEnum, key)) { + if (KadminTypeEnum[key as keyof typeof KadminTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function KadminTypeEnumFromJSON(json: any): KadminTypeEnum { + return KadminTypeEnumFromJSONTyped(json, false); +} + +export function KadminTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): KadminTypeEnum { + return json as KadminTypeEnum; +} + +export function KadminTypeEnumToJSON(value?: KadminTypeEnum | null): any { + return value as any; +} + +export function KadminTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): KadminTypeEnum { + return value as KadminTypeEnum; +} + diff --git a/packages/client-ts/src/models/KerberosSource.ts b/packages/client-ts/src/models/KerberosSource.ts new file mode 100644 index 0000000000..c7172ad8c6 --- /dev/null +++ b/packages/client-ts/src/models/KerberosSource.ts @@ -0,0 +1,369 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { KadminTypeEnum } from './KadminTypeEnum'; +import { + KadminTypeEnumFromJSON, + KadminTypeEnumFromJSONTyped, + KadminTypeEnumToJSON, + KadminTypeEnumToJSONTyped, +} from './KadminTypeEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { SyncOutgoingTriggerModeEnum } from './SyncOutgoingTriggerModeEnum'; +import { + SyncOutgoingTriggerModeEnumFromJSON, + SyncOutgoingTriggerModeEnumFromJSONTyped, + SyncOutgoingTriggerModeEnumToJSON, + SyncOutgoingTriggerModeEnumToJSONTyped, +} from './SyncOutgoingTriggerModeEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * Kerberos Source Serializer + * @export + * @interface KerberosSource + */ +export interface KerberosSource { + /** + * + * @type {string} + * @memberof KerberosSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof KerberosSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof KerberosSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof KerberosSource + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof KerberosSource + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof KerberosSource + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof KerberosSource + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof KerberosSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof KerberosSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof KerberosSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof KerberosSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof KerberosSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof KerberosSource + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof KerberosSource + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof KerberosSource + */ + 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. + * @type {string} + * @memberof KerberosSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof KerberosSource + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof KerberosSource + */ + icon?: string; + /** + * + * @type {string} + * @memberof KerberosSource + */ + readonly iconUrl: string; + /** + * + * @type {ThemedUrls} + * @memberof KerberosSource + */ + readonly iconThemedUrls: ThemedUrls | null; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof KerberosSource + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Kerberos realm + * @type {string} + * @memberof KerberosSource + */ + realm: string; + /** + * Custom krb5.conf to use. Uses the system one by default + * @type {string} + * @memberof KerberosSource + */ + krb5Conf?: string; + /** + * KAdmin server type + * @type {KadminTypeEnum} + * @memberof KerberosSource + */ + kadminType?: KadminTypeEnum; + /** + * Sync users from Kerberos into authentik + * @type {boolean} + * @memberof KerberosSource + */ + syncUsers?: boolean; + /** + * When a user changes their password, sync it back to Kerberos + * @type {boolean} + * @memberof KerberosSource + */ + syncUsersPassword?: boolean; + /** + * Principal to authenticate to kadmin for sync. + * @type {string} + * @memberof KerberosSource + */ + syncPrincipal?: string; + /** + * Credentials cache to authenticate to kadmin for sync. Must be in the form TYPE:residual + * @type {string} + * @memberof KerberosSource + */ + syncCcache?: string; + /** + * Get cached source connectivity + * @type {{ [key: string]: string; }} + * @memberof KerberosSource + */ + readonly connectivity: { [key: string]: string; } | null; + /** + * Force the use of a specific server name for SPNEGO. Must be in the form HTTP@hostname + * @type {string} + * @memberof KerberosSource + */ + spnegoServerName?: string; + /** + * Credential cache to use for SPNEGO in form type:residual + * @type {string} + * @memberof KerberosSource + */ + spnegoCcache?: string; + /** + * If enabled, the authentik-stored password will be updated upon login with the Kerberos password backend + * @type {boolean} + * @memberof KerberosSource + */ + passwordLoginUpdateInternalPassword?: boolean; + /** + * When to trigger sync for outgoing providers + * @type {SyncOutgoingTriggerModeEnum} + * @memberof KerberosSource + */ + syncOutgoingTriggerMode?: SyncOutgoingTriggerModeEnum; +} + + + +/** + * Check if a given object implements the KerberosSource interface. + */ +export function instanceOfKerberosSource(value: object): value is KerberosSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + if (!('realm' in value) || value['realm'] === undefined) return false; + if (!('connectivity' in value) || value['connectivity'] === undefined) return false; + return true; +} + +export function KerberosSourceFromJSON(json: any): KerberosSource { + return KerberosSourceFromJSONTyped(json, false); +} + +export function KerberosSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): KerberosSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'realm': json['realm'], + 'krb5Conf': json['krb5_conf'] == null ? undefined : json['krb5_conf'], + 'kadminType': json['kadmin_type'] == null ? undefined : KadminTypeEnumFromJSON(json['kadmin_type']), + 'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'], + 'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'], + 'syncPrincipal': json['sync_principal'] == null ? undefined : json['sync_principal'], + 'syncCcache': json['sync_ccache'] == null ? undefined : json['sync_ccache'], + 'connectivity': json['connectivity'], + 'spnegoServerName': json['spnego_server_name'] == null ? undefined : json['spnego_server_name'], + 'spnegoCcache': json['spnego_ccache'] == null ? undefined : json['spnego_ccache'], + 'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'], + 'syncOutgoingTriggerMode': json['sync_outgoing_trigger_mode'] == null ? undefined : SyncOutgoingTriggerModeEnumFromJSON(json['sync_outgoing_trigger_mode']), + }; +} + +export function KerberosSourceToJSON(json: any): KerberosSource { + return KerberosSourceToJSONTyped(json, false); +} + +export function KerberosSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'realm': value['realm'], + 'krb5_conf': value['krb5Conf'], + 'kadmin_type': KadminTypeEnumToJSON(value['kadminType']), + 'sync_users': value['syncUsers'], + 'sync_users_password': value['syncUsersPassword'], + 'sync_principal': value['syncPrincipal'], + 'sync_ccache': value['syncCcache'], + 'spnego_server_name': value['spnegoServerName'], + 'spnego_ccache': value['spnegoCcache'], + 'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'], + 'sync_outgoing_trigger_mode': SyncOutgoingTriggerModeEnumToJSON(value['syncOutgoingTriggerMode']), + }; +} + diff --git a/packages/client-ts/src/models/KerberosSourcePropertyMapping.ts b/packages/client-ts/src/models/KerberosSourcePropertyMapping.ts new file mode 100644 index 0000000000..e20cdc995e --- /dev/null +++ b/packages/client-ts/src/models/KerberosSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Kerberos PropertyMapping Serializer + * @export + * @interface KerberosSourcePropertyMapping + */ +export interface KerberosSourcePropertyMapping { + /** + * + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof KerberosSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the KerberosSourcePropertyMapping interface. + */ +export function instanceOfKerberosSourcePropertyMapping(value: object): value is KerberosSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function KerberosSourcePropertyMappingFromJSON(json: any): KerberosSourcePropertyMapping { + return KerberosSourcePropertyMappingFromJSONTyped(json, false); +} + +export function KerberosSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): KerberosSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function KerberosSourcePropertyMappingToJSON(json: any): KerberosSourcePropertyMapping { + return KerberosSourcePropertyMappingToJSONTyped(json, false); +} + +export function KerberosSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/KerberosSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/KerberosSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..7c301ed9fe --- /dev/null +++ b/packages/client-ts/src/models/KerberosSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Kerberos PropertyMapping Serializer + * @export + * @interface KerberosSourcePropertyMappingRequest + */ +export interface KerberosSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof KerberosSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof KerberosSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof KerberosSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the KerberosSourcePropertyMappingRequest interface. + */ +export function instanceOfKerberosSourcePropertyMappingRequest(value: object): value is KerberosSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function KerberosSourcePropertyMappingRequestFromJSON(json: any): KerberosSourcePropertyMappingRequest { + return KerberosSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function KerberosSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KerberosSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function KerberosSourcePropertyMappingRequestToJSON(json: any): KerberosSourcePropertyMappingRequest { + return KerberosSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function KerberosSourcePropertyMappingRequestToJSONTyped(value?: KerberosSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/KerberosSourceRequest.ts b/packages/client-ts/src/models/KerberosSourceRequest.ts new file mode 100644 index 0000000000..a4008cc4a0 --- /dev/null +++ b/packages/client-ts/src/models/KerberosSourceRequest.ts @@ -0,0 +1,314 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { KadminTypeEnum } from './KadminTypeEnum'; +import { + KadminTypeEnumFromJSON, + KadminTypeEnumFromJSONTyped, + KadminTypeEnumToJSON, + KadminTypeEnumToJSONTyped, +} from './KadminTypeEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SyncOutgoingTriggerModeEnum } from './SyncOutgoingTriggerModeEnum'; +import { + SyncOutgoingTriggerModeEnumFromJSON, + SyncOutgoingTriggerModeEnumFromJSONTyped, + SyncOutgoingTriggerModeEnumToJSON, + SyncOutgoingTriggerModeEnumToJSONTyped, +} from './SyncOutgoingTriggerModeEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * Kerberos Source Serializer + * @export + * @interface KerberosSourceRequest + */ +export interface KerberosSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof KerberosSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof KerberosSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof KerberosSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof KerberosSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof KerberosSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof KerberosSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof KerberosSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof KerberosSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof KerberosSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof KerberosSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof KerberosSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof KerberosSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof KerberosSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Kerberos realm + * @type {string} + * @memberof KerberosSourceRequest + */ + realm: string; + /** + * Custom krb5.conf to use. Uses the system one by default + * @type {string} + * @memberof KerberosSourceRequest + */ + krb5Conf?: string; + /** + * KAdmin server type + * @type {KadminTypeEnum} + * @memberof KerberosSourceRequest + */ + kadminType?: KadminTypeEnum; + /** + * Sync users from Kerberos into authentik + * @type {boolean} + * @memberof KerberosSourceRequest + */ + syncUsers?: boolean; + /** + * When a user changes their password, sync it back to Kerberos + * @type {boolean} + * @memberof KerberosSourceRequest + */ + syncUsersPassword?: boolean; + /** + * Principal to authenticate to kadmin for sync. + * @type {string} + * @memberof KerberosSourceRequest + */ + syncPrincipal?: string; + /** + * Password to authenticate to kadmin for sync + * @type {string} + * @memberof KerberosSourceRequest + */ + syncPassword?: string; + /** + * Keytab to authenticate to kadmin for sync. Must be base64-encoded or in the form TYPE:residual + * @type {string} + * @memberof KerberosSourceRequest + */ + syncKeytab?: string; + /** + * Credentials cache to authenticate to kadmin for sync. Must be in the form TYPE:residual + * @type {string} + * @memberof KerberosSourceRequest + */ + syncCcache?: string; + /** + * Force the use of a specific server name for SPNEGO. Must be in the form HTTP@hostname + * @type {string} + * @memberof KerberosSourceRequest + */ + spnegoServerName?: string; + /** + * SPNEGO keytab base64-encoded or path to keytab in the form FILE:path + * @type {string} + * @memberof KerberosSourceRequest + */ + spnegoKeytab?: string; + /** + * Credential cache to use for SPNEGO in form type:residual + * @type {string} + * @memberof KerberosSourceRequest + */ + spnegoCcache?: string; + /** + * If enabled, the authentik-stored password will be updated upon login with the Kerberos password backend + * @type {boolean} + * @memberof KerberosSourceRequest + */ + passwordLoginUpdateInternalPassword?: boolean; + /** + * When to trigger sync for outgoing providers + * @type {SyncOutgoingTriggerModeEnum} + * @memberof KerberosSourceRequest + */ + syncOutgoingTriggerMode?: SyncOutgoingTriggerModeEnum; +} + + + +/** + * Check if a given object implements the KerberosSourceRequest interface. + */ +export function instanceOfKerberosSourceRequest(value: object): value is KerberosSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('realm' in value) || value['realm'] === undefined) return false; + return true; +} + +export function KerberosSourceRequestFromJSON(json: any): KerberosSourceRequest { + return KerberosSourceRequestFromJSONTyped(json, false); +} + +export function KerberosSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KerberosSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'realm': json['realm'], + 'krb5Conf': json['krb5_conf'] == null ? undefined : json['krb5_conf'], + 'kadminType': json['kadmin_type'] == null ? undefined : KadminTypeEnumFromJSON(json['kadmin_type']), + 'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'], + 'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'], + 'syncPrincipal': json['sync_principal'] == null ? undefined : json['sync_principal'], + 'syncPassword': json['sync_password'] == null ? undefined : json['sync_password'], + 'syncKeytab': json['sync_keytab'] == null ? undefined : json['sync_keytab'], + 'syncCcache': json['sync_ccache'] == null ? undefined : json['sync_ccache'], + 'spnegoServerName': json['spnego_server_name'] == null ? undefined : json['spnego_server_name'], + 'spnegoKeytab': json['spnego_keytab'] == null ? undefined : json['spnego_keytab'], + 'spnegoCcache': json['spnego_ccache'] == null ? undefined : json['spnego_ccache'], + 'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'], + 'syncOutgoingTriggerMode': json['sync_outgoing_trigger_mode'] == null ? undefined : SyncOutgoingTriggerModeEnumFromJSON(json['sync_outgoing_trigger_mode']), + }; +} + +export function KerberosSourceRequestToJSON(json: any): KerberosSourceRequest { + return KerberosSourceRequestToJSONTyped(json, false); +} + +export function KerberosSourceRequestToJSONTyped(value?: KerberosSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'realm': value['realm'], + 'krb5_conf': value['krb5Conf'], + 'kadmin_type': KadminTypeEnumToJSON(value['kadminType']), + 'sync_users': value['syncUsers'], + 'sync_users_password': value['syncUsersPassword'], + 'sync_principal': value['syncPrincipal'], + 'sync_password': value['syncPassword'], + 'sync_keytab': value['syncKeytab'], + 'sync_ccache': value['syncCcache'], + 'spnego_server_name': value['spnegoServerName'], + 'spnego_keytab': value['spnegoKeytab'], + 'spnego_ccache': value['spnegoCcache'], + 'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'], + 'sync_outgoing_trigger_mode': SyncOutgoingTriggerModeEnumToJSON(value['syncOutgoingTriggerMode']), + }; +} + diff --git a/packages/client-ts/src/models/KeyTypeEnum.ts b/packages/client-ts/src/models/KeyTypeEnum.ts new file mode 100644 index 0000000000..bd234ceb2a --- /dev/null +++ b/packages/client-ts/src/models/KeyTypeEnum.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const KeyTypeEnum = { + Rsa: 'rsa', + Ec: 'ec', + Dsa: 'dsa', + Ed25519: 'ed25519', + Ed448: 'ed448', + UnknownDefaultOpenApi: '11184809' +} as const; +export type KeyTypeEnum = typeof KeyTypeEnum[keyof typeof KeyTypeEnum]; + + +export function instanceOfKeyTypeEnum(value: any): boolean { + for (const key in KeyTypeEnum) { + if (Object.prototype.hasOwnProperty.call(KeyTypeEnum, key)) { + if (KeyTypeEnum[key as keyof typeof KeyTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function KeyTypeEnumFromJSON(json: any): KeyTypeEnum { + return KeyTypeEnumFromJSONTyped(json, false); +} + +export function KeyTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyTypeEnum { + return json as KeyTypeEnum; +} + +export function KeyTypeEnumToJSON(value?: KeyTypeEnum | null): any { + return value as any; +} + +export function KeyTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyTypeEnum { + return value as KeyTypeEnum; +} + diff --git a/packages/client-ts/src/models/KubernetesServiceConnection.ts b/packages/client-ts/src/models/KubernetesServiceConnection.ts new file mode 100644 index 0000000000..aba67213d9 --- /dev/null +++ b/packages/client-ts/src/models/KubernetesServiceConnection.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * KubernetesServiceConnection Serializer + * @export + * @interface KubernetesServiceConnection + */ +export interface KubernetesServiceConnection { + /** + * + * @type {string} + * @memberof KubernetesServiceConnection + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof KubernetesServiceConnection + */ + name: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof KubernetesServiceConnection + */ + local?: boolean; + /** + * + * @type {string} + * @memberof KubernetesServiceConnection + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof KubernetesServiceConnection + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof KubernetesServiceConnection + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof KubernetesServiceConnection + */ + readonly metaModelName: string; + /** + * Paste your kubeconfig here. authentik will automatically use the currently selected context. + * @type {{ [key: string]: any; }} + * @memberof KubernetesServiceConnection + */ + kubeconfig?: { [key: string]: any; }; + /** + * Verify SSL Certificates of the Kubernetes API endpoint + * @type {boolean} + * @memberof KubernetesServiceConnection + */ + verifySsl?: boolean; +} + +/** + * Check if a given object implements the KubernetesServiceConnection interface. + */ +export function instanceOfKubernetesServiceConnection(value: object): value is KubernetesServiceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function KubernetesServiceConnectionFromJSON(json: any): KubernetesServiceConnection { + return KubernetesServiceConnectionFromJSONTyped(json, false); +} + +export function KubernetesServiceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): KubernetesServiceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'kubeconfig': json['kubeconfig'] == null ? undefined : json['kubeconfig'], + 'verifySsl': json['verify_ssl'] == null ? undefined : json['verify_ssl'], + }; +} + +export function KubernetesServiceConnectionToJSON(json: any): KubernetesServiceConnection { + return KubernetesServiceConnectionToJSONTyped(json, false); +} + +export function KubernetesServiceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + 'kubeconfig': value['kubeconfig'], + 'verify_ssl': value['verifySsl'], + }; +} + diff --git a/packages/client-ts/src/models/KubernetesServiceConnectionRequest.ts b/packages/client-ts/src/models/KubernetesServiceConnectionRequest.ts new file mode 100644 index 0000000000..28f02082ef --- /dev/null +++ b/packages/client-ts/src/models/KubernetesServiceConnectionRequest.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * KubernetesServiceConnection Serializer + * @export + * @interface KubernetesServiceConnectionRequest + */ +export interface KubernetesServiceConnectionRequest { + /** + * + * @type {string} + * @memberof KubernetesServiceConnectionRequest + */ + name: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof KubernetesServiceConnectionRequest + */ + local?: boolean; + /** + * Paste your kubeconfig here. authentik will automatically use the currently selected context. + * @type {{ [key: string]: any; }} + * @memberof KubernetesServiceConnectionRequest + */ + kubeconfig?: { [key: string]: any; }; + /** + * Verify SSL Certificates of the Kubernetes API endpoint + * @type {boolean} + * @memberof KubernetesServiceConnectionRequest + */ + verifySsl?: boolean; +} + +/** + * Check if a given object implements the KubernetesServiceConnectionRequest interface. + */ +export function instanceOfKubernetesServiceConnectionRequest(value: object): value is KubernetesServiceConnectionRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function KubernetesServiceConnectionRequestFromJSON(json: any): KubernetesServiceConnectionRequest { + return KubernetesServiceConnectionRequestFromJSONTyped(json, false); +} + +export function KubernetesServiceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KubernetesServiceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'kubeconfig': json['kubeconfig'] == null ? undefined : json['kubeconfig'], + 'verifySsl': json['verify_ssl'] == null ? undefined : json['verify_ssl'], + }; +} + +export function KubernetesServiceConnectionRequestToJSON(json: any): KubernetesServiceConnectionRequest { + return KubernetesServiceConnectionRequestToJSONTyped(json, false); +} + +export function KubernetesServiceConnectionRequestToJSONTyped(value?: KubernetesServiceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + 'kubeconfig': value['kubeconfig'], + 'verify_ssl': value['verifySsl'], + }; +} + diff --git a/packages/client-ts/src/models/LDAPAPIAccessMode.ts b/packages/client-ts/src/models/LDAPAPIAccessMode.ts new file mode 100644 index 0000000000..520ff5ccdd --- /dev/null +++ b/packages/client-ts/src/models/LDAPAPIAccessMode.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LDAPAPIAccessMode = { + Direct: 'direct', + Cached: 'cached', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LDAPAPIAccessMode = typeof LDAPAPIAccessMode[keyof typeof LDAPAPIAccessMode]; + + +export function instanceOfLDAPAPIAccessMode(value: any): boolean { + for (const key in LDAPAPIAccessMode) { + if (Object.prototype.hasOwnProperty.call(LDAPAPIAccessMode, key)) { + if (LDAPAPIAccessMode[key as keyof typeof LDAPAPIAccessMode] === value) { + return true; + } + } + } + return false; +} + +export function LDAPAPIAccessModeFromJSON(json: any): LDAPAPIAccessMode { + return LDAPAPIAccessModeFromJSONTyped(json, false); +} + +export function LDAPAPIAccessModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPAPIAccessMode { + return json as LDAPAPIAccessMode; +} + +export function LDAPAPIAccessModeToJSON(value?: LDAPAPIAccessMode | null): any { + return value as any; +} + +export function LDAPAPIAccessModeToJSONTyped(value: any, ignoreDiscriminator: boolean): LDAPAPIAccessMode { + return value as LDAPAPIAccessMode; +} + diff --git a/packages/client-ts/src/models/LDAPCheckAccess.ts b/packages/client-ts/src/models/LDAPCheckAccess.ts new file mode 100644 index 0000000000..eeab264673 --- /dev/null +++ b/packages/client-ts/src/models/LDAPCheckAccess.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyTestResult } from './PolicyTestResult'; +import { + PolicyTestResultFromJSON, + PolicyTestResultFromJSONTyped, + PolicyTestResultToJSON, + PolicyTestResultToJSONTyped, +} from './PolicyTestResult'; + +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface LDAPCheckAccess + */ +export interface LDAPCheckAccess { + /** + * + * @type {boolean} + * @memberof LDAPCheckAccess + */ + hasSearchPermission?: boolean; + /** + * + * @type {PolicyTestResult} + * @memberof LDAPCheckAccess + */ + access: PolicyTestResult; +} + +/** + * Check if a given object implements the LDAPCheckAccess interface. + */ +export function instanceOfLDAPCheckAccess(value: object): value is LDAPCheckAccess { + if (!('access' in value) || value['access'] === undefined) return false; + return true; +} + +export function LDAPCheckAccessFromJSON(json: any): LDAPCheckAccess { + return LDAPCheckAccessFromJSONTyped(json, false); +} + +export function LDAPCheckAccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPCheckAccess { + if (json == null) { + return json; + } + return { + + 'hasSearchPermission': json['has_search_permission'] == null ? undefined : json['has_search_permission'], + 'access': PolicyTestResultFromJSON(json['access']), + }; +} + +export function LDAPCheckAccessToJSON(json: any): LDAPCheckAccess { + return LDAPCheckAccessToJSONTyped(json, false); +} + +export function LDAPCheckAccessToJSONTyped(value?: LDAPCheckAccess | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'has_search_permission': value['hasSearchPermission'], + 'access': PolicyTestResultToJSON(value['access']), + }; +} + diff --git a/packages/client-ts/src/models/LDAPDebug.ts b/packages/client-ts/src/models/LDAPDebug.ts new file mode 100644 index 0000000000..1e11ad4739 --- /dev/null +++ b/packages/client-ts/src/models/LDAPDebug.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface LDAPDebug + */ +export interface LDAPDebug { + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof LDAPDebug + */ + readonly user: Array<{ [key: string]: any; }>; + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof LDAPDebug + */ + readonly group: Array<{ [key: string]: any; }>; + /** + * + * @type {Array<{ [key: string]: any; }>} + * @memberof LDAPDebug + */ + readonly membership: Array<{ [key: string]: any; }>; +} + +/** + * Check if a given object implements the LDAPDebug interface. + */ +export function instanceOfLDAPDebug(value: object): value is LDAPDebug { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('membership' in value) || value['membership'] === undefined) return false; + return true; +} + +export function LDAPDebugFromJSON(json: any): LDAPDebug { + return LDAPDebugFromJSONTyped(json, false); +} + +export function LDAPDebugFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPDebug { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'group': json['group'], + 'membership': json['membership'], + }; +} + +export function LDAPDebugToJSON(json: any): LDAPDebug { + return LDAPDebugToJSONTyped(json, false); +} + +export function LDAPDebugToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/LDAPOutpostConfig.ts b/packages/client-ts/src/models/LDAPOutpostConfig.ts new file mode 100644 index 0000000000..5376d61715 --- /dev/null +++ b/packages/client-ts/src/models/LDAPOutpostConfig.ts @@ -0,0 +1,173 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LDAPAPIAccessMode } from './LDAPAPIAccessMode'; +import { + LDAPAPIAccessModeFromJSON, + LDAPAPIAccessModeFromJSONTyped, + LDAPAPIAccessModeToJSON, + LDAPAPIAccessModeToJSONTyped, +} from './LDAPAPIAccessMode'; + +/** + * LDAPProvider Serializer + * @export + * @interface LDAPOutpostConfig + */ +export interface LDAPOutpostConfig { + /** + * + * @type {number} + * @memberof LDAPOutpostConfig + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof LDAPOutpostConfig + */ + name: string; + /** + * DN under which objects are accessible. + * @type {string} + * @memberof LDAPOutpostConfig + */ + baseDn?: string; + /** + * + * @type {string} + * @memberof LDAPOutpostConfig + */ + bindFlowSlug: string; + /** + * Get slug for unbind flow, defaulting to brand's default flow. + * @type {string} + * @memberof LDAPOutpostConfig + */ + readonly unbindFlowSlug: string | null; + /** + * Prioritise backchannel slug over direct application slug + * @type {string} + * @memberof LDAPOutpostConfig + */ + readonly applicationSlug: string; + /** + * + * @type {string} + * @memberof LDAPOutpostConfig + */ + certificate?: string | null; + /** + * + * @type {string} + * @memberof LDAPOutpostConfig + */ + 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 + * @type {number} + * @memberof LDAPOutpostConfig + */ + uidStartNumber?: number; + /** + * 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 + * @type {number} + * @memberof LDAPOutpostConfig + */ + gidStartNumber?: number; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof LDAPOutpostConfig + */ + searchMode?: LDAPAPIAccessMode; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof LDAPOutpostConfig + */ + 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. + * @type {boolean} + * @memberof LDAPOutpostConfig + */ + mfaSupport?: boolean; +} + + + +/** + * Check if a given object implements the LDAPOutpostConfig interface. + */ +export function instanceOfLDAPOutpostConfig(value: object): value is LDAPOutpostConfig { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('bindFlowSlug' in value) || value['bindFlowSlug'] === undefined) return false; + if (!('unbindFlowSlug' in value) || value['unbindFlowSlug'] === undefined) return false; + if (!('applicationSlug' in value) || value['applicationSlug'] === undefined) return false; + return true; +} + +export function LDAPOutpostConfigFromJSON(json: any): LDAPOutpostConfig { + return LDAPOutpostConfigFromJSONTyped(json, false); +} + +export function LDAPOutpostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPOutpostConfig { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'baseDn': json['base_dn'] == null ? undefined : json['base_dn'], + 'bindFlowSlug': json['bind_flow_slug'], + 'unbindFlowSlug': json['unbind_flow_slug'], + 'applicationSlug': json['application_slug'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'tlsServerName': json['tls_server_name'] == null ? undefined : json['tls_server_name'], + 'uidStartNumber': json['uid_start_number'] == null ? undefined : json['uid_start_number'], + 'gidStartNumber': json['gid_start_number'] == null ? undefined : json['gid_start_number'], + 'searchMode': json['search_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['search_mode']), + 'bindMode': json['bind_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['bind_mode']), + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + }; +} + +export function LDAPOutpostConfigToJSON(json: any): LDAPOutpostConfig { + return LDAPOutpostConfigToJSONTyped(json, false); +} + +export function LDAPOutpostConfigToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'base_dn': value['baseDn'], + 'bind_flow_slug': value['bindFlowSlug'], + 'certificate': value['certificate'], + 'tls_server_name': value['tlsServerName'], + 'uid_start_number': value['uidStartNumber'], + 'gid_start_number': value['gidStartNumber'], + 'search_mode': LDAPAPIAccessModeToJSON(value['searchMode']), + 'bind_mode': LDAPAPIAccessModeToJSON(value['bindMode']), + 'mfa_support': value['mfaSupport'], + }; +} + diff --git a/packages/client-ts/src/models/LDAPProvider.ts b/packages/client-ts/src/models/LDAPProvider.ts new file mode 100644 index 0000000000..0b6605087f --- /dev/null +++ b/packages/client-ts/src/models/LDAPProvider.ts @@ -0,0 +1,254 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LDAPAPIAccessMode } from './LDAPAPIAccessMode'; +import { + LDAPAPIAccessModeFromJSON, + LDAPAPIAccessModeFromJSONTyped, + LDAPAPIAccessModeToJSON, + LDAPAPIAccessModeToJSONTyped, +} from './LDAPAPIAccessMode'; + +/** + * LDAPProvider Serializer + * @export + * @interface LDAPProvider + */ +export interface LDAPProvider { + /** + * + * @type {number} + * @memberof LDAPProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof LDAPProvider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof LDAPProvider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof LDAPProvider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof LDAPProvider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof LDAPProvider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof LDAPProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof LDAPProvider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof LDAPProvider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof LDAPProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof LDAPProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof LDAPProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof LDAPProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof LDAPProvider + */ + readonly metaModelName: string; + /** + * DN under which objects are accessible. + * @type {string} + * @memberof LDAPProvider + */ + baseDn?: string; + /** + * + * @type {string} + * @memberof LDAPProvider + */ + certificate?: string | null; + /** + * + * @type {string} + * @memberof LDAPProvider + */ + 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 + * @type {number} + * @memberof LDAPProvider + */ + uidStartNumber?: number; + /** + * 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 + * @type {number} + * @memberof LDAPProvider + */ + gidStartNumber?: number; + /** + * + * @type {Array} + * @memberof LDAPProvider + */ + readonly outpostSet: Array; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof LDAPProvider + */ + searchMode?: LDAPAPIAccessMode; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof LDAPProvider + */ + 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. + * @type {boolean} + * @memberof LDAPProvider + */ + mfaSupport?: boolean; +} + + + +/** + * Check if a given object implements the LDAPProvider interface. + */ +export function instanceOfLDAPProvider(value: object): value is LDAPProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('outpostSet' in value) || value['outpostSet'] === undefined) return false; + return true; +} + +export function LDAPProviderFromJSON(json: any): LDAPProvider { + return LDAPProviderFromJSONTyped(json, false); +} + +export function LDAPProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'baseDn': json['base_dn'] == null ? undefined : json['base_dn'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'tlsServerName': json['tls_server_name'] == null ? undefined : json['tls_server_name'], + 'uidStartNumber': json['uid_start_number'] == null ? undefined : json['uid_start_number'], + 'gidStartNumber': json['gid_start_number'] == null ? undefined : json['gid_start_number'], + 'outpostSet': json['outpost_set'], + 'searchMode': json['search_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['search_mode']), + 'bindMode': json['bind_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['bind_mode']), + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + }; +} + +export function LDAPProviderToJSON(json: any): LDAPProvider { + return LDAPProviderToJSONTyped(json, false); +} + +export function LDAPProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'base_dn': value['baseDn'], + 'certificate': value['certificate'], + 'tls_server_name': value['tlsServerName'], + 'uid_start_number': value['uidStartNumber'], + 'gid_start_number': value['gidStartNumber'], + 'search_mode': LDAPAPIAccessModeToJSON(value['searchMode']), + 'bind_mode': LDAPAPIAccessModeToJSON(value['bindMode']), + 'mfa_support': value['mfaSupport'], + }; +} + diff --git a/packages/client-ts/src/models/LDAPProviderRequest.ts b/packages/client-ts/src/models/LDAPProviderRequest.ts new file mode 100644 index 0000000000..9c2475c05f --- /dev/null +++ b/packages/client-ts/src/models/LDAPProviderRequest.ts @@ -0,0 +1,174 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LDAPAPIAccessMode } from './LDAPAPIAccessMode'; +import { + LDAPAPIAccessModeFromJSON, + LDAPAPIAccessModeFromJSONTyped, + LDAPAPIAccessModeToJSON, + LDAPAPIAccessModeToJSONTyped, +} from './LDAPAPIAccessMode'; + +/** + * LDAPProvider Serializer + * @export + * @interface LDAPProviderRequest + */ +export interface LDAPProviderRequest { + /** + * + * @type {string} + * @memberof LDAPProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof LDAPProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof LDAPProviderRequest + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof LDAPProviderRequest + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof LDAPProviderRequest + */ + propertyMappings?: Array; + /** + * DN under which objects are accessible. + * @type {string} + * @memberof LDAPProviderRequest + */ + baseDn?: string; + /** + * + * @type {string} + * @memberof LDAPProviderRequest + */ + certificate?: string | null; + /** + * + * @type {string} + * @memberof LDAPProviderRequest + */ + 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 + * @type {number} + * @memberof LDAPProviderRequest + */ + uidStartNumber?: number; + /** + * 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 + * @type {number} + * @memberof LDAPProviderRequest + */ + gidStartNumber?: number; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof LDAPProviderRequest + */ + searchMode?: LDAPAPIAccessMode; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof LDAPProviderRequest + */ + 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. + * @type {boolean} + * @memberof LDAPProviderRequest + */ + mfaSupport?: boolean; +} + + + +/** + * Check if a given object implements the LDAPProviderRequest interface. + */ +export function instanceOfLDAPProviderRequest(value: object): value is LDAPProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + return true; +} + +export function LDAPProviderRequestFromJSON(json: any): LDAPProviderRequest { + return LDAPProviderRequestFromJSONTyped(json, false); +} + +export function LDAPProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'baseDn': json['base_dn'] == null ? undefined : json['base_dn'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'tlsServerName': json['tls_server_name'] == null ? undefined : json['tls_server_name'], + 'uidStartNumber': json['uid_start_number'] == null ? undefined : json['uid_start_number'], + 'gidStartNumber': json['gid_start_number'] == null ? undefined : json['gid_start_number'], + 'searchMode': json['search_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['search_mode']), + 'bindMode': json['bind_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['bind_mode']), + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + }; +} + +export function LDAPProviderRequestToJSON(json: any): LDAPProviderRequest { + return LDAPProviderRequestToJSONTyped(json, false); +} + +export function LDAPProviderRequestToJSONTyped(value?: LDAPProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'base_dn': value['baseDn'], + 'certificate': value['certificate'], + 'tls_server_name': value['tlsServerName'], + 'uid_start_number': value['uidStartNumber'], + 'gid_start_number': value['gidStartNumber'], + 'search_mode': LDAPAPIAccessModeToJSON(value['searchMode']), + 'bind_mode': LDAPAPIAccessModeToJSON(value['bindMode']), + 'mfa_support': value['mfaSupport'], + }; +} + diff --git a/packages/client-ts/src/models/LDAPSource.ts b/packages/client-ts/src/models/LDAPSource.ts new file mode 100644 index 0000000000..4c4df92b7c --- /dev/null +++ b/packages/client-ts/src/models/LDAPSource.ts @@ -0,0 +1,436 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { SyncOutgoingTriggerModeEnum } from './SyncOutgoingTriggerModeEnum'; +import { + SyncOutgoingTriggerModeEnumFromJSON, + SyncOutgoingTriggerModeEnumFromJSONTyped, + SyncOutgoingTriggerModeEnumToJSON, + SyncOutgoingTriggerModeEnumToJSONTyped, +} from './SyncOutgoingTriggerModeEnum'; + +/** + * LDAP Source Serializer + * @export + * @interface LDAPSource + */ +export interface LDAPSource { + /** + * + * @type {string} + * @memberof LDAPSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof LDAPSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof LDAPSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof LDAPSource + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof LDAPSource + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof LDAPSource + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof LDAPSource + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof LDAPSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof LDAPSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof LDAPSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof LDAPSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof LDAPSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof LDAPSource + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof LDAPSource + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof LDAPSource + */ + 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. + * @type {string} + * @memberof LDAPSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof LDAPSource + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof LDAPSource + */ + icon?: string; + /** + * + * @type {string} + * @memberof LDAPSource + */ + readonly iconUrl: string; + /** + * + * @type {ThemedUrls} + * @memberof LDAPSource + */ + readonly iconThemedUrls: ThemedUrls | null; + /** + * + * @type {string} + * @memberof LDAPSource + */ + serverUri: string; + /** + * Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. + * @type {string} + * @memberof LDAPSource + */ + peerCertificate?: string | null; + /** + * Client certificate to authenticate against the LDAP Server's Certificate. + * @type {string} + * @memberof LDAPSource + */ + clientCertificate?: string | null; + /** + * + * @type {string} + * @memberof LDAPSource + */ + bindCn?: string; + /** + * + * @type {boolean} + * @memberof LDAPSource + */ + startTls?: boolean; + /** + * + * @type {boolean} + * @memberof LDAPSource + */ + sni?: boolean; + /** + * + * @type {string} + * @memberof LDAPSource + */ + baseDn: string; + /** + * Prepended to Base DN for User-queries. + * @type {string} + * @memberof LDAPSource + */ + additionalUserDn?: string; + /** + * Prepended to Base DN for Group-queries. + * @type {string} + * @memberof LDAPSource + */ + additionalGroupDn?: string; + /** + * Consider Objects matching this filter to be Users. + * @type {string} + * @memberof LDAPSource + */ + userObjectFilter?: string; + /** + * Consider Objects matching this filter to be Groups. + * @type {string} + * @memberof LDAPSource + */ + groupObjectFilter?: string; + /** + * Field which contains members of a group. + * @type {string} + * @memberof LDAPSource + */ + groupMembershipField?: string; + /** + * Attribute which matches the value of `group_membership_field`. + * @type {string} + * @memberof LDAPSource + */ + userMembershipAttribute?: string; + /** + * Field which contains a unique Identifier. + * @type {string} + * @memberof LDAPSource + */ + objectUniquenessField?: string; + /** + * Update internal authentik password when login succeeds with LDAP + * @type {boolean} + * @memberof LDAPSource + */ + passwordLoginUpdateInternalPassword?: boolean; + /** + * + * @type {boolean} + * @memberof LDAPSource + */ + syncUsers?: boolean; + /** + * When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. + * @type {boolean} + * @memberof LDAPSource + */ + syncUsersPassword?: boolean; + /** + * + * @type {boolean} + * @memberof LDAPSource + */ + syncGroups?: boolean; + /** + * + * @type {string} + * @memberof LDAPSource + */ + syncParentGroup?: string | null; + /** + * Get cached source connectivity + * @type {{ [key: string]: { [key: string]: string; }; }} + * @memberof LDAPSource + */ + readonly connectivity: { [key: string]: { [key: string]: string; }; } | null; + /** + * Lookup group membership based on a user attribute instead of a group attribute. This allows nested group resolution on systems like FreeIPA and Active Directory + * @type {boolean} + * @memberof LDAPSource + */ + lookupGroupsFromUser?: boolean; + /** + * Delete authentik users and groups which were previously supplied by this source, but are now missing from it. + * @type {boolean} + * @memberof LDAPSource + */ + deleteNotFoundObjects?: boolean; + /** + * When to trigger sync for outgoing providers + * @type {SyncOutgoingTriggerModeEnum} + * @memberof LDAPSource + */ + syncOutgoingTriggerMode?: SyncOutgoingTriggerModeEnum; +} + + + +/** + * Check if a given object implements the LDAPSource interface. + */ +export function instanceOfLDAPSource(value: object): value is LDAPSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + if (!('serverUri' in value) || value['serverUri'] === undefined) return false; + if (!('baseDn' in value) || value['baseDn'] === undefined) return false; + if (!('connectivity' in value) || value['connectivity'] === undefined) return false; + return true; +} + +export function LDAPSourceFromJSON(json: any): LDAPSource { + return LDAPSourceFromJSONTyped(json, false); +} + +export function LDAPSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + 'serverUri': json['server_uri'], + 'peerCertificate': json['peer_certificate'] == null ? undefined : json['peer_certificate'], + 'clientCertificate': json['client_certificate'] == null ? undefined : json['client_certificate'], + 'bindCn': json['bind_cn'] == null ? undefined : json['bind_cn'], + 'startTls': json['start_tls'] == null ? undefined : json['start_tls'], + 'sni': json['sni'] == null ? undefined : json['sni'], + 'baseDn': json['base_dn'], + 'additionalUserDn': json['additional_user_dn'] == null ? undefined : json['additional_user_dn'], + 'additionalGroupDn': json['additional_group_dn'] == null ? undefined : json['additional_group_dn'], + 'userObjectFilter': json['user_object_filter'] == null ? undefined : json['user_object_filter'], + 'groupObjectFilter': json['group_object_filter'] == null ? undefined : json['group_object_filter'], + 'groupMembershipField': json['group_membership_field'] == null ? undefined : json['group_membership_field'], + 'userMembershipAttribute': json['user_membership_attribute'] == null ? undefined : json['user_membership_attribute'], + 'objectUniquenessField': json['object_uniqueness_field'] == null ? undefined : json['object_uniqueness_field'], + 'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'], + 'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'], + 'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'], + 'syncGroups': json['sync_groups'] == null ? undefined : json['sync_groups'], + 'syncParentGroup': json['sync_parent_group'] == null ? undefined : json['sync_parent_group'], + 'connectivity': json['connectivity'], + 'lookupGroupsFromUser': json['lookup_groups_from_user'] == null ? undefined : json['lookup_groups_from_user'], + 'deleteNotFoundObjects': json['delete_not_found_objects'] == null ? undefined : json['delete_not_found_objects'], + 'syncOutgoingTriggerMode': json['sync_outgoing_trigger_mode'] == null ? undefined : SyncOutgoingTriggerModeEnumFromJSON(json['sync_outgoing_trigger_mode']), + }; +} + +export function LDAPSourceToJSON(json: any): LDAPSource { + return LDAPSourceToJSONTyped(json, false); +} + +export function LDAPSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'server_uri': value['serverUri'], + 'peer_certificate': value['peerCertificate'], + 'client_certificate': value['clientCertificate'], + 'bind_cn': value['bindCn'], + 'start_tls': value['startTls'], + 'sni': value['sni'], + 'base_dn': value['baseDn'], + 'additional_user_dn': value['additionalUserDn'], + 'additional_group_dn': value['additionalGroupDn'], + 'user_object_filter': value['userObjectFilter'], + 'group_object_filter': value['groupObjectFilter'], + 'group_membership_field': value['groupMembershipField'], + 'user_membership_attribute': value['userMembershipAttribute'], + 'object_uniqueness_field': value['objectUniquenessField'], + 'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'], + 'sync_users': value['syncUsers'], + 'sync_users_password': value['syncUsersPassword'], + 'sync_groups': value['syncGroups'], + 'sync_parent_group': value['syncParentGroup'], + 'lookup_groups_from_user': value['lookupGroupsFromUser'], + 'delete_not_found_objects': value['deleteNotFoundObjects'], + 'sync_outgoing_trigger_mode': SyncOutgoingTriggerModeEnumToJSON(value['syncOutgoingTriggerMode']), + }; +} + diff --git a/packages/client-ts/src/models/LDAPSourcePropertyMapping.ts b/packages/client-ts/src/models/LDAPSourcePropertyMapping.ts new file mode 100644 index 0000000000..1564483f3d --- /dev/null +++ b/packages/client-ts/src/models/LDAPSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * LDAP PropertyMapping Serializer + * @export + * @interface LDAPSourcePropertyMapping + */ +export interface LDAPSourcePropertyMapping { + /** + * + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof LDAPSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the LDAPSourcePropertyMapping interface. + */ +export function instanceOfLDAPSourcePropertyMapping(value: object): value is LDAPSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function LDAPSourcePropertyMappingFromJSON(json: any): LDAPSourcePropertyMapping { + return LDAPSourcePropertyMappingFromJSONTyped(json, false); +} + +export function LDAPSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function LDAPSourcePropertyMappingToJSON(json: any): LDAPSourcePropertyMapping { + return LDAPSourcePropertyMappingToJSONTyped(json, false); +} + +export function LDAPSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/LDAPSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/LDAPSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..da80a991a4 --- /dev/null +++ b/packages/client-ts/src/models/LDAPSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * LDAP PropertyMapping Serializer + * @export + * @interface LDAPSourcePropertyMappingRequest + */ +export interface LDAPSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof LDAPSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof LDAPSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof LDAPSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the LDAPSourcePropertyMappingRequest interface. + */ +export function instanceOfLDAPSourcePropertyMappingRequest(value: object): value is LDAPSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function LDAPSourcePropertyMappingRequestFromJSON(json: any): LDAPSourcePropertyMappingRequest { + return LDAPSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function LDAPSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function LDAPSourcePropertyMappingRequestToJSON(json: any): LDAPSourcePropertyMappingRequest { + return LDAPSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function LDAPSourcePropertyMappingRequestToJSONTyped(value?: LDAPSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/LDAPSourceRequest.ts b/packages/client-ts/src/models/LDAPSourceRequest.ts new file mode 100644 index 0000000000..8360df4afa --- /dev/null +++ b/packages/client-ts/src/models/LDAPSourceRequest.ts @@ -0,0 +1,365 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SyncOutgoingTriggerModeEnum } from './SyncOutgoingTriggerModeEnum'; +import { + SyncOutgoingTriggerModeEnumFromJSON, + SyncOutgoingTriggerModeEnumFromJSONTyped, + SyncOutgoingTriggerModeEnumToJSON, + SyncOutgoingTriggerModeEnumToJSONTyped, +} from './SyncOutgoingTriggerModeEnum'; + +/** + * LDAP Source Serializer + * @export + * @interface LDAPSourceRequest + */ +export interface LDAPSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof LDAPSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof LDAPSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof LDAPSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof LDAPSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof LDAPSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof LDAPSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof LDAPSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof LDAPSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof LDAPSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof LDAPSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + icon?: string; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + serverUri: string; + /** + * Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. + * @type {string} + * @memberof LDAPSourceRequest + */ + peerCertificate?: string | null; + /** + * Client certificate to authenticate against the LDAP Server's Certificate. + * @type {string} + * @memberof LDAPSourceRequest + */ + clientCertificate?: string | null; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + bindCn?: string; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + bindPassword?: string; + /** + * + * @type {boolean} + * @memberof LDAPSourceRequest + */ + startTls?: boolean; + /** + * + * @type {boolean} + * @memberof LDAPSourceRequest + */ + sni?: boolean; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + baseDn: string; + /** + * Prepended to Base DN for User-queries. + * @type {string} + * @memberof LDAPSourceRequest + */ + additionalUserDn?: string; + /** + * Prepended to Base DN for Group-queries. + * @type {string} + * @memberof LDAPSourceRequest + */ + additionalGroupDn?: string; + /** + * Consider Objects matching this filter to be Users. + * @type {string} + * @memberof LDAPSourceRequest + */ + userObjectFilter?: string; + /** + * Consider Objects matching this filter to be Groups. + * @type {string} + * @memberof LDAPSourceRequest + */ + groupObjectFilter?: string; + /** + * Field which contains members of a group. + * @type {string} + * @memberof LDAPSourceRequest + */ + groupMembershipField?: string; + /** + * Attribute which matches the value of `group_membership_field`. + * @type {string} + * @memberof LDAPSourceRequest + */ + userMembershipAttribute?: string; + /** + * Field which contains a unique Identifier. + * @type {string} + * @memberof LDAPSourceRequest + */ + objectUniquenessField?: string; + /** + * Update internal authentik password when login succeeds with LDAP + * @type {boolean} + * @memberof LDAPSourceRequest + */ + passwordLoginUpdateInternalPassword?: boolean; + /** + * + * @type {boolean} + * @memberof LDAPSourceRequest + */ + syncUsers?: boolean; + /** + * When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. + * @type {boolean} + * @memberof LDAPSourceRequest + */ + syncUsersPassword?: boolean; + /** + * + * @type {boolean} + * @memberof LDAPSourceRequest + */ + syncGroups?: boolean; + /** + * + * @type {string} + * @memberof LDAPSourceRequest + */ + syncParentGroup?: string | null; + /** + * Lookup group membership based on a user attribute instead of a group attribute. This allows nested group resolution on systems like FreeIPA and Active Directory + * @type {boolean} + * @memberof LDAPSourceRequest + */ + lookupGroupsFromUser?: boolean; + /** + * Delete authentik users and groups which were previously supplied by this source, but are now missing from it. + * @type {boolean} + * @memberof LDAPSourceRequest + */ + deleteNotFoundObjects?: boolean; + /** + * When to trigger sync for outgoing providers + * @type {SyncOutgoingTriggerModeEnum} + * @memberof LDAPSourceRequest + */ + syncOutgoingTriggerMode?: SyncOutgoingTriggerModeEnum; +} + + + +/** + * Check if a given object implements the LDAPSourceRequest interface. + */ +export function instanceOfLDAPSourceRequest(value: object): value is LDAPSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('serverUri' in value) || value['serverUri'] === undefined) return false; + if (!('baseDn' in value) || value['baseDn'] === undefined) return false; + return true; +} + +export function LDAPSourceRequestFromJSON(json: any): LDAPSourceRequest { + return LDAPSourceRequestFromJSONTyped(json, false); +} + +export function LDAPSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'serverUri': json['server_uri'], + 'peerCertificate': json['peer_certificate'] == null ? undefined : json['peer_certificate'], + 'clientCertificate': json['client_certificate'] == null ? undefined : json['client_certificate'], + 'bindCn': json['bind_cn'] == null ? undefined : json['bind_cn'], + 'bindPassword': json['bind_password'] == null ? undefined : json['bind_password'], + 'startTls': json['start_tls'] == null ? undefined : json['start_tls'], + 'sni': json['sni'] == null ? undefined : json['sni'], + 'baseDn': json['base_dn'], + 'additionalUserDn': json['additional_user_dn'] == null ? undefined : json['additional_user_dn'], + 'additionalGroupDn': json['additional_group_dn'] == null ? undefined : json['additional_group_dn'], + 'userObjectFilter': json['user_object_filter'] == null ? undefined : json['user_object_filter'], + 'groupObjectFilter': json['group_object_filter'] == null ? undefined : json['group_object_filter'], + 'groupMembershipField': json['group_membership_field'] == null ? undefined : json['group_membership_field'], + 'userMembershipAttribute': json['user_membership_attribute'] == null ? undefined : json['user_membership_attribute'], + 'objectUniquenessField': json['object_uniqueness_field'] == null ? undefined : json['object_uniqueness_field'], + 'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'], + 'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'], + 'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'], + 'syncGroups': json['sync_groups'] == null ? undefined : json['sync_groups'], + 'syncParentGroup': json['sync_parent_group'] == null ? undefined : json['sync_parent_group'], + 'lookupGroupsFromUser': json['lookup_groups_from_user'] == null ? undefined : json['lookup_groups_from_user'], + 'deleteNotFoundObjects': json['delete_not_found_objects'] == null ? undefined : json['delete_not_found_objects'], + 'syncOutgoingTriggerMode': json['sync_outgoing_trigger_mode'] == null ? undefined : SyncOutgoingTriggerModeEnumFromJSON(json['sync_outgoing_trigger_mode']), + }; +} + +export function LDAPSourceRequestToJSON(json: any): LDAPSourceRequest { + return LDAPSourceRequestToJSONTyped(json, false); +} + +export function LDAPSourceRequestToJSONTyped(value?: LDAPSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'server_uri': value['serverUri'], + 'peer_certificate': value['peerCertificate'], + 'client_certificate': value['clientCertificate'], + 'bind_cn': value['bindCn'], + 'bind_password': value['bindPassword'], + 'start_tls': value['startTls'], + 'sni': value['sni'], + 'base_dn': value['baseDn'], + 'additional_user_dn': value['additionalUserDn'], + 'additional_group_dn': value['additionalGroupDn'], + 'user_object_filter': value['userObjectFilter'], + 'group_object_filter': value['groupObjectFilter'], + 'group_membership_field': value['groupMembershipField'], + 'user_membership_attribute': value['userMembershipAttribute'], + 'object_uniqueness_field': value['objectUniquenessField'], + 'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'], + 'sync_users': value['syncUsers'], + 'sync_users_password': value['syncUsersPassword'], + 'sync_groups': value['syncGroups'], + 'sync_parent_group': value['syncParentGroup'], + 'lookup_groups_from_user': value['lookupGroupsFromUser'], + 'delete_not_found_objects': value['deleteNotFoundObjects'], + 'sync_outgoing_trigger_mode': SyncOutgoingTriggerModeEnumToJSON(value['syncOutgoingTriggerMode']), + }; +} + diff --git a/packages/client-ts/src/models/LastTaskStatusEnum.ts b/packages/client-ts/src/models/LastTaskStatusEnum.ts new file mode 100644 index 0000000000..91a26ef00b --- /dev/null +++ b/packages/client-ts/src/models/LastTaskStatusEnum.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LastTaskStatusEnum = { + Queued: 'queued', + Consumed: 'consumed', + Preprocess: 'preprocess', + Running: 'running', + Postprocess: 'postprocess', + Rejected: 'rejected', + Done: 'done', + Info: 'info', + Warning: 'warning', + Error: 'error', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LastTaskStatusEnum = typeof LastTaskStatusEnum[keyof typeof LastTaskStatusEnum]; + + +export function instanceOfLastTaskStatusEnum(value: any): boolean { + for (const key in LastTaskStatusEnum) { + if (Object.prototype.hasOwnProperty.call(LastTaskStatusEnum, key)) { + if (LastTaskStatusEnum[key as keyof typeof LastTaskStatusEnum] === value) { + return true; + } + } + } + return false; +} + +export function LastTaskStatusEnumFromJSON(json: any): LastTaskStatusEnum { + return LastTaskStatusEnumFromJSONTyped(json, false); +} + +export function LastTaskStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LastTaskStatusEnum { + return json as LastTaskStatusEnum; +} + +export function LastTaskStatusEnumToJSON(value?: LastTaskStatusEnum | null): any { + return value as any; +} + +export function LastTaskStatusEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LastTaskStatusEnum { + return value as LastTaskStatusEnum; +} + diff --git a/packages/client-ts/src/models/License.ts b/packages/client-ts/src/models/License.ts new file mode 100644 index 0000000000..38b7b8f9f9 --- /dev/null +++ b/packages/client-ts/src/models/License.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * License Serializer + * @export + * @interface License + */ +export interface License { + /** + * + * @type {string} + * @memberof License + */ + readonly licenseUuid: string; + /** + * + * @type {string} + * @memberof License + */ + readonly name: string; + /** + * + * @type {string} + * @memberof License + */ + key: string; + /** + * + * @type {Date} + * @memberof License + */ + readonly expiry: Date; + /** + * + * @type {number} + * @memberof License + */ + readonly internalUsers: number; + /** + * + * @type {number} + * @memberof License + */ + readonly externalUsers: number; +} + +/** + * Check if a given object implements the License interface. + */ +export function instanceOfLicense(value: object): value is License { + if (!('licenseUuid' in value) || value['licenseUuid'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('key' in value) || value['key'] === undefined) return false; + if (!('expiry' in value) || value['expiry'] === undefined) return false; + if (!('internalUsers' in value) || value['internalUsers'] === undefined) return false; + if (!('externalUsers' in value) || value['externalUsers'] === undefined) return false; + return true; +} + +export function LicenseFromJSON(json: any): License { + return LicenseFromJSONTyped(json, false); +} + +export function LicenseFromJSONTyped(json: any, ignoreDiscriminator: boolean): License { + if (json == null) { + return json; + } + return { + + 'licenseUuid': json['license_uuid'], + 'name': json['name'], + 'key': json['key'], + 'expiry': (new Date(json['expiry'])), + 'internalUsers': json['internal_users'], + 'externalUsers': json['external_users'], + }; +} + +export function LicenseToJSON(json: any): License { + return LicenseToJSONTyped(json, false); +} + +export function LicenseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'key': value['key'], + }; +} + diff --git a/packages/client-ts/src/models/LicenseFlagsEnum.ts b/packages/client-ts/src/models/LicenseFlagsEnum.ts new file mode 100644 index 0000000000..7e6897d1d1 --- /dev/null +++ b/packages/client-ts/src/models/LicenseFlagsEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LicenseFlagsEnum = { + Trial: 'trial', + NonProduction: 'non_production', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LicenseFlagsEnum = typeof LicenseFlagsEnum[keyof typeof LicenseFlagsEnum]; + + +export function instanceOfLicenseFlagsEnum(value: any): boolean { + for (const key in LicenseFlagsEnum) { + if (Object.prototype.hasOwnProperty.call(LicenseFlagsEnum, key)) { + if (LicenseFlagsEnum[key as keyof typeof LicenseFlagsEnum] === value) { + return true; + } + } + } + return false; +} + +export function LicenseFlagsEnumFromJSON(json: any): LicenseFlagsEnum { + return LicenseFlagsEnumFromJSONTyped(json, false); +} + +export function LicenseFlagsEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LicenseFlagsEnum { + return json as LicenseFlagsEnum; +} + +export function LicenseFlagsEnumToJSON(value?: LicenseFlagsEnum | null): any { + return value as any; +} + +export function LicenseFlagsEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LicenseFlagsEnum { + return value as LicenseFlagsEnum; +} + diff --git a/packages/client-ts/src/models/LicenseForecast.ts b/packages/client-ts/src/models/LicenseForecast.ts new file mode 100644 index 0000000000..4cab879518 --- /dev/null +++ b/packages/client-ts/src/models/LicenseForecast.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for license forecast + * @export + * @interface LicenseForecast + */ +export interface LicenseForecast { + /** + * + * @type {number} + * @memberof LicenseForecast + */ + internalUsers: number; + /** + * + * @type {number} + * @memberof LicenseForecast + */ + externalUsers: number; + /** + * + * @type {number} + * @memberof LicenseForecast + */ + forecastedInternalUsers: number; + /** + * + * @type {number} + * @memberof LicenseForecast + */ + forecastedExternalUsers: number; +} + +/** + * Check if a given object implements the LicenseForecast interface. + */ +export function instanceOfLicenseForecast(value: object): value is LicenseForecast { + if (!('internalUsers' in value) || value['internalUsers'] === undefined) return false; + if (!('externalUsers' in value) || value['externalUsers'] === undefined) return false; + if (!('forecastedInternalUsers' in value) || value['forecastedInternalUsers'] === undefined) return false; + if (!('forecastedExternalUsers' in value) || value['forecastedExternalUsers'] === undefined) return false; + return true; +} + +export function LicenseForecastFromJSON(json: any): LicenseForecast { + return LicenseForecastFromJSONTyped(json, false); +} + +export function LicenseForecastFromJSONTyped(json: any, ignoreDiscriminator: boolean): LicenseForecast { + if (json == null) { + return json; + } + return { + + 'internalUsers': json['internal_users'], + 'externalUsers': json['external_users'], + 'forecastedInternalUsers': json['forecasted_internal_users'], + 'forecastedExternalUsers': json['forecasted_external_users'], + }; +} + +export function LicenseForecastToJSON(json: any): LicenseForecast { + return LicenseForecastToJSONTyped(json, false); +} + +export function LicenseForecastToJSONTyped(value?: LicenseForecast | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'internal_users': value['internalUsers'], + 'external_users': value['externalUsers'], + 'forecasted_internal_users': value['forecastedInternalUsers'], + 'forecasted_external_users': value['forecastedExternalUsers'], + }; +} + diff --git a/packages/client-ts/src/models/LicenseRequest.ts b/packages/client-ts/src/models/LicenseRequest.ts new file mode 100644 index 0000000000..19ae3b7f01 --- /dev/null +++ b/packages/client-ts/src/models/LicenseRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * License Serializer + * @export + * @interface LicenseRequest + */ +export interface LicenseRequest { + /** + * + * @type {string} + * @memberof LicenseRequest + */ + key: string; +} + +/** + * Check if a given object implements the LicenseRequest interface. + */ +export function instanceOfLicenseRequest(value: object): value is LicenseRequest { + if (!('key' in value) || value['key'] === undefined) return false; + return true; +} + +export function LicenseRequestFromJSON(json: any): LicenseRequest { + return LicenseRequestFromJSONTyped(json, false); +} + +export function LicenseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LicenseRequest { + if (json == null) { + return json; + } + return { + + 'key': json['key'], + }; +} + +export function LicenseRequestToJSON(json: any): LicenseRequest { + return LicenseRequestToJSONTyped(json, false); +} + +export function LicenseRequestToJSONTyped(value?: LicenseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'key': value['key'], + }; +} + diff --git a/packages/client-ts/src/models/LicenseStatusEnum.ts b/packages/client-ts/src/models/LicenseStatusEnum.ts new file mode 100644 index 0000000000..62baec773f --- /dev/null +++ b/packages/client-ts/src/models/LicenseStatusEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LicenseStatusEnum = { + Unlicensed: 'unlicensed', + Valid: 'valid', + Expired: 'expired', + ExpirySoon: 'expiry_soon', + LimitExceededAdmin: 'limit_exceeded_admin', + LimitExceededUser: 'limit_exceeded_user', + ReadOnly: 'read_only', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LicenseStatusEnum = typeof LicenseStatusEnum[keyof typeof LicenseStatusEnum]; + + +export function instanceOfLicenseStatusEnum(value: any): boolean { + for (const key in LicenseStatusEnum) { + if (Object.prototype.hasOwnProperty.call(LicenseStatusEnum, key)) { + if (LicenseStatusEnum[key as keyof typeof LicenseStatusEnum] === value) { + return true; + } + } + } + return false; +} + +export function LicenseStatusEnumFromJSON(json: any): LicenseStatusEnum { + return LicenseStatusEnumFromJSONTyped(json, false); +} + +export function LicenseStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LicenseStatusEnum { + return json as LicenseStatusEnum; +} + +export function LicenseStatusEnumToJSON(value?: LicenseStatusEnum | null): any { + return value as any; +} + +export function LicenseStatusEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LicenseStatusEnum { + return value as LicenseStatusEnum; +} + diff --git a/packages/client-ts/src/models/LicenseSummary.ts b/packages/client-ts/src/models/LicenseSummary.ts new file mode 100644 index 0000000000..ff911f7705 --- /dev/null +++ b/packages/client-ts/src/models/LicenseSummary.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LicenseSummaryStatusEnum } from './LicenseSummaryStatusEnum'; +import { + LicenseSummaryStatusEnumFromJSON, + LicenseSummaryStatusEnumFromJSONTyped, + LicenseSummaryStatusEnumToJSON, + LicenseSummaryStatusEnumToJSONTyped, +} from './LicenseSummaryStatusEnum'; +import type { LicenseFlagsEnum } from './LicenseFlagsEnum'; +import { + LicenseFlagsEnumFromJSON, + LicenseFlagsEnumFromJSONTyped, + LicenseFlagsEnumToJSON, + LicenseFlagsEnumToJSONTyped, +} from './LicenseFlagsEnum'; + +/** + * Serializer for license status + * @export + * @interface LicenseSummary + */ +export interface LicenseSummary { + /** + * + * @type {number} + * @memberof LicenseSummary + */ + internalUsers: number; + /** + * + * @type {number} + * @memberof LicenseSummary + */ + externalUsers: number; + /** + * + * @type {LicenseSummaryStatusEnum} + * @memberof LicenseSummary + */ + status: LicenseSummaryStatusEnum; + /** + * + * @type {Date} + * @memberof LicenseSummary + */ + latestValid: Date; + /** + * + * @type {Array} + * @memberof LicenseSummary + */ + licenseFlags: Array; +} + + + +/** + * Check if a given object implements the LicenseSummary interface. + */ +export function instanceOfLicenseSummary(value: object): value is LicenseSummary { + if (!('internalUsers' in value) || value['internalUsers'] === undefined) return false; + if (!('externalUsers' in value) || value['externalUsers'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('latestValid' in value) || value['latestValid'] === undefined) return false; + if (!('licenseFlags' in value) || value['licenseFlags'] === undefined) return false; + return true; +} + +export function LicenseSummaryFromJSON(json: any): LicenseSummary { + return LicenseSummaryFromJSONTyped(json, false); +} + +export function LicenseSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): LicenseSummary { + if (json == null) { + return json; + } + return { + + 'internalUsers': json['internal_users'], + 'externalUsers': json['external_users'], + 'status': LicenseSummaryStatusEnumFromJSON(json['status']), + 'latestValid': (new Date(json['latest_valid'])), + 'licenseFlags': ((json['license_flags'] as Array).map(LicenseFlagsEnumFromJSON)), + }; +} + +export function LicenseSummaryToJSON(json: any): LicenseSummary { + return LicenseSummaryToJSONTyped(json, false); +} + +export function LicenseSummaryToJSONTyped(value?: LicenseSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'internal_users': value['internalUsers'], + 'external_users': value['externalUsers'], + 'status': LicenseSummaryStatusEnumToJSON(value['status']), + 'latest_valid': value['latestValid'].toISOString(), + 'license_flags': ((value['licenseFlags'] as Array).map(LicenseFlagsEnumToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/LicenseSummaryStatusEnum.ts b/packages/client-ts/src/models/LicenseSummaryStatusEnum.ts new file mode 100644 index 0000000000..7044196114 --- /dev/null +++ b/packages/client-ts/src/models/LicenseSummaryStatusEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LicenseSummaryStatusEnum = { + Unlicensed: 'unlicensed', + Valid: 'valid', + Expired: 'expired', + ExpirySoon: 'expiry_soon', + LimitExceededAdmin: 'limit_exceeded_admin', + LimitExceededUser: 'limit_exceeded_user', + ReadOnly: 'read_only', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LicenseSummaryStatusEnum = typeof LicenseSummaryStatusEnum[keyof typeof LicenseSummaryStatusEnum]; + + +export function instanceOfLicenseSummaryStatusEnum(value: any): boolean { + for (const key in LicenseSummaryStatusEnum) { + if (Object.prototype.hasOwnProperty.call(LicenseSummaryStatusEnum, key)) { + if (LicenseSummaryStatusEnum[key as keyof typeof LicenseSummaryStatusEnum] === value) { + return true; + } + } + } + return false; +} + +export function LicenseSummaryStatusEnumFromJSON(json: any): LicenseSummaryStatusEnum { + return LicenseSummaryStatusEnumFromJSONTyped(json, false); +} + +export function LicenseSummaryStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LicenseSummaryStatusEnum { + return json as LicenseSummaryStatusEnum; +} + +export function LicenseSummaryStatusEnumToJSON(value?: LicenseSummaryStatusEnum | null): any { + return value as any; +} + +export function LicenseSummaryStatusEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LicenseSummaryStatusEnum { + return value as LicenseSummaryStatusEnum; +} + diff --git a/packages/client-ts/src/models/LifecycleIteration.ts b/packages/client-ts/src/models/LifecycleIteration.ts new file mode 100644 index 0000000000..8cecdd1f9b --- /dev/null +++ b/packages/client-ts/src/models/LifecycleIteration.ts @@ -0,0 +1,209 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ReviewerUser } from './ReviewerUser'; +import { + ReviewerUserFromJSON, + ReviewerUserFromJSONTyped, + ReviewerUserToJSON, + ReviewerUserToJSONTyped, +} from './ReviewerUser'; +import type { ReviewerGroup } from './ReviewerGroup'; +import { + ReviewerGroupFromJSON, + ReviewerGroupFromJSONTyped, + ReviewerGroupToJSON, + ReviewerGroupToJSONTyped, +} from './ReviewerGroup'; +import type { ContentTypeEnum } from './ContentTypeEnum'; +import { + ContentTypeEnumFromJSON, + ContentTypeEnumFromJSONTyped, + ContentTypeEnumToJSON, + ContentTypeEnumToJSONTyped, +} from './ContentTypeEnum'; +import type { Review } from './Review'; +import { + ReviewFromJSON, + ReviewFromJSONTyped, + ReviewToJSON, + ReviewToJSONTyped, +} from './Review'; +import type { LifecycleIterationStateEnum } from './LifecycleIterationStateEnum'; +import { + LifecycleIterationStateEnumFromJSON, + LifecycleIterationStateEnumFromJSONTyped, + LifecycleIterationStateEnumToJSON, + LifecycleIterationStateEnumToJSONTyped, +} from './LifecycleIterationStateEnum'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface LifecycleIteration + */ +export interface LifecycleIteration { + /** + * + * @type {string} + * @memberof LifecycleIteration + */ + readonly id: string; + /** + * + * @type {ContentTypeEnum} + * @memberof LifecycleIteration + */ + contentType: ContentTypeEnum; + /** + * + * @type {string} + * @memberof LifecycleIteration + */ + readonly objectId: string; + /** + * + * @type {string} + * @memberof LifecycleIteration + */ + readonly objectVerbose: string; + /** + * + * @type {string} + * @memberof LifecycleIteration + */ + readonly objectAdminUrl: string; + /** + * + * @type {LifecycleIterationStateEnum} + * @memberof LifecycleIteration + */ + readonly state: LifecycleIterationStateEnum; + /** + * + * @type {Date} + * @memberof LifecycleIteration + */ + readonly openedOn: Date; + /** + * + * @type {Date} + * @memberof LifecycleIteration + */ + readonly gracePeriodEnd: Date; + /** + * + * @type {Date} + * @memberof LifecycleIteration + */ + readonly nextReviewDate: Date; + /** + * + * @type {Array} + * @memberof LifecycleIteration + */ + readonly reviews: Array; + /** + * + * @type {boolean} + * @memberof LifecycleIteration + */ + readonly userCanReview: boolean; + /** + * + * @type {Array} + * @memberof LifecycleIteration + */ + readonly reviewerGroups: Array; + /** + * + * @type {number} + * @memberof LifecycleIteration + */ + readonly minReviewers: number; + /** + * + * @type {Array} + * @memberof LifecycleIteration + */ + readonly reviewers: Array; +} + + + +/** + * Check if a given object implements the LifecycleIteration interface. + */ +export function instanceOfLifecycleIteration(value: object): value is LifecycleIteration { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('contentType' in value) || value['contentType'] === undefined) return false; + if (!('objectId' in value) || value['objectId'] === undefined) return false; + if (!('objectVerbose' in value) || value['objectVerbose'] === undefined) return false; + if (!('objectAdminUrl' in value) || value['objectAdminUrl'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; + if (!('openedOn' in value) || value['openedOn'] === undefined) return false; + if (!('gracePeriodEnd' in value) || value['gracePeriodEnd'] === undefined) return false; + if (!('nextReviewDate' in value) || value['nextReviewDate'] === undefined) return false; + if (!('reviews' in value) || value['reviews'] === undefined) return false; + if (!('userCanReview' in value) || value['userCanReview'] === undefined) return false; + if (!('reviewerGroups' in value) || value['reviewerGroups'] === undefined) return false; + if (!('minReviewers' in value) || value['minReviewers'] === undefined) return false; + if (!('reviewers' in value) || value['reviewers'] === undefined) return false; + return true; +} + +export function LifecycleIterationFromJSON(json: any): LifecycleIteration { + return LifecycleIterationFromJSONTyped(json, false); +} + +export function LifecycleIterationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleIteration { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'contentType': ContentTypeEnumFromJSON(json['content_type']), + 'objectId': json['object_id'], + 'objectVerbose': json['object_verbose'], + 'objectAdminUrl': json['object_admin_url'], + 'state': LifecycleIterationStateEnumFromJSON(json['state']), + 'openedOn': (new Date(json['opened_on'])), + 'gracePeriodEnd': (new Date(json['grace_period_end'])), + 'nextReviewDate': (new Date(json['next_review_date'])), + 'reviews': ((json['reviews'] as Array).map(ReviewFromJSON)), + 'userCanReview': json['user_can_review'], + 'reviewerGroups': ((json['reviewer_groups'] as Array).map(ReviewerGroupFromJSON)), + 'minReviewers': json['min_reviewers'], + 'reviewers': ((json['reviewers'] as Array).map(ReviewerUserFromJSON)), + }; +} + +export function LifecycleIterationToJSON(json: any): LifecycleIteration { + return LifecycleIterationToJSONTyped(json, false); +} + +export function LifecycleIterationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content_type': ContentTypeEnumToJSON(value['contentType']), + }; +} + diff --git a/packages/client-ts/src/models/LifecycleIterationRequest.ts b/packages/client-ts/src/models/LifecycleIterationRequest.ts new file mode 100644 index 0000000000..e9db40f1c3 --- /dev/null +++ b/packages/client-ts/src/models/LifecycleIterationRequest.ts @@ -0,0 +1,77 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ContentTypeEnum } from './ContentTypeEnum'; +import { + ContentTypeEnumFromJSON, + ContentTypeEnumFromJSONTyped, + ContentTypeEnumToJSON, + ContentTypeEnumToJSONTyped, +} from './ContentTypeEnum'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface LifecycleIterationRequest + */ +export interface LifecycleIterationRequest { + /** + * + * @type {ContentTypeEnum} + * @memberof LifecycleIterationRequest + */ + contentType: ContentTypeEnum; +} + + + +/** + * Check if a given object implements the LifecycleIterationRequest interface. + */ +export function instanceOfLifecycleIterationRequest(value: object): value is LifecycleIterationRequest { + if (!('contentType' in value) || value['contentType'] === undefined) return false; + return true; +} + +export function LifecycleIterationRequestFromJSON(json: any): LifecycleIterationRequest { + return LifecycleIterationRequestFromJSONTyped(json, false); +} + +export function LifecycleIterationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleIterationRequest { + if (json == null) { + return json; + } + return { + + 'contentType': ContentTypeEnumFromJSON(json['content_type']), + }; +} + +export function LifecycleIterationRequestToJSON(json: any): LifecycleIterationRequest { + return LifecycleIterationRequestToJSONTyped(json, false); +} + +export function LifecycleIterationRequestToJSONTyped(value?: LifecycleIterationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content_type': ContentTypeEnumToJSON(value['contentType']), + }; +} + diff --git a/packages/client-ts/src/models/LifecycleIterationStateEnum.ts b/packages/client-ts/src/models/LifecycleIterationStateEnum.ts new file mode 100644 index 0000000000..ecdd849c18 --- /dev/null +++ b/packages/client-ts/src/models/LifecycleIterationStateEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LifecycleIterationStateEnum = { + Reviewed: 'REVIEWED', + Pending: 'PENDING', + Overdue: 'OVERDUE', + Canceled: 'CANCELED', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LifecycleIterationStateEnum = typeof LifecycleIterationStateEnum[keyof typeof LifecycleIterationStateEnum]; + + +export function instanceOfLifecycleIterationStateEnum(value: any): boolean { + for (const key in LifecycleIterationStateEnum) { + if (Object.prototype.hasOwnProperty.call(LifecycleIterationStateEnum, key)) { + if (LifecycleIterationStateEnum[key as keyof typeof LifecycleIterationStateEnum] === value) { + return true; + } + } + } + return false; +} + +export function LifecycleIterationStateEnumFromJSON(json: any): LifecycleIterationStateEnum { + return LifecycleIterationStateEnumFromJSONTyped(json, false); +} + +export function LifecycleIterationStateEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleIterationStateEnum { + return json as LifecycleIterationStateEnum; +} + +export function LifecycleIterationStateEnumToJSON(value?: LifecycleIterationStateEnum | null): any { + return value as any; +} + +export function LifecycleIterationStateEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LifecycleIterationStateEnum { + return value as LifecycleIterationStateEnum; +} + diff --git a/packages/client-ts/src/models/LifecycleRule.ts b/packages/client-ts/src/models/LifecycleRule.ts new file mode 100644 index 0000000000..6c7568af79 --- /dev/null +++ b/packages/client-ts/src/models/LifecycleRule.ts @@ -0,0 +1,197 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ReviewerUser } from './ReviewerUser'; +import { + ReviewerUserFromJSON, + ReviewerUserFromJSONTyped, + ReviewerUserToJSON, + ReviewerUserToJSONTyped, +} from './ReviewerUser'; +import type { ReviewerGroup } from './ReviewerGroup'; +import { + ReviewerGroupFromJSON, + ReviewerGroupFromJSONTyped, + ReviewerGroupToJSON, + ReviewerGroupToJSONTyped, +} from './ReviewerGroup'; +import type { ContentTypeEnum } from './ContentTypeEnum'; +import { + ContentTypeEnumFromJSON, + ContentTypeEnumFromJSONTyped, + ContentTypeEnumToJSON, + ContentTypeEnumToJSONTyped, +} from './ContentTypeEnum'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface LifecycleRule + */ +export interface LifecycleRule { + /** + * + * @type {string} + * @memberof LifecycleRule + */ + readonly id: string; + /** + * + * @type {string} + * @memberof LifecycleRule + */ + name: string; + /** + * + * @type {ContentTypeEnum} + * @memberof LifecycleRule + */ + contentType: ContentTypeEnum; + /** + * + * @type {string} + * @memberof LifecycleRule + */ + objectId?: string | null; + /** + * + * @type {string} + * @memberof LifecycleRule + */ + interval?: string; + /** + * + * @type {string} + * @memberof LifecycleRule + */ + gracePeriod?: string; + /** + * + * @type {Array} + * @memberof LifecycleRule + */ + reviewerGroups?: Array; + /** + * + * @type {Array} + * @memberof LifecycleRule + */ + readonly reviewerGroupsObj: Array; + /** + * + * @type {number} + * @memberof LifecycleRule + */ + minReviewers?: number; + /** + * + * @type {boolean} + * @memberof LifecycleRule + */ + minReviewersIsPerGroup?: boolean; + /** + * + * @type {Array} + * @memberof LifecycleRule + */ + reviewers: Array; + /** + * + * @type {Array} + * @memberof LifecycleRule + */ + readonly reviewersObj: Array; + /** + * Select which transports should be used to notify the reviewers. If none are selected, the notification will only be shown in the authentik UI. + * @type {Array} + * @memberof LifecycleRule + */ + notificationTransports?: Array; + /** + * + * @type {string} + * @memberof LifecycleRule + */ + readonly targetVerbose: string; +} + + + +/** + * Check if a given object implements the LifecycleRule interface. + */ +export function instanceOfLifecycleRule(value: object): value is LifecycleRule { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('contentType' in value) || value['contentType'] === undefined) return false; + if (!('reviewerGroupsObj' in value) || value['reviewerGroupsObj'] === undefined) return false; + if (!('reviewers' in value) || value['reviewers'] === undefined) return false; + if (!('reviewersObj' in value) || value['reviewersObj'] === undefined) return false; + if (!('targetVerbose' in value) || value['targetVerbose'] === undefined) return false; + return true; +} + +export function LifecycleRuleFromJSON(json: any): LifecycleRule { + return LifecycleRuleFromJSONTyped(json, false); +} + +export function LifecycleRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleRule { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + 'contentType': ContentTypeEnumFromJSON(json['content_type']), + 'objectId': json['object_id'] == null ? undefined : json['object_id'], + 'interval': json['interval'] == null ? undefined : json['interval'], + 'gracePeriod': json['grace_period'] == null ? undefined : json['grace_period'], + 'reviewerGroups': json['reviewer_groups'] == null ? undefined : json['reviewer_groups'], + 'reviewerGroupsObj': ((json['reviewer_groups_obj'] as Array).map(ReviewerGroupFromJSON)), + 'minReviewers': json['min_reviewers'] == null ? undefined : json['min_reviewers'], + 'minReviewersIsPerGroup': json['min_reviewers_is_per_group'] == null ? undefined : json['min_reviewers_is_per_group'], + 'reviewers': json['reviewers'], + 'reviewersObj': ((json['reviewers_obj'] as Array).map(ReviewerUserFromJSON)), + 'notificationTransports': json['notification_transports'] == null ? undefined : json['notification_transports'], + 'targetVerbose': json['target_verbose'], + }; +} + +export function LifecycleRuleToJSON(json: any): LifecycleRule { + return LifecycleRuleToJSONTyped(json, false); +} + +export function LifecycleRuleToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'content_type': ContentTypeEnumToJSON(value['contentType']), + 'object_id': value['objectId'], + 'interval': value['interval'], + 'grace_period': value['gracePeriod'], + 'reviewer_groups': value['reviewerGroups'], + 'min_reviewers': value['minReviewers'], + 'min_reviewers_is_per_group': value['minReviewersIsPerGroup'], + 'reviewers': value['reviewers'], + 'notification_transports': value['notificationTransports'], + }; +} + diff --git a/packages/client-ts/src/models/LifecycleRuleRequest.ts b/packages/client-ts/src/models/LifecycleRuleRequest.ts new file mode 100644 index 0000000000..8b56d7f869 --- /dev/null +++ b/packages/client-ts/src/models/LifecycleRuleRequest.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ContentTypeEnum } from './ContentTypeEnum'; +import { + ContentTypeEnumFromJSON, + ContentTypeEnumFromJSONTyped, + ContentTypeEnumToJSON, + ContentTypeEnumToJSONTyped, +} from './ContentTypeEnum'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface LifecycleRuleRequest + */ +export interface LifecycleRuleRequest { + /** + * + * @type {string} + * @memberof LifecycleRuleRequest + */ + name: string; + /** + * + * @type {ContentTypeEnum} + * @memberof LifecycleRuleRequest + */ + contentType: ContentTypeEnum; + /** + * + * @type {string} + * @memberof LifecycleRuleRequest + */ + objectId?: string | null; + /** + * + * @type {string} + * @memberof LifecycleRuleRequest + */ + interval?: string; + /** + * + * @type {string} + * @memberof LifecycleRuleRequest + */ + gracePeriod?: string; + /** + * + * @type {Array} + * @memberof LifecycleRuleRequest + */ + reviewerGroups?: Array; + /** + * + * @type {number} + * @memberof LifecycleRuleRequest + */ + minReviewers?: number; + /** + * + * @type {boolean} + * @memberof LifecycleRuleRequest + */ + minReviewersIsPerGroup?: boolean; + /** + * + * @type {Array} + * @memberof LifecycleRuleRequest + */ + reviewers: Array; + /** + * Select which transports should be used to notify the reviewers. If none are selected, the notification will only be shown in the authentik UI. + * @type {Array} + * @memberof LifecycleRuleRequest + */ + notificationTransports?: Array; +} + + + +/** + * Check if a given object implements the LifecycleRuleRequest interface. + */ +export function instanceOfLifecycleRuleRequest(value: object): value is LifecycleRuleRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('contentType' in value) || value['contentType'] === undefined) return false; + if (!('reviewers' in value) || value['reviewers'] === undefined) return false; + return true; +} + +export function LifecycleRuleRequestFromJSON(json: any): LifecycleRuleRequest { + return LifecycleRuleRequestFromJSONTyped(json, false); +} + +export function LifecycleRuleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleRuleRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'contentType': ContentTypeEnumFromJSON(json['content_type']), + 'objectId': json['object_id'] == null ? undefined : json['object_id'], + 'interval': json['interval'] == null ? undefined : json['interval'], + 'gracePeriod': json['grace_period'] == null ? undefined : json['grace_period'], + 'reviewerGroups': json['reviewer_groups'] == null ? undefined : json['reviewer_groups'], + 'minReviewers': json['min_reviewers'] == null ? undefined : json['min_reviewers'], + 'minReviewersIsPerGroup': json['min_reviewers_is_per_group'] == null ? undefined : json['min_reviewers_is_per_group'], + 'reviewers': json['reviewers'], + 'notificationTransports': json['notification_transports'] == null ? undefined : json['notification_transports'], + }; +} + +export function LifecycleRuleRequestToJSON(json: any): LifecycleRuleRequest { + return LifecycleRuleRequestToJSONTyped(json, false); +} + +export function LifecycleRuleRequestToJSONTyped(value?: LifecycleRuleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'content_type': ContentTypeEnumToJSON(value['contentType']), + 'object_id': value['objectId'], + 'interval': value['interval'], + 'grace_period': value['gracePeriod'], + 'reviewer_groups': value['reviewerGroups'], + 'min_reviewers': value['minReviewers'], + 'min_reviewers_is_per_group': value['minReviewersIsPerGroup'], + 'reviewers': value['reviewers'], + 'notification_transports': value['notificationTransports'], + }; +} + diff --git a/packages/client-ts/src/models/Link.ts b/packages/client-ts/src/models/Link.ts new file mode 100644 index 0000000000..83c340bf1e --- /dev/null +++ b/packages/client-ts/src/models/Link.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Returns a single link + * @export + * @interface Link + */ +export interface Link { + /** + * + * @type {string} + * @memberof Link + */ + link: string; +} + +/** + * Check if a given object implements the Link interface. + */ +export function instanceOfLink(value: object): value is Link { + if (!('link' in value) || value['link'] === undefined) return false; + return true; +} + +export function LinkFromJSON(json: any): Link { + return LinkFromJSONTyped(json, false); +} + +export function LinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Link { + if (json == null) { + return json; + } + return { + + 'link': json['link'], + }; +} + +export function LinkToJSON(json: any): Link { + return LinkToJSONTyped(json, false); +} + +export function LinkToJSONTyped(value?: Link | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'link': value['link'], + }; +} + diff --git a/packages/client-ts/src/models/LogEvent.ts b/packages/client-ts/src/models/LogEvent.ts new file mode 100644 index 0000000000..067557b8eb --- /dev/null +++ b/packages/client-ts/src/models/LogEvent.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LogLevelEnum } from './LogLevelEnum'; +import { + LogLevelEnumFromJSON, + LogLevelEnumFromJSONTyped, + LogLevelEnumToJSON, + LogLevelEnumToJSONTyped, +} from './LogLevelEnum'; + +/** + * Single log message with all context logged. + * @export + * @interface LogEvent + */ +export interface LogEvent { + /** + * + * @type {Date} + * @memberof LogEvent + */ + timestamp: Date; + /** + * + * @type {LogLevelEnum} + * @memberof LogEvent + */ + logLevel: LogLevelEnum; + /** + * + * @type {string} + * @memberof LogEvent + */ + logger: string; + /** + * + * @type {string} + * @memberof LogEvent + */ + event: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof LogEvent + */ + attributes: { [key: string]: any; }; +} + + + +/** + * Check if a given object implements the LogEvent interface. + */ +export function instanceOfLogEvent(value: object): value is LogEvent { + if (!('timestamp' in value) || value['timestamp'] === undefined) return false; + if (!('logLevel' in value) || value['logLevel'] === undefined) return false; + if (!('logger' in value) || value['logger'] === undefined) return false; + if (!('event' in value) || value['event'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function LogEventFromJSON(json: any): LogEvent { + return LogEventFromJSONTyped(json, false); +} + +export function LogEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogEvent { + if (json == null) { + return json; + } + return { + + 'timestamp': (new Date(json['timestamp'])), + 'logLevel': LogLevelEnumFromJSON(json['log_level']), + 'logger': json['logger'], + 'event': json['event'], + 'attributes': json['attributes'], + }; +} + +export function LogEventToJSON(json: any): LogEvent { + return LogEventToJSONTyped(json, false); +} + +export function LogEventToJSONTyped(value?: LogEvent | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'timestamp': value['timestamp'].toISOString(), + 'log_level': LogLevelEnumToJSON(value['logLevel']), + 'logger': value['logger'], + 'event': value['event'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/LogLevelEnum.ts b/packages/client-ts/src/models/LogLevelEnum.ts new file mode 100644 index 0000000000..8b55b1fe2e --- /dev/null +++ b/packages/client-ts/src/models/LogLevelEnum.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const LogLevelEnum = { + Critical: 'critical', + Exception: 'exception', + Error: 'error', + Warn: 'warn', + Warning: 'warning', + Info: 'info', + Debug: 'debug', + Notset: 'notset', + UnknownDefaultOpenApi: '11184809' +} as const; +export type LogLevelEnum = typeof LogLevelEnum[keyof typeof LogLevelEnum]; + + +export function instanceOfLogLevelEnum(value: any): boolean { + for (const key in LogLevelEnum) { + if (Object.prototype.hasOwnProperty.call(LogLevelEnum, key)) { + if (LogLevelEnum[key as keyof typeof LogLevelEnum] === value) { + return true; + } + } + } + return false; +} + +export function LogLevelEnumFromJSON(json: any): LogLevelEnum { + return LogLevelEnumFromJSONTyped(json, false); +} + +export function LogLevelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogLevelEnum { + return json as LogLevelEnum; +} + +export function LogLevelEnumToJSON(value?: LogLevelEnum | null): any { + return value as any; +} + +export function LogLevelEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): LogLevelEnum { + return value as LogLevelEnum; +} + diff --git a/packages/client-ts/src/models/LoginChallengeTypes.ts b/packages/client-ts/src/models/LoginChallengeTypes.ts new file mode 100644 index 0000000000..536cdb7044 --- /dev/null +++ b/packages/client-ts/src/models/LoginChallengeTypes.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { AppleLoginChallenge } from './AppleLoginChallenge'; +import { + instanceOfAppleLoginChallenge, + AppleLoginChallengeFromJSON, + AppleLoginChallengeFromJSONTyped, + AppleLoginChallengeToJSON, +} from './AppleLoginChallenge'; +import type { PlexAuthenticationChallenge } from './PlexAuthenticationChallenge'; +import { + instanceOfPlexAuthenticationChallenge, + PlexAuthenticationChallengeFromJSON, + PlexAuthenticationChallengeFromJSONTyped, + PlexAuthenticationChallengeToJSON, +} from './PlexAuthenticationChallenge'; +import type { RedirectChallenge } from './RedirectChallenge'; +import { + instanceOfRedirectChallenge, + RedirectChallengeFromJSON, + RedirectChallengeFromJSONTyped, + RedirectChallengeToJSON, +} from './RedirectChallenge'; +import type { TelegramLoginChallenge } from './TelegramLoginChallenge'; +import { + instanceOfTelegramLoginChallenge, + TelegramLoginChallengeFromJSON, + TelegramLoginChallengeFromJSONTyped, + TelegramLoginChallengeToJSON, +} from './TelegramLoginChallenge'; + +/** + * @type LoginChallengeTypes + * + * @export + */ +export type LoginChallengeTypes = { component: 'ak-source-oauth-apple' } & AppleLoginChallenge | { component: 'ak-source-plex' } & PlexAuthenticationChallenge | { component: 'ak-source-telegram' } & TelegramLoginChallenge | { component: 'xak-flow-redirect' } & RedirectChallenge; + +export function LoginChallengeTypesFromJSON(json: any): LoginChallengeTypes { + return LoginChallengeTypesFromJSONTyped(json, false); +} + +export function LoginChallengeTypesFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginChallengeTypes { + if (json == null) { + return json; + } + switch (json['component']) { + case 'ak-source-oauth-apple': + return Object.assign({}, AppleLoginChallengeFromJSONTyped(json, true), { component: 'ak-source-oauth-apple' } as const); + case 'ak-source-plex': + return Object.assign({}, PlexAuthenticationChallengeFromJSONTyped(json, true), { component: 'ak-source-plex' } as const); + case 'ak-source-telegram': + return Object.assign({}, TelegramLoginChallengeFromJSONTyped(json, true), { component: 'ak-source-telegram' } as const); + case 'xak-flow-redirect': + return Object.assign({}, RedirectChallengeFromJSONTyped(json, true), { component: 'xak-flow-redirect' } as const); + default: + return json; + } +} + +export function LoginChallengeTypesToJSON(json: any): any { + return LoginChallengeTypesToJSONTyped(json, false); +} + +export function LoginChallengeTypesToJSONTyped(value?: LoginChallengeTypes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['component']) { + case 'ak-source-oauth-apple': + return Object.assign({}, AppleLoginChallengeToJSON(value), { component: 'ak-source-oauth-apple' } as const); + case 'ak-source-plex': + return Object.assign({}, PlexAuthenticationChallengeToJSON(value), { component: 'ak-source-plex' } as const); + case 'ak-source-telegram': + return Object.assign({}, TelegramLoginChallengeToJSON(value), { component: 'ak-source-telegram' } as const); + case 'xak-flow-redirect': + return Object.assign({}, RedirectChallengeToJSON(value), { component: 'xak-flow-redirect' } as const); + default: + return value; + } +} + diff --git a/packages/client-ts/src/models/LoginSource.ts b/packages/client-ts/src/models/LoginSource.ts new file mode 100644 index 0000000000..02278cfe9b --- /dev/null +++ b/packages/client-ts/src/models/LoginSource.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LoginChallengeTypes } from './LoginChallengeTypes'; +import { + LoginChallengeTypesFromJSON, + LoginChallengeTypesFromJSONTyped, + LoginChallengeTypesToJSON, + LoginChallengeTypesToJSONTyped, +} from './LoginChallengeTypes'; + +/** + * Serializer for Login buttons of sources + * @export + * @interface LoginSource + */ +export interface LoginSource { + /** + * + * @type {string} + * @memberof LoginSource + */ + name: string; + /** + * + * @type {string} + * @memberof LoginSource + */ + iconUrl?: string | null; + /** + * + * @type {boolean} + * @memberof LoginSource + */ + promoted?: boolean; + /** + * + * @type {LoginChallengeTypes} + * @memberof LoginSource + */ + challenge: LoginChallengeTypes; +} + +/** + * Check if a given object implements the LoginSource interface. + */ +export function instanceOfLoginSource(value: object): value is LoginSource { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('challenge' in value) || value['challenge'] === undefined) return false; + return true; +} + +export function LoginSourceFromJSON(json: any): LoginSource { + return LoginSourceFromJSONTyped(json, false); +} + +export function LoginSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginSource { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'challenge': LoginChallengeTypesFromJSON(json['challenge']), + }; +} + +export function LoginSourceToJSON(json: any): LoginSource { + return LoginSourceToJSONTyped(json, false); +} + +export function LoginSourceToJSONTyped(value?: LoginSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'icon_url': value['iconUrl'], + 'promoted': value['promoted'], + 'challenge': LoginChallengeTypesToJSON(value['challenge']), + }; +} + diff --git a/packages/client-ts/src/models/LogoutURL.ts b/packages/client-ts/src/models/LogoutURL.ts new file mode 100644 index 0000000000..fe87464001 --- /dev/null +++ b/packages/client-ts/src/models/LogoutURL.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Data for a single logout URL + * @export + * @interface LogoutURL + */ +export interface LogoutURL { + /** + * + * @type {string} + * @memberof LogoutURL + */ + url: string; + /** + * + * @type {string} + * @memberof LogoutURL + */ + providerName?: string | null; + /** + * + * @type {string} + * @memberof LogoutURL + */ + binding?: string | null; + /** + * + * @type {string} + * @memberof LogoutURL + */ + samlRequest?: string | null; + /** + * + * @type {string} + * @memberof LogoutURL + */ + samlResponse?: string | null; + /** + * + * @type {string} + * @memberof LogoutURL + */ + samlRelayState?: string | null; +} + +/** + * Check if a given object implements the LogoutURL interface. + */ +export function instanceOfLogoutURL(value: object): value is LogoutURL { + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function LogoutURLFromJSON(json: any): LogoutURL { + return LogoutURLFromJSONTyped(json, false); +} + +export function LogoutURLFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogoutURL { + if (json == null) { + return json; + } + return { + + 'url': json['url'], + 'providerName': json['provider_name'] == null ? undefined : json['provider_name'], + 'binding': json['binding'] == null ? undefined : json['binding'], + 'samlRequest': json['saml_request'] == null ? undefined : json['saml_request'], + 'samlResponse': json['saml_response'] == null ? undefined : json['saml_response'], + 'samlRelayState': json['saml_relay_state'] == null ? undefined : json['saml_relay_state'], + }; +} + +export function LogoutURLToJSON(json: any): LogoutURL { + return LogoutURLToJSONTyped(json, false); +} + +export function LogoutURLToJSONTyped(value?: LogoutURL | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'url': value['url'], + 'provider_name': value['providerName'], + 'binding': value['binding'], + 'saml_request': value['samlRequest'], + 'saml_response': value['samlResponse'], + 'saml_relay_state': value['samlRelayState'], + }; +} + diff --git a/packages/client-ts/src/models/MDMConfigRequest.ts b/packages/client-ts/src/models/MDMConfigRequest.ts new file mode 100644 index 0000000000..1c59dcac2b --- /dev/null +++ b/packages/client-ts/src/models/MDMConfigRequest.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceFactsOSFamily } from './DeviceFactsOSFamily'; +import { + DeviceFactsOSFamilyFromJSON, + DeviceFactsOSFamilyFromJSONTyped, + DeviceFactsOSFamilyToJSON, + DeviceFactsOSFamilyToJSONTyped, +} from './DeviceFactsOSFamily'; + +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface MDMConfigRequest + */ +export interface MDMConfigRequest { + /** + * + * @type {DeviceFactsOSFamily} + * @memberof MDMConfigRequest + */ + platform: DeviceFactsOSFamily; + /** + * + * @type {string} + * @memberof MDMConfigRequest + */ + enrollmentToken: string; +} + + + +/** + * Check if a given object implements the MDMConfigRequest interface. + */ +export function instanceOfMDMConfigRequest(value: object): value is MDMConfigRequest { + if (!('platform' in value) || value['platform'] === undefined) return false; + if (!('enrollmentToken' in value) || value['enrollmentToken'] === undefined) return false; + return true; +} + +export function MDMConfigRequestFromJSON(json: any): MDMConfigRequest { + return MDMConfigRequestFromJSONTyped(json, false); +} + +export function MDMConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MDMConfigRequest { + if (json == null) { + return json; + } + return { + + 'platform': DeviceFactsOSFamilyFromJSON(json['platform']), + 'enrollmentToken': json['enrollment_token'], + }; +} + +export function MDMConfigRequestToJSON(json: any): MDMConfigRequest { + return MDMConfigRequestToJSONTyped(json, false); +} + +export function MDMConfigRequestToJSONTyped(value?: MDMConfigRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'platform': DeviceFactsOSFamilyToJSON(value['platform']), + 'enrollment_token': value['enrollmentToken'], + }; +} + diff --git a/packages/client-ts/src/models/MDMConfigResponse.ts b/packages/client-ts/src/models/MDMConfigResponse.ts new file mode 100644 index 0000000000..4c3e8bc85b --- /dev/null +++ b/packages/client-ts/src/models/MDMConfigResponse.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface MDMConfigResponse + */ +export interface MDMConfigResponse { + /** + * + * @type {string} + * @memberof MDMConfigResponse + */ + config: string; + /** + * + * @type {string} + * @memberof MDMConfigResponse + */ + mimeType: string; + /** + * + * @type {string} + * @memberof MDMConfigResponse + */ + filename: string; +} + +/** + * Check if a given object implements the MDMConfigResponse interface. + */ +export function instanceOfMDMConfigResponse(value: object): value is MDMConfigResponse { + if (!('config' in value) || value['config'] === undefined) return false; + if (!('mimeType' in value) || value['mimeType'] === undefined) return false; + if (!('filename' in value) || value['filename'] === undefined) return false; + return true; +} + +export function MDMConfigResponseFromJSON(json: any): MDMConfigResponse { + return MDMConfigResponseFromJSONTyped(json, false); +} + +export function MDMConfigResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MDMConfigResponse { + if (json == null) { + return json; + } + return { + + 'config': json['config'], + 'mimeType': json['mime_type'], + 'filename': json['filename'], + }; +} + +export function MDMConfigResponseToJSON(json: any): MDMConfigResponse { + return MDMConfigResponseToJSONTyped(json, false); +} + +export function MDMConfigResponseToJSONTyped(value?: MDMConfigResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'config': value['config'], + 'mime_type': value['mimeType'], + 'filename': value['filename'], + }; +} + diff --git a/packages/client-ts/src/models/MatchingModeEnum.ts b/packages/client-ts/src/models/MatchingModeEnum.ts new file mode 100644 index 0000000000..baac69bd67 --- /dev/null +++ b/packages/client-ts/src/models/MatchingModeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const MatchingModeEnum = { + Strict: 'strict', + Regex: 'regex', + UnknownDefaultOpenApi: '11184809' +} as const; +export type MatchingModeEnum = typeof MatchingModeEnum[keyof typeof MatchingModeEnum]; + + +export function instanceOfMatchingModeEnum(value: any): boolean { + for (const key in MatchingModeEnum) { + if (Object.prototype.hasOwnProperty.call(MatchingModeEnum, key)) { + if (MatchingModeEnum[key as keyof typeof MatchingModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function MatchingModeEnumFromJSON(json: any): MatchingModeEnum { + return MatchingModeEnumFromJSONTyped(json, false); +} + +export function MatchingModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): MatchingModeEnum { + return json as MatchingModeEnum; +} + +export function MatchingModeEnumToJSON(value?: MatchingModeEnum | null): any { + return value as any; +} + +export function MatchingModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): MatchingModeEnum { + return value as MatchingModeEnum; +} + diff --git a/packages/client-ts/src/models/Metadata.ts b/packages/client-ts/src/models/Metadata.ts new file mode 100644 index 0000000000..4a9772779b --- /dev/null +++ b/packages/client-ts/src/models/Metadata.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for blueprint metadata + * @export + * @interface Metadata + */ +export interface Metadata { + /** + * + * @type {string} + * @memberof Metadata + */ + name: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Metadata + */ + labels: { [key: string]: any; }; +} + +/** + * Check if a given object implements the Metadata interface. + */ +export function instanceOfMetadata(value: object): value is Metadata { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('labels' in value) || value['labels'] === undefined) return false; + return true; +} + +export function MetadataFromJSON(json: any): Metadata { + return MetadataFromJSONTyped(json, false); +} + +export function MetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): Metadata { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'labels': json['labels'], + }; +} + +export function MetadataToJSON(json: any): Metadata { + return MetadataToJSONTyped(json, false); +} + +export function MetadataToJSONTyped(value?: Metadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'labels': value['labels'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProvider.ts b/packages/client-ts/src/models/MicrosoftEntraProvider.ts new file mode 100644 index 0000000000..a0fcd9b438 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProvider.ts @@ -0,0 +1,231 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction'; +import { + OutgoingSyncDeleteActionFromJSON, + OutgoingSyncDeleteActionFromJSONTyped, + OutgoingSyncDeleteActionToJSON, + OutgoingSyncDeleteActionToJSONTyped, +} from './OutgoingSyncDeleteAction'; + +/** + * MicrosoftEntraProvider Serializer + * @export + * @interface MicrosoftEntraProvider + */ +export interface MicrosoftEntraProvider { + /** + * + * @type {number} + * @memberof MicrosoftEntraProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof MicrosoftEntraProvider + */ + name: string; + /** + * + * @type {Array} + * @memberof MicrosoftEntraProvider + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof MicrosoftEntraProvider + */ + propertyMappingsGroup?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof MicrosoftEntraProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof MicrosoftEntraProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof MicrosoftEntraProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof MicrosoftEntraProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof MicrosoftEntraProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof MicrosoftEntraProvider + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProvider + */ + clientId: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProvider + */ + clientSecret: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProvider + */ + tenantId: string; + /** + * + * @type {boolean} + * @memberof MicrosoftEntraProvider + */ + excludeUsersServiceAccount?: boolean; + /** + * + * @type {string} + * @memberof MicrosoftEntraProvider + */ + filterGroup?: string | null; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof MicrosoftEntraProvider + */ + userDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof MicrosoftEntraProvider + */ + groupDeleteAction?: OutgoingSyncDeleteAction; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof MicrosoftEntraProvider + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof MicrosoftEntraProvider + */ + syncPageTimeout?: string; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof MicrosoftEntraProvider + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the MicrosoftEntraProvider interface. + */ +export function instanceOfMicrosoftEntraProvider(value: object): value is MicrosoftEntraProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false; + if (!('tenantId' in value) || value['tenantId'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderFromJSON(json: any): MicrosoftEntraProvider { + return MicrosoftEntraProviderFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'component': json['component'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'clientId': json['client_id'], + 'clientSecret': json['client_secret'], + 'tenantId': json['tenant_id'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'], + 'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']), + 'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']), + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function MicrosoftEntraProviderToJSON(json: any): MicrosoftEntraProvider { + return MicrosoftEntraProviderToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'tenant_id': value['tenantId'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'filter_group': value['filterGroup'], + 'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']), + 'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']), + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderGroup.ts b/packages/client-ts/src/models/MicrosoftEntraProviderGroup.ts new file mode 100644 index 0000000000..5e9a8835e7 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderGroup.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * MicrosoftEntraProviderGroup Serializer + * @export + * @interface MicrosoftEntraProviderGroup + */ +export interface MicrosoftEntraProviderGroup { + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderGroup + */ + readonly id: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderGroup + */ + microsoftId: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderGroup + */ + group: string; + /** + * + * @type {PartialGroup} + * @memberof MicrosoftEntraProviderGroup + */ + readonly groupObj: PartialGroup; + /** + * + * @type {number} + * @memberof MicrosoftEntraProviderGroup + */ + provider: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof MicrosoftEntraProviderGroup + */ + readonly attributes: { [key: string]: any; }; +} + +/** + * Check if a given object implements the MicrosoftEntraProviderGroup interface. + */ +export function instanceOfMicrosoftEntraProviderGroup(value: object): value is MicrosoftEntraProviderGroup { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('microsoftId' in value) || value['microsoftId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('groupObj' in value) || value['groupObj'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderGroupFromJSON(json: any): MicrosoftEntraProviderGroup { + return MicrosoftEntraProviderGroupFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderGroup { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'microsoftId': json['microsoft_id'], + 'group': json['group'], + 'groupObj': PartialGroupFromJSON(json['group_obj']), + 'provider': json['provider'], + 'attributes': json['attributes'], + }; +} + +export function MicrosoftEntraProviderGroupToJSON(json: any): MicrosoftEntraProviderGroup { + return MicrosoftEntraProviderGroupToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'microsoft_id': value['microsoftId'], + 'group': value['group'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderGroupRequest.ts b/packages/client-ts/src/models/MicrosoftEntraProviderGroupRequest.ts new file mode 100644 index 0000000000..864a1cb3b1 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderGroupRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * MicrosoftEntraProviderGroup Serializer + * @export + * @interface MicrosoftEntraProviderGroupRequest + */ +export interface MicrosoftEntraProviderGroupRequest { + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderGroupRequest + */ + microsoftId: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderGroupRequest + */ + group: string; + /** + * + * @type {number} + * @memberof MicrosoftEntraProviderGroupRequest + */ + provider: number; +} + +/** + * Check if a given object implements the MicrosoftEntraProviderGroupRequest interface. + */ +export function instanceOfMicrosoftEntraProviderGroupRequest(value: object): value is MicrosoftEntraProviderGroupRequest { + if (!('microsoftId' in value) || value['microsoftId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderGroupRequestFromJSON(json: any): MicrosoftEntraProviderGroupRequest { + return MicrosoftEntraProviderGroupRequestFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderGroupRequest { + if (json == null) { + return json; + } + return { + + 'microsoftId': json['microsoft_id'], + 'group': json['group'], + 'provider': json['provider'], + }; +} + +export function MicrosoftEntraProviderGroupRequestToJSON(json: any): MicrosoftEntraProviderGroupRequest { + return MicrosoftEntraProviderGroupRequestToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderGroupRequestToJSONTyped(value?: MicrosoftEntraProviderGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'microsoft_id': value['microsoftId'], + 'group': value['group'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderMapping.ts b/packages/client-ts/src/models/MicrosoftEntraProviderMapping.ts new file mode 100644 index 0000000000..5e0ad95692 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * MicrosoftEntraProviderMapping Serializer + * @export + * @interface MicrosoftEntraProviderMapping + */ +export interface MicrosoftEntraProviderMapping { + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + readonly pk: 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. + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + name: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof MicrosoftEntraProviderMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the MicrosoftEntraProviderMapping interface. + */ +export function instanceOfMicrosoftEntraProviderMapping(value: object): value is MicrosoftEntraProviderMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderMappingFromJSON(json: any): MicrosoftEntraProviderMapping { + return MicrosoftEntraProviderMappingFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function MicrosoftEntraProviderMappingToJSON(json: any): MicrosoftEntraProviderMapping { + return MicrosoftEntraProviderMappingToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderMappingRequest.ts b/packages/client-ts/src/models/MicrosoftEntraProviderMappingRequest.ts new file mode 100644 index 0000000000..8c18a2b68e --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * MicrosoftEntraProviderMapping Serializer + * @export + * @interface MicrosoftEntraProviderMappingRequest + */ +export interface MicrosoftEntraProviderMappingRequest { + /** + * 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. + * @type {string} + * @memberof MicrosoftEntraProviderMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the MicrosoftEntraProviderMappingRequest interface. + */ +export function instanceOfMicrosoftEntraProviderMappingRequest(value: object): value is MicrosoftEntraProviderMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderMappingRequestFromJSON(json: any): MicrosoftEntraProviderMappingRequest { + return MicrosoftEntraProviderMappingRequestFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function MicrosoftEntraProviderMappingRequestToJSON(json: any): MicrosoftEntraProviderMappingRequest { + return MicrosoftEntraProviderMappingRequestToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderMappingRequestToJSONTyped(value?: MicrosoftEntraProviderMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderRequest.ts b/packages/client-ts/src/models/MicrosoftEntraProviderRequest.ts new file mode 100644 index 0000000000..c70b60a876 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderRequest.ts @@ -0,0 +1,175 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction'; +import { + OutgoingSyncDeleteActionFromJSON, + OutgoingSyncDeleteActionFromJSONTyped, + OutgoingSyncDeleteActionToJSON, + OutgoingSyncDeleteActionToJSONTyped, +} from './OutgoingSyncDeleteAction'; + +/** + * MicrosoftEntraProvider Serializer + * @export + * @interface MicrosoftEntraProviderRequest + */ +export interface MicrosoftEntraProviderRequest { + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderRequest + */ + name: string; + /** + * + * @type {Array} + * @memberof MicrosoftEntraProviderRequest + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof MicrosoftEntraProviderRequest + */ + propertyMappingsGroup?: Array; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderRequest + */ + clientId: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderRequest + */ + clientSecret: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderRequest + */ + tenantId: string; + /** + * + * @type {boolean} + * @memberof MicrosoftEntraProviderRequest + */ + excludeUsersServiceAccount?: boolean; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderRequest + */ + filterGroup?: string | null; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof MicrosoftEntraProviderRequest + */ + userDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof MicrosoftEntraProviderRequest + */ + groupDeleteAction?: OutgoingSyncDeleteAction; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof MicrosoftEntraProviderRequest + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof MicrosoftEntraProviderRequest + */ + syncPageTimeout?: string; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof MicrosoftEntraProviderRequest + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the MicrosoftEntraProviderRequest interface. + */ +export function instanceOfMicrosoftEntraProviderRequest(value: object): value is MicrosoftEntraProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false; + if (!('tenantId' in value) || value['tenantId'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderRequestFromJSON(json: any): MicrosoftEntraProviderRequest { + return MicrosoftEntraProviderRequestFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'clientId': json['client_id'], + 'clientSecret': json['client_secret'], + 'tenantId': json['tenant_id'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'], + 'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']), + 'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']), + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function MicrosoftEntraProviderRequestToJSON(json: any): MicrosoftEntraProviderRequest { + return MicrosoftEntraProviderRequestToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderRequestToJSONTyped(value?: MicrosoftEntraProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'tenant_id': value['tenantId'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'filter_group': value['filterGroup'], + 'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']), + 'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']), + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderUser.ts b/packages/client-ts/src/models/MicrosoftEntraProviderUser.ts new file mode 100644 index 0000000000..f41bd67599 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderUser.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * MicrosoftEntraProviderUser Serializer + * @export + * @interface MicrosoftEntraProviderUser + */ +export interface MicrosoftEntraProviderUser { + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderUser + */ + readonly id: string; + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderUser + */ + microsoftId: string; + /** + * + * @type {number} + * @memberof MicrosoftEntraProviderUser + */ + user: number; + /** + * + * @type {PartialUser} + * @memberof MicrosoftEntraProviderUser + */ + readonly userObj: PartialUser; + /** + * + * @type {number} + * @memberof MicrosoftEntraProviderUser + */ + provider: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof MicrosoftEntraProviderUser + */ + readonly attributes: { [key: string]: any; }; +} + +/** + * Check if a given object implements the MicrosoftEntraProviderUser interface. + */ +export function instanceOfMicrosoftEntraProviderUser(value: object): value is MicrosoftEntraProviderUser { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('microsoftId' in value) || value['microsoftId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderUserFromJSON(json: any): MicrosoftEntraProviderUser { + return MicrosoftEntraProviderUserFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderUser { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'microsoftId': json['microsoft_id'], + 'user': json['user'], + 'userObj': PartialUserFromJSON(json['user_obj']), + 'provider': json['provider'], + 'attributes': json['attributes'], + }; +} + +export function MicrosoftEntraProviderUserToJSON(json: any): MicrosoftEntraProviderUser { + return MicrosoftEntraProviderUserToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderUserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'microsoft_id': value['microsoftId'], + 'user': value['user'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/MicrosoftEntraProviderUserRequest.ts b/packages/client-ts/src/models/MicrosoftEntraProviderUserRequest.ts new file mode 100644 index 0000000000..7c9c8b2be7 --- /dev/null +++ b/packages/client-ts/src/models/MicrosoftEntraProviderUserRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * MicrosoftEntraProviderUser Serializer + * @export + * @interface MicrosoftEntraProviderUserRequest + */ +export interface MicrosoftEntraProviderUserRequest { + /** + * + * @type {string} + * @memberof MicrosoftEntraProviderUserRequest + */ + microsoftId: string; + /** + * + * @type {number} + * @memberof MicrosoftEntraProviderUserRequest + */ + user: number; + /** + * + * @type {number} + * @memberof MicrosoftEntraProviderUserRequest + */ + provider: number; +} + +/** + * Check if a given object implements the MicrosoftEntraProviderUserRequest interface. + */ +export function instanceOfMicrosoftEntraProviderUserRequest(value: object): value is MicrosoftEntraProviderUserRequest { + if (!('microsoftId' in value) || value['microsoftId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function MicrosoftEntraProviderUserRequestFromJSON(json: any): MicrosoftEntraProviderUserRequest { + return MicrosoftEntraProviderUserRequestFromJSONTyped(json, false); +} + +export function MicrosoftEntraProviderUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderUserRequest { + if (json == null) { + return json; + } + return { + + 'microsoftId': json['microsoft_id'], + 'user': json['user'], + 'provider': json['provider'], + }; +} + +export function MicrosoftEntraProviderUserRequestToJSON(json: any): MicrosoftEntraProviderUserRequest { + return MicrosoftEntraProviderUserRequestToJSONTyped(json, false); +} + +export function MicrosoftEntraProviderUserRequestToJSONTyped(value?: MicrosoftEntraProviderUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'microsoft_id': value['microsoftId'], + 'user': value['user'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/ModelEnum.ts b/packages/client-ts/src/models/ModelEnum.ts new file mode 100644 index 0000000000..084b1e06c9 --- /dev/null +++ b/packages/client-ts/src/models/ModelEnum.ts @@ -0,0 +1,173 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ModelEnum = { + AuthentikTenantsDomain: 'authentik_tenants.domain', + AuthentikCoreGroup: 'authentik_core.group', + AuthentikCoreUser: 'authentik_core.user', + AuthentikCoreApplication: 'authentik_core.application', + AuthentikCoreApplicationentitlement: 'authentik_core.applicationentitlement', + AuthentikCoreToken: 'authentik_core.token', + AuthentikCryptoCertificatekeypair: 'authentik_crypto.certificatekeypair', + AuthentikEndpointsDeviceuserbinding: 'authentik_endpoints.deviceuserbinding', + AuthentikEndpointsDeviceaccessgroup: 'authentik_endpoints.deviceaccessgroup', + AuthentikEndpointsEndpointstage: 'authentik_endpoints.endpointstage', + AuthentikEndpointsConnectorsAgentAgentconnector: 'authentik_endpoints_connectors_agent.agentconnector', + AuthentikEndpointsConnectorsAgentAgentdeviceuserbinding: 'authentik_endpoints_connectors_agent.agentdeviceuserbinding', + AuthentikEndpointsConnectorsAgentEnrollmenttoken: 'authentik_endpoints_connectors_agent.enrollmenttoken', + AuthentikEnterpriseLicense: 'authentik_enterprise.license', + AuthentikEventsEvent: 'authentik_events.event', + AuthentikEventsNotificationtransport: 'authentik_events.notificationtransport', + AuthentikEventsNotification: 'authentik_events.notification', + AuthentikEventsNotificationrule: 'authentik_events.notificationrule', + AuthentikEventsNotificationwebhookmapping: 'authentik_events.notificationwebhookmapping', + AuthentikFlowsFlow: 'authentik_flows.flow', + AuthentikFlowsFlowstagebinding: 'authentik_flows.flowstagebinding', + AuthentikOutpostsDockerserviceconnection: 'authentik_outposts.dockerserviceconnection', + AuthentikOutpostsKubernetesserviceconnection: 'authentik_outposts.kubernetesserviceconnection', + AuthentikOutpostsOutpost: 'authentik_outposts.outpost', + AuthentikPoliciesDummyDummypolicy: 'authentik_policies_dummy.dummypolicy', + AuthentikPoliciesEventMatcherEventmatcherpolicy: 'authentik_policies_event_matcher.eventmatcherpolicy', + AuthentikPoliciesExpiryPasswordexpirypolicy: 'authentik_policies_expiry.passwordexpirypolicy', + AuthentikPoliciesExpressionExpressionpolicy: 'authentik_policies_expression.expressionpolicy', + AuthentikPoliciesGeoipGeoippolicy: 'authentik_policies_geoip.geoippolicy', + AuthentikPoliciesPasswordPasswordpolicy: 'authentik_policies_password.passwordpolicy', + AuthentikPoliciesReputationReputationpolicy: 'authentik_policies_reputation.reputationpolicy', + AuthentikPoliciesPolicybinding: 'authentik_policies.policybinding', + AuthentikProvidersLdapLdapprovider: 'authentik_providers_ldap.ldapprovider', + AuthentikProvidersOauth2Scopemapping: 'authentik_providers_oauth2.scopemapping', + AuthentikProvidersOauth2Oauth2provider: 'authentik_providers_oauth2.oauth2provider', + AuthentikProvidersProxyProxyprovider: 'authentik_providers_proxy.proxyprovider', + AuthentikProvidersRacRacprovider: 'authentik_providers_rac.racprovider', + AuthentikProvidersRacEndpoint: 'authentik_providers_rac.endpoint', + AuthentikProvidersRacRacpropertymapping: 'authentik_providers_rac.racpropertymapping', + AuthentikProvidersRadiusRadiusprovider: 'authentik_providers_radius.radiusprovider', + AuthentikProvidersRadiusRadiusproviderpropertymapping: 'authentik_providers_radius.radiusproviderpropertymapping', + AuthentikProvidersSamlSamlprovider: 'authentik_providers_saml.samlprovider', + AuthentikProvidersSamlSamlpropertymapping: 'authentik_providers_saml.samlpropertymapping', + AuthentikProvidersScimScimprovider: 'authentik_providers_scim.scimprovider', + AuthentikProvidersScimScimmapping: 'authentik_providers_scim.scimmapping', + AuthentikRbacRole: 'authentik_rbac.role', + AuthentikRbacInitialpermissions: 'authentik_rbac.initialpermissions', + AuthentikSourcesKerberosKerberossource: 'authentik_sources_kerberos.kerberossource', + AuthentikSourcesKerberosKerberossourcepropertymapping: 'authentik_sources_kerberos.kerberossourcepropertymapping', + AuthentikSourcesKerberosUserkerberossourceconnection: 'authentik_sources_kerberos.userkerberossourceconnection', + AuthentikSourcesKerberosGroupkerberossourceconnection: 'authentik_sources_kerberos.groupkerberossourceconnection', + AuthentikSourcesLdapLdapsource: 'authentik_sources_ldap.ldapsource', + AuthentikSourcesLdapLdapsourcepropertymapping: 'authentik_sources_ldap.ldapsourcepropertymapping', + AuthentikSourcesLdapUserldapsourceconnection: 'authentik_sources_ldap.userldapsourceconnection', + AuthentikSourcesLdapGroupldapsourceconnection: 'authentik_sources_ldap.groupldapsourceconnection', + AuthentikSourcesOauthOauthsource: 'authentik_sources_oauth.oauthsource', + AuthentikSourcesOauthOauthsourcepropertymapping: 'authentik_sources_oauth.oauthsourcepropertymapping', + AuthentikSourcesOauthUseroauthsourceconnection: 'authentik_sources_oauth.useroauthsourceconnection', + AuthentikSourcesOauthGroupoauthsourceconnection: 'authentik_sources_oauth.groupoauthsourceconnection', + AuthentikSourcesPlexPlexsource: 'authentik_sources_plex.plexsource', + AuthentikSourcesPlexPlexsourcepropertymapping: 'authentik_sources_plex.plexsourcepropertymapping', + AuthentikSourcesPlexUserplexsourceconnection: 'authentik_sources_plex.userplexsourceconnection', + AuthentikSourcesPlexGroupplexsourceconnection: 'authentik_sources_plex.groupplexsourceconnection', + AuthentikSourcesSamlSamlsource: 'authentik_sources_saml.samlsource', + AuthentikSourcesSamlSamlsourcepropertymapping: 'authentik_sources_saml.samlsourcepropertymapping', + AuthentikSourcesSamlUsersamlsourceconnection: 'authentik_sources_saml.usersamlsourceconnection', + AuthentikSourcesSamlGroupsamlsourceconnection: 'authentik_sources_saml.groupsamlsourceconnection', + AuthentikSourcesScimScimsource: 'authentik_sources_scim.scimsource', + AuthentikSourcesScimScimsourcepropertymapping: 'authentik_sources_scim.scimsourcepropertymapping', + AuthentikSourcesTelegramTelegramsource: 'authentik_sources_telegram.telegramsource', + AuthentikSourcesTelegramTelegramsourcepropertymapping: 'authentik_sources_telegram.telegramsourcepropertymapping', + AuthentikSourcesTelegramUsertelegramsourceconnection: 'authentik_sources_telegram.usertelegramsourceconnection', + AuthentikSourcesTelegramGrouptelegramsourceconnection: 'authentik_sources_telegram.grouptelegramsourceconnection', + AuthentikStagesAuthenticatorDuoAuthenticatorduostage: 'authentik_stages_authenticator_duo.authenticatorduostage', + AuthentikStagesAuthenticatorDuoDuodevice: 'authentik_stages_authenticator_duo.duodevice', + AuthentikStagesAuthenticatorEmailAuthenticatoremailstage: 'authentik_stages_authenticator_email.authenticatoremailstage', + AuthentikStagesAuthenticatorEmailEmaildevice: 'authentik_stages_authenticator_email.emaildevice', + AuthentikStagesAuthenticatorSmsAuthenticatorsmsstage: 'authentik_stages_authenticator_sms.authenticatorsmsstage', + AuthentikStagesAuthenticatorSmsSmsdevice: 'authentik_stages_authenticator_sms.smsdevice', + AuthentikStagesAuthenticatorStaticAuthenticatorstaticstage: 'authentik_stages_authenticator_static.authenticatorstaticstage', + AuthentikStagesAuthenticatorStaticStaticdevice: 'authentik_stages_authenticator_static.staticdevice', + AuthentikStagesAuthenticatorTotpAuthenticatortotpstage: 'authentik_stages_authenticator_totp.authenticatortotpstage', + AuthentikStagesAuthenticatorTotpTotpdevice: 'authentik_stages_authenticator_totp.totpdevice', + AuthentikStagesAuthenticatorValidateAuthenticatorvalidatestage: 'authentik_stages_authenticator_validate.authenticatorvalidatestage', + AuthentikStagesAuthenticatorWebauthnAuthenticatorwebauthnstage: 'authentik_stages_authenticator_webauthn.authenticatorwebauthnstage', + AuthentikStagesAuthenticatorWebauthnWebauthndevice: 'authentik_stages_authenticator_webauthn.webauthndevice', + AuthentikStagesCaptchaCaptchastage: 'authentik_stages_captcha.captchastage', + AuthentikStagesConsentConsentstage: 'authentik_stages_consent.consentstage', + AuthentikStagesDenyDenystage: 'authentik_stages_deny.denystage', + AuthentikStagesDummyDummystage: 'authentik_stages_dummy.dummystage', + AuthentikStagesEmailEmailstage: 'authentik_stages_email.emailstage', + AuthentikStagesIdentificationIdentificationstage: 'authentik_stages_identification.identificationstage', + AuthentikStagesInvitationInvitationstage: 'authentik_stages_invitation.invitationstage', + AuthentikStagesInvitationInvitation: 'authentik_stages_invitation.invitation', + AuthentikStagesPasswordPasswordstage: 'authentik_stages_password.passwordstage', + AuthentikStagesPromptPrompt: 'authentik_stages_prompt.prompt', + AuthentikStagesPromptPromptstage: 'authentik_stages_prompt.promptstage', + AuthentikStagesRedirectRedirectstage: 'authentik_stages_redirect.redirectstage', + AuthentikStagesUserDeleteUserdeletestage: 'authentik_stages_user_delete.userdeletestage', + AuthentikStagesUserLoginUserloginstage: 'authentik_stages_user_login.userloginstage', + AuthentikStagesUserLogoutUserlogoutstage: 'authentik_stages_user_logout.userlogoutstage', + AuthentikStagesUserWriteUserwritestage: 'authentik_stages_user_write.userwritestage', + AuthentikTasksSchedulesSchedule: 'authentik_tasks_schedules.schedule', + AuthentikBrandsBrand: 'authentik_brands.brand', + AuthentikBlueprintsBlueprintinstance: 'authentik_blueprints.blueprintinstance', + AuthentikEndpointsConnectorsFleetFleetconnector: 'authentik_endpoints_connectors_fleet.fleetconnector', + AuthentikEndpointsConnectorsGoogleChromeGooglechromeconnector: 'authentik_endpoints_connectors_google_chrome.googlechromeconnector', + AuthentikLifecycleLifecyclerule: 'authentik_lifecycle.lifecyclerule', + AuthentikLifecycleLifecycleiteration: 'authentik_lifecycle.lifecycleiteration', + AuthentikLifecycleReview: 'authentik_lifecycle.review', + AuthentikPoliciesUniquePasswordUniquepasswordpolicy: 'authentik_policies_unique_password.uniquepasswordpolicy', + AuthentikProvidersGoogleWorkspaceGoogleworkspaceprovider: 'authentik_providers_google_workspace.googleworkspaceprovider', + AuthentikProvidersGoogleWorkspaceGoogleworkspaceprovidermapping: 'authentik_providers_google_workspace.googleworkspaceprovidermapping', + AuthentikProvidersMicrosoftEntraMicrosoftentraprovider: 'authentik_providers_microsoft_entra.microsoftentraprovider', + AuthentikProvidersMicrosoftEntraMicrosoftentraprovidermapping: 'authentik_providers_microsoft_entra.microsoftentraprovidermapping', + AuthentikProvidersSsfSsfprovider: 'authentik_providers_ssf.ssfprovider', + AuthentikProvidersWsFederationWsfederationprovider: 'authentik_providers_ws_federation.wsfederationprovider', + AuthentikReportsDataexport: 'authentik_reports.dataexport', + AuthentikStagesAuthenticatorEndpointGdtcAuthenticatorendpointgdtcstage: 'authentik_stages_authenticator_endpoint_gdtc.authenticatorendpointgdtcstage', + AuthentikStagesMtlsMutualtlsstage: 'authentik_stages_mtls.mutualtlsstage', + AuthentikStagesSourceSourcestage: 'authentik_stages_source.sourcestage', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ModelEnum = typeof ModelEnum[keyof typeof ModelEnum]; + + +export function instanceOfModelEnum(value: any): boolean { + for (const key in ModelEnum) { + if (Object.prototype.hasOwnProperty.call(ModelEnum, key)) { + if (ModelEnum[key as keyof typeof ModelEnum] === value) { + return true; + } + } + } + return false; +} + +export function ModelEnumFromJSON(json: any): ModelEnum { + return ModelEnumFromJSONTyped(json, false); +} + +export function ModelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelEnum { + return json as ModelEnum; +} + +export function ModelEnumToJSON(value?: ModelEnum | null): any { + return value as any; +} + +export function ModelEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ModelEnum { + return value as ModelEnum; +} + diff --git a/packages/client-ts/src/models/ModelRequest.ts b/packages/client-ts/src/models/ModelRequest.ts new file mode 100644 index 0000000000..99a53e8770 --- /dev/null +++ b/packages/client-ts/src/models/ModelRequest.ts @@ -0,0 +1,171 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { GoogleWorkspaceProviderRequest } from './GoogleWorkspaceProviderRequest'; +import { + instanceOfGoogleWorkspaceProviderRequest, + GoogleWorkspaceProviderRequestFromJSON, + GoogleWorkspaceProviderRequestFromJSONTyped, + GoogleWorkspaceProviderRequestToJSON, +} from './GoogleWorkspaceProviderRequest'; +import type { LDAPProviderRequest } from './LDAPProviderRequest'; +import { + instanceOfLDAPProviderRequest, + LDAPProviderRequestFromJSON, + LDAPProviderRequestFromJSONTyped, + LDAPProviderRequestToJSON, +} from './LDAPProviderRequest'; +import type { MicrosoftEntraProviderRequest } from './MicrosoftEntraProviderRequest'; +import { + instanceOfMicrosoftEntraProviderRequest, + MicrosoftEntraProviderRequestFromJSON, + MicrosoftEntraProviderRequestFromJSONTyped, + MicrosoftEntraProviderRequestToJSON, +} from './MicrosoftEntraProviderRequest'; +import type { OAuth2ProviderRequest } from './OAuth2ProviderRequest'; +import { + instanceOfOAuth2ProviderRequest, + OAuth2ProviderRequestFromJSON, + OAuth2ProviderRequestFromJSONTyped, + OAuth2ProviderRequestToJSON, +} from './OAuth2ProviderRequest'; +import type { ProxyProviderRequest } from './ProxyProviderRequest'; +import { + instanceOfProxyProviderRequest, + ProxyProviderRequestFromJSON, + ProxyProviderRequestFromJSONTyped, + ProxyProviderRequestToJSON, +} from './ProxyProviderRequest'; +import type { RACProviderRequest } from './RACProviderRequest'; +import { + instanceOfRACProviderRequest, + RACProviderRequestFromJSON, + RACProviderRequestFromJSONTyped, + RACProviderRequestToJSON, +} from './RACProviderRequest'; +import type { RadiusProviderRequest } from './RadiusProviderRequest'; +import { + instanceOfRadiusProviderRequest, + RadiusProviderRequestFromJSON, + RadiusProviderRequestFromJSONTyped, + RadiusProviderRequestToJSON, +} from './RadiusProviderRequest'; +import type { SAMLProviderRequest } from './SAMLProviderRequest'; +import { + instanceOfSAMLProviderRequest, + SAMLProviderRequestFromJSON, + SAMLProviderRequestFromJSONTyped, + SAMLProviderRequestToJSON, +} from './SAMLProviderRequest'; +import type { SCIMProviderRequest } from './SCIMProviderRequest'; +import { + instanceOfSCIMProviderRequest, + SCIMProviderRequestFromJSON, + SCIMProviderRequestFromJSONTyped, + SCIMProviderRequestToJSON, +} from './SCIMProviderRequest'; +import type { SSFProviderRequest } from './SSFProviderRequest'; +import { + instanceOfSSFProviderRequest, + SSFProviderRequestFromJSON, + SSFProviderRequestFromJSONTyped, + SSFProviderRequestToJSON, +} from './SSFProviderRequest'; +import type { WSFederationProviderRequest } from './WSFederationProviderRequest'; +import { + instanceOfWSFederationProviderRequest, + WSFederationProviderRequestFromJSON, + WSFederationProviderRequestFromJSONTyped, + WSFederationProviderRequestToJSON, +} from './WSFederationProviderRequest'; + +/** + * @type ModelRequest + * + * @export + */ +export type ModelRequest = { providerModel: 'authentik_providers_google_workspace.googleworkspaceprovider' } & GoogleWorkspaceProviderRequest | { providerModel: 'authentik_providers_ldap.ldapprovider' } & LDAPProviderRequest | { providerModel: 'authentik_providers_microsoft_entra.microsoftentraprovider' } & MicrosoftEntraProviderRequest | { providerModel: 'authentik_providers_oauth2.oauth2provider' } & OAuth2ProviderRequest | { providerModel: 'authentik_providers_proxy.proxyprovider' } & ProxyProviderRequest | { providerModel: 'authentik_providers_rac.racprovider' } & RACProviderRequest | { providerModel: 'authentik_providers_radius.radiusprovider' } & RadiusProviderRequest | { providerModel: 'authentik_providers_saml.samlprovider' } & SAMLProviderRequest | { providerModel: 'authentik_providers_scim.scimprovider' } & SCIMProviderRequest | { providerModel: 'authentik_providers_ssf.ssfprovider' } & SSFProviderRequest | { providerModel: 'authentik_providers_ws_federation.wsfederationprovider' } & WSFederationProviderRequest; + +export function ModelRequestFromJSON(json: any): ModelRequest { + return ModelRequestFromJSONTyped(json, false); +} + +export function ModelRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelRequest { + if (json == null) { + return json; + } + switch (json['provider_model']) { + case 'authentik_providers_google_workspace.googleworkspaceprovider': + return Object.assign({}, GoogleWorkspaceProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_google_workspace.googleworkspaceprovider' } as const); + case 'authentik_providers_ldap.ldapprovider': + return Object.assign({}, LDAPProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_ldap.ldapprovider' } as const); + case 'authentik_providers_microsoft_entra.microsoftentraprovider': + return Object.assign({}, MicrosoftEntraProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_microsoft_entra.microsoftentraprovider' } as const); + case 'authentik_providers_oauth2.oauth2provider': + return Object.assign({}, OAuth2ProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_oauth2.oauth2provider' } as const); + case 'authentik_providers_proxy.proxyprovider': + return Object.assign({}, ProxyProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_proxy.proxyprovider' } as const); + case 'authentik_providers_rac.racprovider': + return Object.assign({}, RACProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_rac.racprovider' } as const); + case 'authentik_providers_radius.radiusprovider': + return Object.assign({}, RadiusProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_radius.radiusprovider' } as const); + case 'authentik_providers_saml.samlprovider': + return Object.assign({}, SAMLProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_saml.samlprovider' } as const); + case 'authentik_providers_scim.scimprovider': + return Object.assign({}, SCIMProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_scim.scimprovider' } as const); + case 'authentik_providers_ssf.ssfprovider': + return Object.assign({}, SSFProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_ssf.ssfprovider' } as const); + case 'authentik_providers_ws_federation.wsfederationprovider': + return Object.assign({}, WSFederationProviderRequestFromJSONTyped(json, true), { providerModel: 'authentik_providers_ws_federation.wsfederationprovider' } as const); + default: + return json; + } +} + +export function ModelRequestToJSON(json: any): any { + return ModelRequestToJSONTyped(json, false); +} + +export function ModelRequestToJSONTyped(value?: ModelRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['providerModel']) { + case 'authentik_providers_google_workspace.googleworkspaceprovider': + return Object.assign({}, GoogleWorkspaceProviderRequestToJSON(value), { providerModel: 'authentik_providers_google_workspace.googleworkspaceprovider' } as const); + case 'authentik_providers_ldap.ldapprovider': + return Object.assign({}, LDAPProviderRequestToJSON(value), { providerModel: 'authentik_providers_ldap.ldapprovider' } as const); + case 'authentik_providers_microsoft_entra.microsoftentraprovider': + return Object.assign({}, MicrosoftEntraProviderRequestToJSON(value), { providerModel: 'authentik_providers_microsoft_entra.microsoftentraprovider' } as const); + case 'authentik_providers_oauth2.oauth2provider': + return Object.assign({}, OAuth2ProviderRequestToJSON(value), { providerModel: 'authentik_providers_oauth2.oauth2provider' } as const); + case 'authentik_providers_proxy.proxyprovider': + return Object.assign({}, ProxyProviderRequestToJSON(value), { providerModel: 'authentik_providers_proxy.proxyprovider' } as const); + case 'authentik_providers_rac.racprovider': + return Object.assign({}, RACProviderRequestToJSON(value), { providerModel: 'authentik_providers_rac.racprovider' } as const); + case 'authentik_providers_radius.radiusprovider': + return Object.assign({}, RadiusProviderRequestToJSON(value), { providerModel: 'authentik_providers_radius.radiusprovider' } as const); + case 'authentik_providers_saml.samlprovider': + return Object.assign({}, SAMLProviderRequestToJSON(value), { providerModel: 'authentik_providers_saml.samlprovider' } as const); + case 'authentik_providers_scim.scimprovider': + return Object.assign({}, SCIMProviderRequestToJSON(value), { providerModel: 'authentik_providers_scim.scimprovider' } as const); + case 'authentik_providers_ssf.ssfprovider': + return Object.assign({}, SSFProviderRequestToJSON(value), { providerModel: 'authentik_providers_ssf.ssfprovider' } as const); + case 'authentik_providers_ws_federation.wsfederationprovider': + return Object.assign({}, WSFederationProviderRequestToJSON(value), { providerModel: 'authentik_providers_ws_federation.wsfederationprovider' } as const); + default: + return value; + } +} + diff --git a/packages/client-ts/src/models/MutualTLSStage.ts b/packages/client-ts/src/models/MutualTLSStage.ts new file mode 100644 index 0000000000..1b25f47732 --- /dev/null +++ b/packages/client-ts/src/models/MutualTLSStage.ts @@ -0,0 +1,180 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { StageModeEnum } from './StageModeEnum'; +import { + StageModeEnumFromJSON, + StageModeEnumFromJSONTyped, + StageModeEnumToJSON, + StageModeEnumToJSONTyped, +} from './StageModeEnum'; +import type { CertAttributeEnum } from './CertAttributeEnum'; +import { + CertAttributeEnumFromJSON, + CertAttributeEnumFromJSONTyped, + CertAttributeEnumToJSON, + CertAttributeEnumToJSONTyped, +} from './CertAttributeEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; +import type { UserAttributeEnum } from './UserAttributeEnum'; +import { + UserAttributeEnumFromJSON, + UserAttributeEnumFromJSONTyped, + UserAttributeEnumToJSON, + UserAttributeEnumToJSONTyped, +} from './UserAttributeEnum'; + +/** + * MutualTLSStage Serializer + * @export + * @interface MutualTLSStage + */ +export interface MutualTLSStage { + /** + * + * @type {string} + * @memberof MutualTLSStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof MutualTLSStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof MutualTLSStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof MutualTLSStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof MutualTLSStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof MutualTLSStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof MutualTLSStage + */ + readonly flowSet: Array; + /** + * + * @type {StageModeEnum} + * @memberof MutualTLSStage + */ + mode: StageModeEnum; + /** + * Configure certificate authorities to validate the certificate against. This option has a higher priority than the `client_certificate` option on `Brand`. + * @type {Array} + * @memberof MutualTLSStage + */ + certificateAuthorities?: Array; + /** + * + * @type {CertAttributeEnum} + * @memberof MutualTLSStage + */ + certAttribute: CertAttributeEnum; + /** + * + * @type {UserAttributeEnum} + * @memberof MutualTLSStage + */ + userAttribute: UserAttributeEnum; +} + + + +/** + * Check if a given object implements the MutualTLSStage interface. + */ +export function instanceOfMutualTLSStage(value: object): value is MutualTLSStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('mode' in value) || value['mode'] === undefined) return false; + if (!('certAttribute' in value) || value['certAttribute'] === undefined) return false; + if (!('userAttribute' in value) || value['userAttribute'] === undefined) return false; + return true; +} + +export function MutualTLSStageFromJSON(json: any): MutualTLSStage { + return MutualTLSStageFromJSONTyped(json, false); +} + +export function MutualTLSStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): MutualTLSStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'mode': StageModeEnumFromJSON(json['mode']), + 'certificateAuthorities': json['certificate_authorities'] == null ? undefined : json['certificate_authorities'], + 'certAttribute': CertAttributeEnumFromJSON(json['cert_attribute']), + 'userAttribute': UserAttributeEnumFromJSON(json['user_attribute']), + }; +} + +export function MutualTLSStageToJSON(json: any): MutualTLSStage { + return MutualTLSStageToJSONTyped(json, false); +} + +export function MutualTLSStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': StageModeEnumToJSON(value['mode']), + 'certificate_authorities': value['certificateAuthorities'], + 'cert_attribute': CertAttributeEnumToJSON(value['certAttribute']), + 'user_attribute': UserAttributeEnumToJSON(value['userAttribute']), + }; +} + diff --git a/packages/client-ts/src/models/MutualTLSStageRequest.ts b/packages/client-ts/src/models/MutualTLSStageRequest.ts new file mode 100644 index 0000000000..3bab3d614a --- /dev/null +++ b/packages/client-ts/src/models/MutualTLSStageRequest.ts @@ -0,0 +1,125 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { StageModeEnum } from './StageModeEnum'; +import { + StageModeEnumFromJSON, + StageModeEnumFromJSONTyped, + StageModeEnumToJSON, + StageModeEnumToJSONTyped, +} from './StageModeEnum'; +import type { CertAttributeEnum } from './CertAttributeEnum'; +import { + CertAttributeEnumFromJSON, + CertAttributeEnumFromJSONTyped, + CertAttributeEnumToJSON, + CertAttributeEnumToJSONTyped, +} from './CertAttributeEnum'; +import type { UserAttributeEnum } from './UserAttributeEnum'; +import { + UserAttributeEnumFromJSON, + UserAttributeEnumFromJSONTyped, + UserAttributeEnumToJSON, + UserAttributeEnumToJSONTyped, +} from './UserAttributeEnum'; + +/** + * MutualTLSStage Serializer + * @export + * @interface MutualTLSStageRequest + */ +export interface MutualTLSStageRequest { + /** + * + * @type {string} + * @memberof MutualTLSStageRequest + */ + name: string; + /** + * + * @type {StageModeEnum} + * @memberof MutualTLSStageRequest + */ + mode: StageModeEnum; + /** + * Configure certificate authorities to validate the certificate against. This option has a higher priority than the `client_certificate` option on `Brand`. + * @type {Array} + * @memberof MutualTLSStageRequest + */ + certificateAuthorities?: Array; + /** + * + * @type {CertAttributeEnum} + * @memberof MutualTLSStageRequest + */ + certAttribute: CertAttributeEnum; + /** + * + * @type {UserAttributeEnum} + * @memberof MutualTLSStageRequest + */ + userAttribute: UserAttributeEnum; +} + + + +/** + * Check if a given object implements the MutualTLSStageRequest interface. + */ +export function instanceOfMutualTLSStageRequest(value: object): value is MutualTLSStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('mode' in value) || value['mode'] === undefined) return false; + if (!('certAttribute' in value) || value['certAttribute'] === undefined) return false; + if (!('userAttribute' in value) || value['userAttribute'] === undefined) return false; + return true; +} + +export function MutualTLSStageRequestFromJSON(json: any): MutualTLSStageRequest { + return MutualTLSStageRequestFromJSONTyped(json, false); +} + +export function MutualTLSStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MutualTLSStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'mode': StageModeEnumFromJSON(json['mode']), + 'certificateAuthorities': json['certificate_authorities'] == null ? undefined : json['certificate_authorities'], + 'certAttribute': CertAttributeEnumFromJSON(json['cert_attribute']), + 'userAttribute': UserAttributeEnumFromJSON(json['user_attribute']), + }; +} + +export function MutualTLSStageRequestToJSON(json: any): MutualTLSStageRequest { + return MutualTLSStageRequestToJSONTyped(json, false); +} + +export function MutualTLSStageRequestToJSONTyped(value?: MutualTLSStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': StageModeEnumToJSON(value['mode']), + 'certificate_authorities': value['certificateAuthorities'], + 'cert_attribute': CertAttributeEnumToJSON(value['certAttribute']), + 'user_attribute': UserAttributeEnumToJSON(value['userAttribute']), + }; +} + diff --git a/packages/client-ts/src/models/NativeLogoutChallenge.ts b/packages/client-ts/src/models/NativeLogoutChallenge.ts new file mode 100644 index 0000000000..add68e6dbf --- /dev/null +++ b/packages/client-ts/src/models/NativeLogoutChallenge.ts @@ -0,0 +1,169 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; +import type { SAMLBindingsEnum } from './SAMLBindingsEnum'; +import { + SAMLBindingsEnumFromJSON, + SAMLBindingsEnumFromJSONTyped, + SAMLBindingsEnumToJSON, + SAMLBindingsEnumToJSONTyped, +} from './SAMLBindingsEnum'; + +/** + * Challenge for native browser logout + * @export + * @interface NativeLogoutChallenge + */ +export interface NativeLogoutChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof NativeLogoutChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof NativeLogoutChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + providerName?: string; + /** + * + * @type {boolean} + * @memberof NativeLogoutChallenge + */ + isComplete?: boolean; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + postUrl?: string; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + redirectUrl?: string; + /** + * + * @type {SAMLBindingsEnum} + * @memberof NativeLogoutChallenge + */ + samlBinding?: SAMLBindingsEnum; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + samlRequest?: string; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + samlResponse?: string; + /** + * + * @type {string} + * @memberof NativeLogoutChallenge + */ + samlRelayState?: string; +} + + + +/** + * Check if a given object implements the NativeLogoutChallenge interface. + */ +export function instanceOfNativeLogoutChallenge(value: object): value is NativeLogoutChallenge { + return true; +} + +export function NativeLogoutChallengeFromJSON(json: any): NativeLogoutChallenge { + return NativeLogoutChallengeFromJSONTyped(json, false); +} + +export function NativeLogoutChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): NativeLogoutChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'providerName': json['provider_name'] == null ? undefined : json['provider_name'], + 'isComplete': json['is_complete'] == null ? undefined : json['is_complete'], + 'postUrl': json['post_url'] == null ? undefined : json['post_url'], + 'redirectUrl': json['redirect_url'] == null ? undefined : json['redirect_url'], + 'samlBinding': json['saml_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['saml_binding']), + 'samlRequest': json['saml_request'] == null ? undefined : json['saml_request'], + 'samlResponse': json['saml_response'] == null ? undefined : json['saml_response'], + 'samlRelayState': json['saml_relay_state'] == null ? undefined : json['saml_relay_state'], + }; +} + +export function NativeLogoutChallengeToJSON(json: any): NativeLogoutChallenge { + return NativeLogoutChallengeToJSONTyped(json, false); +} + +export function NativeLogoutChallengeToJSONTyped(value?: NativeLogoutChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'provider_name': value['providerName'], + 'is_complete': value['isComplete'], + 'post_url': value['postUrl'], + 'redirect_url': value['redirectUrl'], + 'saml_binding': SAMLBindingsEnumToJSON(value['samlBinding']), + 'saml_request': value['samlRequest'], + 'saml_response': value['samlResponse'], + 'saml_relay_state': value['samlRelayState'], + }; +} + diff --git a/packages/client-ts/src/models/NativeLogoutChallengeResponseRequest.ts b/packages/client-ts/src/models/NativeLogoutChallengeResponseRequest.ts new file mode 100644 index 0000000000..3c3b7ca228 --- /dev/null +++ b/packages/client-ts/src/models/NativeLogoutChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response for native browser logout + * @export + * @interface NativeLogoutChallengeResponseRequest + */ +export interface NativeLogoutChallengeResponseRequest { + /** + * + * @type {string} + * @memberof NativeLogoutChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the NativeLogoutChallengeResponseRequest interface. + */ +export function instanceOfNativeLogoutChallengeResponseRequest(value: object): value is NativeLogoutChallengeResponseRequest { + return true; +} + +export function NativeLogoutChallengeResponseRequestFromJSON(json: any): NativeLogoutChallengeResponseRequest { + return NativeLogoutChallengeResponseRequestFromJSONTyped(json, false); +} + +export function NativeLogoutChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NativeLogoutChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function NativeLogoutChallengeResponseRequestToJSON(json: any): NativeLogoutChallengeResponseRequest { + return NativeLogoutChallengeResponseRequestToJSONTyped(json, false); +} + +export function NativeLogoutChallengeResponseRequestToJSONTyped(value?: NativeLogoutChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/Network.ts b/packages/client-ts/src/models/Network.ts new file mode 100644 index 0000000000..c24a0a3cfb --- /dev/null +++ b/packages/client-ts/src/models/Network.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { NetworkInterface } from './NetworkInterface'; +import { + NetworkInterfaceFromJSON, + NetworkInterfaceFromJSONTyped, + NetworkInterfaceToJSON, + NetworkInterfaceToJSONTyped, +} from './NetworkInterface'; + +/** + * + * @export + * @interface Network + */ +export interface Network { + /** + * + * @type {string} + * @memberof Network + */ + hostname: string; + /** + * + * @type {boolean} + * @memberof Network + */ + firewallEnabled?: boolean; + /** + * + * @type {Array} + * @memberof Network + */ + interfaces: Array; + /** + * + * @type {string} + * @memberof Network + */ + gateway?: string; +} + +/** + * Check if a given object implements the Network interface. + */ +export function instanceOfNetwork(value: object): value is Network { + if (!('hostname' in value) || value['hostname'] === undefined) return false; + if (!('interfaces' in value) || value['interfaces'] === undefined) return false; + return true; +} + +export function NetworkFromJSON(json: any): Network { + return NetworkFromJSONTyped(json, false); +} + +export function NetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Network { + if (json == null) { + return json; + } + return { + + 'hostname': json['hostname'], + 'firewallEnabled': json['firewall_enabled'] == null ? undefined : json['firewall_enabled'], + 'interfaces': ((json['interfaces'] as Array).map(NetworkInterfaceFromJSON)), + 'gateway': json['gateway'] == null ? undefined : json['gateway'], + }; +} + +export function NetworkToJSON(json: any): Network { + return NetworkToJSONTyped(json, false); +} + +export function NetworkToJSONTyped(value?: Network | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'hostname': value['hostname'], + 'firewall_enabled': value['firewallEnabled'], + 'interfaces': ((value['interfaces'] as Array).map(NetworkInterfaceToJSON)), + 'gateway': value['gateway'], + }; +} + diff --git a/packages/client-ts/src/models/NetworkBindingEnum.ts b/packages/client-ts/src/models/NetworkBindingEnum.ts new file mode 100644 index 0000000000..81f728c1bc --- /dev/null +++ b/packages/client-ts/src/models/NetworkBindingEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const NetworkBindingEnum = { + NoBinding: 'no_binding', + BindAsn: 'bind_asn', + BindAsnNetwork: 'bind_asn_network', + BindAsnNetworkIp: 'bind_asn_network_ip', + UnknownDefaultOpenApi: '11184809' +} as const; +export type NetworkBindingEnum = typeof NetworkBindingEnum[keyof typeof NetworkBindingEnum]; + + +export function instanceOfNetworkBindingEnum(value: any): boolean { + for (const key in NetworkBindingEnum) { + if (Object.prototype.hasOwnProperty.call(NetworkBindingEnum, key)) { + if (NetworkBindingEnum[key as keyof typeof NetworkBindingEnum] === value) { + return true; + } + } + } + return false; +} + +export function NetworkBindingEnumFromJSON(json: any): NetworkBindingEnum { + return NetworkBindingEnumFromJSONTyped(json, false); +} + +export function NetworkBindingEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkBindingEnum { + return json as NetworkBindingEnum; +} + +export function NetworkBindingEnumToJSON(value?: NetworkBindingEnum | null): any { + return value as any; +} + +export function NetworkBindingEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): NetworkBindingEnum { + return value as NetworkBindingEnum; +} + diff --git a/packages/client-ts/src/models/NetworkInterface.ts b/packages/client-ts/src/models/NetworkInterface.ts new file mode 100644 index 0000000000..f509b96e52 --- /dev/null +++ b/packages/client-ts/src/models/NetworkInterface.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface NetworkInterface + */ +export interface NetworkInterface { + /** + * + * @type {string} + * @memberof NetworkInterface + */ + name: string; + /** + * + * @type {string} + * @memberof NetworkInterface + */ + hardwareAddress: string; + /** + * + * @type {Array} + * @memberof NetworkInterface + */ + ipAddresses?: Array; + /** + * + * @type {Array} + * @memberof NetworkInterface + */ + dnsServers?: Array; +} + +/** + * Check if a given object implements the NetworkInterface interface. + */ +export function instanceOfNetworkInterface(value: object): value is NetworkInterface { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('hardwareAddress' in value) || value['hardwareAddress'] === undefined) return false; + return true; +} + +export function NetworkInterfaceFromJSON(json: any): NetworkInterface { + return NetworkInterfaceFromJSONTyped(json, false); +} + +export function NetworkInterfaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkInterface { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'hardwareAddress': json['hardware_address'], + 'ipAddresses': json['ip_addresses'] == null ? undefined : json['ip_addresses'], + 'dnsServers': json['dns_servers'] == null ? undefined : json['dns_servers'], + }; +} + +export function NetworkInterfaceToJSON(json: any): NetworkInterface { + return NetworkInterfaceToJSONTyped(json, false); +} + +export function NetworkInterfaceToJSONTyped(value?: NetworkInterface | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'hardware_address': value['hardwareAddress'], + 'ip_addresses': value['ipAddresses'], + 'dns_servers': value['dnsServers'], + }; +} + diff --git a/packages/client-ts/src/models/NetworkInterfaceRequest.ts b/packages/client-ts/src/models/NetworkInterfaceRequest.ts new file mode 100644 index 0000000000..5e79af0f19 --- /dev/null +++ b/packages/client-ts/src/models/NetworkInterfaceRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface NetworkInterfaceRequest + */ +export interface NetworkInterfaceRequest { + /** + * + * @type {string} + * @memberof NetworkInterfaceRequest + */ + name: string; + /** + * + * @type {string} + * @memberof NetworkInterfaceRequest + */ + hardwareAddress: string; + /** + * + * @type {Array} + * @memberof NetworkInterfaceRequest + */ + ipAddresses?: Array; + /** + * + * @type {Array} + * @memberof NetworkInterfaceRequest + */ + dnsServers?: Array; +} + +/** + * Check if a given object implements the NetworkInterfaceRequest interface. + */ +export function instanceOfNetworkInterfaceRequest(value: object): value is NetworkInterfaceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('hardwareAddress' in value) || value['hardwareAddress'] === undefined) return false; + return true; +} + +export function NetworkInterfaceRequestFromJSON(json: any): NetworkInterfaceRequest { + return NetworkInterfaceRequestFromJSONTyped(json, false); +} + +export function NetworkInterfaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkInterfaceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'hardwareAddress': json['hardware_address'], + 'ipAddresses': json['ip_addresses'] == null ? undefined : json['ip_addresses'], + 'dnsServers': json['dns_servers'] == null ? undefined : json['dns_servers'], + }; +} + +export function NetworkInterfaceRequestToJSON(json: any): NetworkInterfaceRequest { + return NetworkInterfaceRequestToJSONTyped(json, false); +} + +export function NetworkInterfaceRequestToJSONTyped(value?: NetworkInterfaceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'hardware_address': value['hardwareAddress'], + 'ip_addresses': value['ipAddresses'], + 'dns_servers': value['dnsServers'], + }; +} + diff --git a/packages/client-ts/src/models/NetworkRequest.ts b/packages/client-ts/src/models/NetworkRequest.ts new file mode 100644 index 0000000000..eedeaa5186 --- /dev/null +++ b/packages/client-ts/src/models/NetworkRequest.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { NetworkInterfaceRequest } from './NetworkInterfaceRequest'; +import { + NetworkInterfaceRequestFromJSON, + NetworkInterfaceRequestFromJSONTyped, + NetworkInterfaceRequestToJSON, + NetworkInterfaceRequestToJSONTyped, +} from './NetworkInterfaceRequest'; + +/** + * + * @export + * @interface NetworkRequest + */ +export interface NetworkRequest { + /** + * + * @type {string} + * @memberof NetworkRequest + */ + hostname: string; + /** + * + * @type {boolean} + * @memberof NetworkRequest + */ + firewallEnabled?: boolean; + /** + * + * @type {Array} + * @memberof NetworkRequest + */ + interfaces: Array; + /** + * + * @type {string} + * @memberof NetworkRequest + */ + gateway?: string; +} + +/** + * Check if a given object implements the NetworkRequest interface. + */ +export function instanceOfNetworkRequest(value: object): value is NetworkRequest { + if (!('hostname' in value) || value['hostname'] === undefined) return false; + if (!('interfaces' in value) || value['interfaces'] === undefined) return false; + return true; +} + +export function NetworkRequestFromJSON(json: any): NetworkRequest { + return NetworkRequestFromJSONTyped(json, false); +} + +export function NetworkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkRequest { + if (json == null) { + return json; + } + return { + + 'hostname': json['hostname'], + 'firewallEnabled': json['firewall_enabled'] == null ? undefined : json['firewall_enabled'], + 'interfaces': ((json['interfaces'] as Array).map(NetworkInterfaceRequestFromJSON)), + 'gateway': json['gateway'] == null ? undefined : json['gateway'], + }; +} + +export function NetworkRequestToJSON(json: any): NetworkRequest { + return NetworkRequestToJSONTyped(json, false); +} + +export function NetworkRequestToJSONTyped(value?: NetworkRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'hostname': value['hostname'], + 'firewall_enabled': value['firewallEnabled'], + 'interfaces': ((value['interfaces'] as Array).map(NetworkInterfaceRequestToJSON)), + 'gateway': value['gateway'], + }; +} + diff --git a/packages/client-ts/src/models/NotConfiguredActionEnum.ts b/packages/client-ts/src/models/NotConfiguredActionEnum.ts new file mode 100644 index 0000000000..4f71df4ecf --- /dev/null +++ b/packages/client-ts/src/models/NotConfiguredActionEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const NotConfiguredActionEnum = { + Skip: 'skip', + Deny: 'deny', + Configure: 'configure', + UnknownDefaultOpenApi: '11184809' +} as const; +export type NotConfiguredActionEnum = typeof NotConfiguredActionEnum[keyof typeof NotConfiguredActionEnum]; + + +export function instanceOfNotConfiguredActionEnum(value: any): boolean { + for (const key in NotConfiguredActionEnum) { + if (Object.prototype.hasOwnProperty.call(NotConfiguredActionEnum, key)) { + if (NotConfiguredActionEnum[key as keyof typeof NotConfiguredActionEnum] === value) { + return true; + } + } + } + return false; +} + +export function NotConfiguredActionEnumFromJSON(json: any): NotConfiguredActionEnum { + return NotConfiguredActionEnumFromJSONTyped(json, false); +} + +export function NotConfiguredActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotConfiguredActionEnum { + return json as NotConfiguredActionEnum; +} + +export function NotConfiguredActionEnumToJSON(value?: NotConfiguredActionEnum | null): any { + return value as any; +} + +export function NotConfiguredActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): NotConfiguredActionEnum { + return value as NotConfiguredActionEnum; +} + diff --git a/packages/client-ts/src/models/Notification.ts b/packages/client-ts/src/models/Notification.ts new file mode 100644 index 0000000000..a98338a3cb --- /dev/null +++ b/packages/client-ts/src/models/Notification.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SeverityEnum } from './SeverityEnum'; +import { + SeverityEnumFromJSON, + SeverityEnumFromJSONTyped, + SeverityEnumToJSON, + SeverityEnumToJSONTyped, +} from './SeverityEnum'; +import type { Event } from './Event'; +import { + EventFromJSON, + EventFromJSONTyped, + EventToJSON, + EventToJSONTyped, +} from './Event'; + +/** + * Notification Serializer + * @export + * @interface Notification + */ +export interface Notification { + /** + * + * @type {string} + * @memberof Notification + */ + readonly pk: string; + /** + * + * @type {SeverityEnum} + * @memberof Notification + */ + readonly severity: SeverityEnum; + /** + * + * @type {string} + * @memberof Notification + */ + readonly body: string; + /** + * + * @type {string} + * @memberof Notification + */ + hyperlink?: string | null; + /** + * + * @type {string} + * @memberof Notification + */ + hyperlinkLabel?: string | null; + /** + * + * @type {Date} + * @memberof Notification + */ + readonly created: Date; + /** + * + * @type {Event} + * @memberof Notification + */ + event?: Event; + /** + * + * @type {boolean} + * @memberof Notification + */ + seen?: boolean; +} + + + +/** + * Check if a given object implements the Notification interface. + */ +export function instanceOfNotification(value: object): value is Notification { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('severity' in value) || value['severity'] === undefined) return false; + if (!('body' in value) || value['body'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + return true; +} + +export function NotificationFromJSON(json: any): Notification { + return NotificationFromJSONTyped(json, false); +} + +export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Notification { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'severity': SeverityEnumFromJSON(json['severity']), + 'body': json['body'], + 'hyperlink': json['hyperlink'] == null ? undefined : json['hyperlink'], + 'hyperlinkLabel': json['hyperlink_label'] == null ? undefined : json['hyperlink_label'], + 'created': (new Date(json['created'])), + 'event': json['event'] == null ? undefined : EventFromJSON(json['event']), + 'seen': json['seen'] == null ? undefined : json['seen'], + }; +} + +export function NotificationToJSON(json: any): Notification { + return NotificationToJSONTyped(json, false); +} + +export function NotificationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'hyperlink': value['hyperlink'], + 'hyperlink_label': value['hyperlinkLabel'], + 'event': EventToJSON(value['event']), + 'seen': value['seen'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationRequest.ts b/packages/client-ts/src/models/NotificationRequest.ts new file mode 100644 index 0000000000..19c851a50c --- /dev/null +++ b/packages/client-ts/src/models/NotificationRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EventRequest } from './EventRequest'; +import { + EventRequestFromJSON, + EventRequestFromJSONTyped, + EventRequestToJSON, + EventRequestToJSONTyped, +} from './EventRequest'; + +/** + * Notification Serializer + * @export + * @interface NotificationRequest + */ +export interface NotificationRequest { + /** + * + * @type {string} + * @memberof NotificationRequest + */ + hyperlink?: string | null; + /** + * + * @type {string} + * @memberof NotificationRequest + */ + hyperlinkLabel?: string | null; + /** + * + * @type {EventRequest} + * @memberof NotificationRequest + */ + event?: EventRequest; + /** + * + * @type {boolean} + * @memberof NotificationRequest + */ + seen?: boolean; +} + +/** + * Check if a given object implements the NotificationRequest interface. + */ +export function instanceOfNotificationRequest(value: object): value is NotificationRequest { + return true; +} + +export function NotificationRequestFromJSON(json: any): NotificationRequest { + return NotificationRequestFromJSONTyped(json, false); +} + +export function NotificationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationRequest { + if (json == null) { + return json; + } + return { + + 'hyperlink': json['hyperlink'] == null ? undefined : json['hyperlink'], + 'hyperlinkLabel': json['hyperlink_label'] == null ? undefined : json['hyperlink_label'], + 'event': json['event'] == null ? undefined : EventRequestFromJSON(json['event']), + 'seen': json['seen'] == null ? undefined : json['seen'], + }; +} + +export function NotificationRequestToJSON(json: any): NotificationRequest { + return NotificationRequestToJSONTyped(json, false); +} + +export function NotificationRequestToJSONTyped(value?: NotificationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'hyperlink': value['hyperlink'], + 'hyperlink_label': value['hyperlinkLabel'], + 'event': EventRequestToJSON(value['event']), + 'seen': value['seen'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationRule.ts b/packages/client-ts/src/models/NotificationRule.ts new file mode 100644 index 0000000000..909109f424 --- /dev/null +++ b/packages/client-ts/src/models/NotificationRule.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Group } from './Group'; +import { + GroupFromJSON, + GroupFromJSONTyped, + GroupToJSON, + GroupToJSONTyped, +} from './Group'; +import type { SeverityEnum } from './SeverityEnum'; +import { + SeverityEnumFromJSON, + SeverityEnumFromJSONTyped, + SeverityEnumToJSON, + SeverityEnumToJSONTyped, +} from './SeverityEnum'; + +/** + * NotificationRule Serializer + * @export + * @interface NotificationRule + */ +export interface NotificationRule { + /** + * + * @type {string} + * @memberof NotificationRule + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof NotificationRule + */ + 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. + * @type {Array} + * @memberof NotificationRule + */ + transports?: Array; + /** + * Controls which severity level the created notifications will have. + * @type {SeverityEnum} + * @memberof NotificationRule + */ + severity?: SeverityEnum; + /** + * Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. + * @type {string} + * @memberof NotificationRule + */ + destinationGroup?: string | null; + /** + * + * @type {Group} + * @memberof NotificationRule + */ + readonly destinationGroupObj: Group; + /** + * When enabled, notification will be sent to user the user that triggered the event.When destination_group is configured, notification is sent to both. + * @type {boolean} + * @memberof NotificationRule + */ + destinationEventUser?: boolean; +} + + + +/** + * Check if a given object implements the NotificationRule interface. + */ +export function instanceOfNotificationRule(value: object): value is NotificationRule { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('destinationGroupObj' in value) || value['destinationGroupObj'] === undefined) return false; + return true; +} + +export function NotificationRuleFromJSON(json: any): NotificationRule { + return NotificationRuleFromJSONTyped(json, false); +} + +export function NotificationRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationRule { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'transports': json['transports'] == null ? undefined : json['transports'], + 'severity': json['severity'] == null ? undefined : SeverityEnumFromJSON(json['severity']), + 'destinationGroup': json['destination_group'] == null ? undefined : json['destination_group'], + 'destinationGroupObj': GroupFromJSON(json['destination_group_obj']), + 'destinationEventUser': json['destination_event_user'] == null ? undefined : json['destination_event_user'], + }; +} + +export function NotificationRuleToJSON(json: any): NotificationRule { + return NotificationRuleToJSONTyped(json, false); +} + +export function NotificationRuleToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'transports': value['transports'], + 'severity': SeverityEnumToJSON(value['severity']), + 'destination_group': value['destinationGroup'], + 'destination_event_user': value['destinationEventUser'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationRuleRequest.ts b/packages/client-ts/src/models/NotificationRuleRequest.ts new file mode 100644 index 0000000000..401544ba53 --- /dev/null +++ b/packages/client-ts/src/models/NotificationRuleRequest.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SeverityEnum } from './SeverityEnum'; +import { + SeverityEnumFromJSON, + SeverityEnumFromJSONTyped, + SeverityEnumToJSON, + SeverityEnumToJSONTyped, +} from './SeverityEnum'; + +/** + * NotificationRule Serializer + * @export + * @interface NotificationRuleRequest + */ +export interface NotificationRuleRequest { + /** + * + * @type {string} + * @memberof NotificationRuleRequest + */ + 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. + * @type {Array} + * @memberof NotificationRuleRequest + */ + transports?: Array; + /** + * Controls which severity level the created notifications will have. + * @type {SeverityEnum} + * @memberof NotificationRuleRequest + */ + severity?: SeverityEnum; + /** + * Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. + * @type {string} + * @memberof NotificationRuleRequest + */ + destinationGroup?: string | null; + /** + * When enabled, notification will be sent to user the user that triggered the event.When destination_group is configured, notification is sent to both. + * @type {boolean} + * @memberof NotificationRuleRequest + */ + destinationEventUser?: boolean; +} + + + +/** + * Check if a given object implements the NotificationRuleRequest interface. + */ +export function instanceOfNotificationRuleRequest(value: object): value is NotificationRuleRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function NotificationRuleRequestFromJSON(json: any): NotificationRuleRequest { + return NotificationRuleRequestFromJSONTyped(json, false); +} + +export function NotificationRuleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationRuleRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'transports': json['transports'] == null ? undefined : json['transports'], + 'severity': json['severity'] == null ? undefined : SeverityEnumFromJSON(json['severity']), + 'destinationGroup': json['destination_group'] == null ? undefined : json['destination_group'], + 'destinationEventUser': json['destination_event_user'] == null ? undefined : json['destination_event_user'], + }; +} + +export function NotificationRuleRequestToJSON(json: any): NotificationRuleRequest { + return NotificationRuleRequestToJSONTyped(json, false); +} + +export function NotificationRuleRequestToJSONTyped(value?: NotificationRuleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'transports': value['transports'], + 'severity': SeverityEnumToJSON(value['severity']), + 'destination_group': value['destinationGroup'], + 'destination_event_user': value['destinationEventUser'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationTransport.ts b/packages/client-ts/src/models/NotificationTransport.ts new file mode 100644 index 0000000000..cf837d6d3b --- /dev/null +++ b/packages/client-ts/src/models/NotificationTransport.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { NotificationTransportModeEnum } from './NotificationTransportModeEnum'; +import { + NotificationTransportModeEnumFromJSON, + NotificationTransportModeEnumFromJSONTyped, + NotificationTransportModeEnumToJSON, + NotificationTransportModeEnumToJSONTyped, +} from './NotificationTransportModeEnum'; + +/** + * NotificationTransport Serializer + * @export + * @interface NotificationTransport + */ +export interface NotificationTransport { + /** + * + * @type {string} + * @memberof NotificationTransport + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof NotificationTransport + */ + name: string; + /** + * + * @type {NotificationTransportModeEnum} + * @memberof NotificationTransport + */ + mode?: NotificationTransportModeEnum; + /** + * Return selected mode with a UI Label + * @type {string} + * @memberof NotificationTransport + */ + readonly modeVerbose: string; + /** + * + * @type {string} + * @memberof NotificationTransport + */ + webhookUrl?: string; + /** + * When set, the selected ceritifcate is used to validate the certificate of the webhook server. + * @type {string} + * @memberof NotificationTransport + */ + webhookCa?: string | null; + /** + * Customize the body of the request. Mapping should return data that is JSON-serializable. + * @type {string} + * @memberof NotificationTransport + */ + webhookMappingBody?: string | null; + /** + * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs + * @type {string} + * @memberof NotificationTransport + */ + webhookMappingHeaders?: string | null; + /** + * + * @type {string} + * @memberof NotificationTransport + */ + emailSubjectPrefix?: string; + /** + * + * @type {string} + * @memberof NotificationTransport + */ + emailTemplate?: string; + /** + * Only send notification once, for example when sending a webhook into a chat channel. + * @type {boolean} + * @memberof NotificationTransport + */ + sendOnce?: boolean; +} + + + +/** + * Check if a given object implements the NotificationTransport interface. + */ +export function instanceOfNotificationTransport(value: object): value is NotificationTransport { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('modeVerbose' in value) || value['modeVerbose'] === undefined) return false; + return true; +} + +export function NotificationTransportFromJSON(json: any): NotificationTransport { + return NotificationTransportFromJSONTyped(json, false); +} + +export function NotificationTransportFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTransport { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'mode': json['mode'] == null ? undefined : NotificationTransportModeEnumFromJSON(json['mode']), + 'modeVerbose': json['mode_verbose'], + 'webhookUrl': json['webhook_url'] == null ? undefined : json['webhook_url'], + 'webhookCa': json['webhook_ca'] == null ? undefined : json['webhook_ca'], + 'webhookMappingBody': json['webhook_mapping_body'] == null ? undefined : json['webhook_mapping_body'], + 'webhookMappingHeaders': json['webhook_mapping_headers'] == null ? undefined : json['webhook_mapping_headers'], + 'emailSubjectPrefix': json['email_subject_prefix'] == null ? undefined : json['email_subject_prefix'], + 'emailTemplate': json['email_template'] == null ? undefined : json['email_template'], + 'sendOnce': json['send_once'] == null ? undefined : json['send_once'], + }; +} + +export function NotificationTransportToJSON(json: any): NotificationTransport { + return NotificationTransportToJSONTyped(json, false); +} + +export function NotificationTransportToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': NotificationTransportModeEnumToJSON(value['mode']), + 'webhook_url': value['webhookUrl'], + 'webhook_ca': value['webhookCa'], + 'webhook_mapping_body': value['webhookMappingBody'], + 'webhook_mapping_headers': value['webhookMappingHeaders'], + 'email_subject_prefix': value['emailSubjectPrefix'], + 'email_template': value['emailTemplate'], + 'send_once': value['sendOnce'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationTransportModeEnum.ts b/packages/client-ts/src/models/NotificationTransportModeEnum.ts new file mode 100644 index 0000000000..b6ce34c034 --- /dev/null +++ b/packages/client-ts/src/models/NotificationTransportModeEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const NotificationTransportModeEnum = { + Local: 'local', + Webhook: 'webhook', + WebhookSlack: 'webhook_slack', + Email: 'email', + UnknownDefaultOpenApi: '11184809' +} as const; +export type NotificationTransportModeEnum = typeof NotificationTransportModeEnum[keyof typeof NotificationTransportModeEnum]; + + +export function instanceOfNotificationTransportModeEnum(value: any): boolean { + for (const key in NotificationTransportModeEnum) { + if (Object.prototype.hasOwnProperty.call(NotificationTransportModeEnum, key)) { + if (NotificationTransportModeEnum[key as keyof typeof NotificationTransportModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function NotificationTransportModeEnumFromJSON(json: any): NotificationTransportModeEnum { + return NotificationTransportModeEnumFromJSONTyped(json, false); +} + +export function NotificationTransportModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTransportModeEnum { + return json as NotificationTransportModeEnum; +} + +export function NotificationTransportModeEnumToJSON(value?: NotificationTransportModeEnum | null): any { + return value as any; +} + +export function NotificationTransportModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationTransportModeEnum { + return value as NotificationTransportModeEnum; +} + diff --git a/packages/client-ts/src/models/NotificationTransportRequest.ts b/packages/client-ts/src/models/NotificationTransportRequest.ts new file mode 100644 index 0000000000..d921ea474a --- /dev/null +++ b/packages/client-ts/src/models/NotificationTransportRequest.ts @@ -0,0 +1,140 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { NotificationTransportModeEnum } from './NotificationTransportModeEnum'; +import { + NotificationTransportModeEnumFromJSON, + NotificationTransportModeEnumFromJSONTyped, + NotificationTransportModeEnumToJSON, + NotificationTransportModeEnumToJSONTyped, +} from './NotificationTransportModeEnum'; + +/** + * NotificationTransport Serializer + * @export + * @interface NotificationTransportRequest + */ +export interface NotificationTransportRequest { + /** + * + * @type {string} + * @memberof NotificationTransportRequest + */ + name: string; + /** + * + * @type {NotificationTransportModeEnum} + * @memberof NotificationTransportRequest + */ + mode?: NotificationTransportModeEnum; + /** + * + * @type {string} + * @memberof NotificationTransportRequest + */ + webhookUrl?: string; + /** + * When set, the selected ceritifcate is used to validate the certificate of the webhook server. + * @type {string} + * @memberof NotificationTransportRequest + */ + webhookCa?: string | null; + /** + * Customize the body of the request. Mapping should return data that is JSON-serializable. + * @type {string} + * @memberof NotificationTransportRequest + */ + webhookMappingBody?: string | null; + /** + * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs + * @type {string} + * @memberof NotificationTransportRequest + */ + webhookMappingHeaders?: string | null; + /** + * + * @type {string} + * @memberof NotificationTransportRequest + */ + emailSubjectPrefix?: string; + /** + * + * @type {string} + * @memberof NotificationTransportRequest + */ + emailTemplate?: string; + /** + * Only send notification once, for example when sending a webhook into a chat channel. + * @type {boolean} + * @memberof NotificationTransportRequest + */ + sendOnce?: boolean; +} + + + +/** + * Check if a given object implements the NotificationTransportRequest interface. + */ +export function instanceOfNotificationTransportRequest(value: object): value is NotificationTransportRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function NotificationTransportRequestFromJSON(json: any): NotificationTransportRequest { + return NotificationTransportRequestFromJSONTyped(json, false); +} + +export function NotificationTransportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTransportRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'mode': json['mode'] == null ? undefined : NotificationTransportModeEnumFromJSON(json['mode']), + 'webhookUrl': json['webhook_url'] == null ? undefined : json['webhook_url'], + 'webhookCa': json['webhook_ca'] == null ? undefined : json['webhook_ca'], + 'webhookMappingBody': json['webhook_mapping_body'] == null ? undefined : json['webhook_mapping_body'], + 'webhookMappingHeaders': json['webhook_mapping_headers'] == null ? undefined : json['webhook_mapping_headers'], + 'emailSubjectPrefix': json['email_subject_prefix'] == null ? undefined : json['email_subject_prefix'], + 'emailTemplate': json['email_template'] == null ? undefined : json['email_template'], + 'sendOnce': json['send_once'] == null ? undefined : json['send_once'], + }; +} + +export function NotificationTransportRequestToJSON(json: any): NotificationTransportRequest { + return NotificationTransportRequestToJSONTyped(json, false); +} + +export function NotificationTransportRequestToJSONTyped(value?: NotificationTransportRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': NotificationTransportModeEnumToJSON(value['mode']), + 'webhook_url': value['webhookUrl'], + 'webhook_ca': value['webhookCa'], + 'webhook_mapping_body': value['webhookMappingBody'], + 'webhook_mapping_headers': value['webhookMappingHeaders'], + 'email_subject_prefix': value['emailSubjectPrefix'], + 'email_template': value['emailTemplate'], + 'send_once': value['sendOnce'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationTransportTest.ts b/packages/client-ts/src/models/NotificationTransportTest.ts new file mode 100644 index 0000000000..8b13ed21e4 --- /dev/null +++ b/packages/client-ts/src/models/NotificationTransportTest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Notification test serializer + * @export + * @interface NotificationTransportTest + */ +export interface NotificationTransportTest { + /** + * + * @type {Array} + * @memberof NotificationTransportTest + */ + messages: Array; +} + +/** + * Check if a given object implements the NotificationTransportTest interface. + */ +export function instanceOfNotificationTransportTest(value: object): value is NotificationTransportTest { + if (!('messages' in value) || value['messages'] === undefined) return false; + return true; +} + +export function NotificationTransportTestFromJSON(json: any): NotificationTransportTest { + return NotificationTransportTestFromJSONTyped(json, false); +} + +export function NotificationTransportTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTransportTest { + if (json == null) { + return json; + } + return { + + 'messages': json['messages'], + }; +} + +export function NotificationTransportTestToJSON(json: any): NotificationTransportTest { + return NotificationTransportTestToJSONTyped(json, false); +} + +export function NotificationTransportTestToJSONTyped(value?: NotificationTransportTest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'messages': value['messages'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationWebhookMapping.ts b/packages/client-ts/src/models/NotificationWebhookMapping.ts new file mode 100644 index 0000000000..5df7171939 --- /dev/null +++ b/packages/client-ts/src/models/NotificationWebhookMapping.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * NotificationWebhookMapping Serializer + * @export + * @interface NotificationWebhookMapping + */ +export interface NotificationWebhookMapping { + /** + * + * @type {string} + * @memberof NotificationWebhookMapping + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof NotificationWebhookMapping + */ + name: string; + /** + * + * @type {string} + * @memberof NotificationWebhookMapping + */ + expression: string; +} + +/** + * Check if a given object implements the NotificationWebhookMapping interface. + */ +export function instanceOfNotificationWebhookMapping(value: object): value is NotificationWebhookMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function NotificationWebhookMappingFromJSON(json: any): NotificationWebhookMapping { + return NotificationWebhookMappingFromJSONTyped(json, false); +} + +export function NotificationWebhookMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationWebhookMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function NotificationWebhookMappingToJSON(json: any): NotificationWebhookMapping { + return NotificationWebhookMappingToJSONTyped(json, false); +} + +export function NotificationWebhookMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/NotificationWebhookMappingRequest.ts b/packages/client-ts/src/models/NotificationWebhookMappingRequest.ts new file mode 100644 index 0000000000..31912d91c3 --- /dev/null +++ b/packages/client-ts/src/models/NotificationWebhookMappingRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * NotificationWebhookMapping Serializer + * @export + * @interface NotificationWebhookMappingRequest + */ +export interface NotificationWebhookMappingRequest { + /** + * + * @type {string} + * @memberof NotificationWebhookMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof NotificationWebhookMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the NotificationWebhookMappingRequest interface. + */ +export function instanceOfNotificationWebhookMappingRequest(value: object): value is NotificationWebhookMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function NotificationWebhookMappingRequestFromJSON(json: any): NotificationWebhookMappingRequest { + return NotificationWebhookMappingRequestFromJSONTyped(json, false); +} + +export function NotificationWebhookMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationWebhookMappingRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function NotificationWebhookMappingRequestToJSON(json: any): NotificationWebhookMappingRequest { + return NotificationWebhookMappingRequestToJSONTyped(json, false); +} + +export function NotificationWebhookMappingRequestToJSONTyped(value?: NotificationWebhookMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/OAuth2Provider.ts b/packages/client-ts/src/models/OAuth2Provider.ts new file mode 100644 index 0000000000..c48ae91d82 --- /dev/null +++ b/packages/client-ts/src/models/OAuth2Provider.ts @@ -0,0 +1,347 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ClientTypeEnum } from './ClientTypeEnum'; +import { + ClientTypeEnumFromJSON, + ClientTypeEnumFromJSONTyped, + ClientTypeEnumToJSON, + ClientTypeEnumToJSONTyped, +} from './ClientTypeEnum'; +import type { SubModeEnum } from './SubModeEnum'; +import { + SubModeEnumFromJSON, + SubModeEnumFromJSONTyped, + SubModeEnumToJSON, + SubModeEnumToJSONTyped, +} from './SubModeEnum'; +import type { OAuth2ProviderLogoutMethodEnum } from './OAuth2ProviderLogoutMethodEnum'; +import { + OAuth2ProviderLogoutMethodEnumFromJSON, + OAuth2ProviderLogoutMethodEnumFromJSONTyped, + OAuth2ProviderLogoutMethodEnumToJSON, + OAuth2ProviderLogoutMethodEnumToJSONTyped, +} from './OAuth2ProviderLogoutMethodEnum'; +import type { RedirectURI } from './RedirectURI'; +import { + RedirectURIFromJSON, + RedirectURIFromJSONTyped, + RedirectURIToJSON, + RedirectURIToJSONTyped, +} from './RedirectURI'; +import type { IssuerModeEnum } from './IssuerModeEnum'; +import { + IssuerModeEnumFromJSON, + IssuerModeEnumFromJSONTyped, + IssuerModeEnumToJSON, + IssuerModeEnumToJSONTyped, +} from './IssuerModeEnum'; + +/** + * OAuth2Provider Serializer + * @export + * @interface OAuth2Provider + */ +export interface OAuth2Provider { + /** + * + * @type {number} + * @memberof OAuth2Provider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof OAuth2Provider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof OAuth2Provider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof OAuth2Provider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof OAuth2Provider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof OAuth2Provider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof OAuth2Provider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof OAuth2Provider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof OAuth2Provider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof OAuth2Provider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof OAuth2Provider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof OAuth2Provider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof OAuth2Provider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof OAuth2Provider + */ + readonly metaModelName: string; + /** + * Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable + * @type {ClientTypeEnum} + * @memberof OAuth2Provider + */ + clientType?: ClientTypeEnum; + /** + * + * @type {string} + * @memberof OAuth2Provider + */ + clientId?: string; + /** + * + * @type {string} + * @memberof OAuth2Provider + */ + clientSecret?: string; + /** + * Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2Provider + */ + accessCodeValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2Provider + */ + accessTokenValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2Provider + */ + refreshTokenValidity?: string; + /** + * When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2Provider + */ + refreshTokenThreshold?: string; + /** + * Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. + * @type {boolean} + * @memberof OAuth2Provider + */ + includeClaimsInIdToken?: boolean; + /** + * Key used to sign the tokens. + * @type {string} + * @memberof OAuth2Provider + */ + signingKey?: string | null; + /** + * Key used to encrypt the tokens. When set, tokens will be encrypted and returned as JWEs. + * @type {string} + * @memberof OAuth2Provider + */ + encryptionKey?: string | null; + /** + * + * @type {Array} + * @memberof OAuth2Provider + */ + redirectUris: Array; + /** + * + * @type {string} + * @memberof OAuth2Provider + */ + logoutUri?: string; + /** + * Backchannel logs out with server to server calls. Frontchannel uses iframes in your browser + * @type {OAuth2ProviderLogoutMethodEnum} + * @memberof OAuth2Provider + */ + logoutMethod?: OAuth2ProviderLogoutMethodEnum; + /** + * Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + * @type {SubModeEnum} + * @memberof OAuth2Provider + */ + subMode?: SubModeEnum; + /** + * Configure how the issuer field of the ID Token should be filled. + * @type {IssuerModeEnum} + * @memberof OAuth2Provider + */ + issuerMode?: IssuerModeEnum; + /** + * + * @type {Array} + * @memberof OAuth2Provider + */ + jwtFederationSources?: Array; + /** + * + * @type {Array} + * @memberof OAuth2Provider + */ + jwtFederationProviders?: Array; +} + + + +/** + * Check if a given object implements the OAuth2Provider interface. + */ +export function instanceOfOAuth2Provider(value: object): value is OAuth2Provider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('redirectUris' in value) || value['redirectUris'] === undefined) return false; + return true; +} + +export function OAuth2ProviderFromJSON(json: any): OAuth2Provider { + return OAuth2ProviderFromJSONTyped(json, false); +} + +export function OAuth2ProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2Provider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'clientType': json['client_type'] == null ? undefined : ClientTypeEnumFromJSON(json['client_type']), + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'], + 'accessCodeValidity': json['access_code_validity'] == null ? undefined : json['access_code_validity'], + 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], + 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], + 'refreshTokenThreshold': json['refresh_token_threshold'] == null ? undefined : json['refresh_token_threshold'], + 'includeClaimsInIdToken': json['include_claims_in_id_token'] == null ? undefined : json['include_claims_in_id_token'], + 'signingKey': json['signing_key'] == null ? undefined : json['signing_key'], + 'encryptionKey': json['encryption_key'] == null ? undefined : json['encryption_key'], + 'redirectUris': ((json['redirect_uris'] as Array).map(RedirectURIFromJSON)), + 'logoutUri': json['logout_uri'] == null ? undefined : json['logout_uri'], + 'logoutMethod': json['logout_method'] == null ? undefined : OAuth2ProviderLogoutMethodEnumFromJSON(json['logout_method']), + 'subMode': json['sub_mode'] == null ? undefined : SubModeEnumFromJSON(json['sub_mode']), + 'issuerMode': json['issuer_mode'] == null ? undefined : IssuerModeEnumFromJSON(json['issuer_mode']), + 'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + }; +} + +export function OAuth2ProviderToJSON(json: any): OAuth2Provider { + return OAuth2ProviderToJSONTyped(json, false); +} + +export function OAuth2ProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'client_type': ClientTypeEnumToJSON(value['clientType']), + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'access_code_validity': value['accessCodeValidity'], + 'access_token_validity': value['accessTokenValidity'], + 'refresh_token_validity': value['refreshTokenValidity'], + 'refresh_token_threshold': value['refreshTokenThreshold'], + 'include_claims_in_id_token': value['includeClaimsInIdToken'], + 'signing_key': value['signingKey'], + 'encryption_key': value['encryptionKey'], + 'redirect_uris': ((value['redirectUris'] as Array).map(RedirectURIToJSON)), + 'logout_uri': value['logoutUri'], + 'logout_method': OAuth2ProviderLogoutMethodEnumToJSON(value['logoutMethod']), + 'sub_mode': SubModeEnumToJSON(value['subMode']), + 'issuer_mode': IssuerModeEnumToJSON(value['issuerMode']), + 'jwt_federation_sources': value['jwtFederationSources'], + 'jwt_federation_providers': value['jwtFederationProviders'], + }; +} + diff --git a/packages/client-ts/src/models/OAuth2ProviderLogoutMethodEnum.ts b/packages/client-ts/src/models/OAuth2ProviderLogoutMethodEnum.ts new file mode 100644 index 0000000000..fd54bc0f3e --- /dev/null +++ b/packages/client-ts/src/models/OAuth2ProviderLogoutMethodEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const OAuth2ProviderLogoutMethodEnum = { + Backchannel: 'backchannel', + Frontchannel: 'frontchannel', + UnknownDefaultOpenApi: '11184809' +} as const; +export type OAuth2ProviderLogoutMethodEnum = typeof OAuth2ProviderLogoutMethodEnum[keyof typeof OAuth2ProviderLogoutMethodEnum]; + + +export function instanceOfOAuth2ProviderLogoutMethodEnum(value: any): boolean { + for (const key in OAuth2ProviderLogoutMethodEnum) { + if (Object.prototype.hasOwnProperty.call(OAuth2ProviderLogoutMethodEnum, key)) { + if (OAuth2ProviderLogoutMethodEnum[key as keyof typeof OAuth2ProviderLogoutMethodEnum] === value) { + return true; + } + } + } + return false; +} + +export function OAuth2ProviderLogoutMethodEnumFromJSON(json: any): OAuth2ProviderLogoutMethodEnum { + return OAuth2ProviderLogoutMethodEnumFromJSONTyped(json, false); +} + +export function OAuth2ProviderLogoutMethodEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ProviderLogoutMethodEnum { + return json as OAuth2ProviderLogoutMethodEnum; +} + +export function OAuth2ProviderLogoutMethodEnumToJSON(value?: OAuth2ProviderLogoutMethodEnum | null): any { + return value as any; +} + +export function OAuth2ProviderLogoutMethodEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): OAuth2ProviderLogoutMethodEnum { + return value as OAuth2ProviderLogoutMethodEnum; +} + diff --git a/packages/client-ts/src/models/OAuth2ProviderRequest.ts b/packages/client-ts/src/models/OAuth2ProviderRequest.ts new file mode 100644 index 0000000000..711039c246 --- /dev/null +++ b/packages/client-ts/src/models/OAuth2ProviderRequest.ts @@ -0,0 +1,275 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RedirectURIRequest } from './RedirectURIRequest'; +import { + RedirectURIRequestFromJSON, + RedirectURIRequestFromJSONTyped, + RedirectURIRequestToJSON, + RedirectURIRequestToJSONTyped, +} from './RedirectURIRequest'; +import type { ClientTypeEnum } from './ClientTypeEnum'; +import { + ClientTypeEnumFromJSON, + ClientTypeEnumFromJSONTyped, + ClientTypeEnumToJSON, + ClientTypeEnumToJSONTyped, +} from './ClientTypeEnum'; +import type { SubModeEnum } from './SubModeEnum'; +import { + SubModeEnumFromJSON, + SubModeEnumFromJSONTyped, + SubModeEnumToJSON, + SubModeEnumToJSONTyped, +} from './SubModeEnum'; +import type { OAuth2ProviderLogoutMethodEnum } from './OAuth2ProviderLogoutMethodEnum'; +import { + OAuth2ProviderLogoutMethodEnumFromJSON, + OAuth2ProviderLogoutMethodEnumFromJSONTyped, + OAuth2ProviderLogoutMethodEnumToJSON, + OAuth2ProviderLogoutMethodEnumToJSONTyped, +} from './OAuth2ProviderLogoutMethodEnum'; +import type { IssuerModeEnum } from './IssuerModeEnum'; +import { + IssuerModeEnumFromJSON, + IssuerModeEnumFromJSONTyped, + IssuerModeEnumToJSON, + IssuerModeEnumToJSONTyped, +} from './IssuerModeEnum'; + +/** + * OAuth2Provider Serializer + * @export + * @interface OAuth2ProviderRequest + */ +export interface OAuth2ProviderRequest { + /** + * + * @type {string} + * @memberof OAuth2ProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof OAuth2ProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof OAuth2ProviderRequest + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof OAuth2ProviderRequest + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof OAuth2ProviderRequest + */ + propertyMappings?: Array; + /** + * Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable + * @type {ClientTypeEnum} + * @memberof OAuth2ProviderRequest + */ + clientType?: ClientTypeEnum; + /** + * + * @type {string} + * @memberof OAuth2ProviderRequest + */ + clientId?: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderRequest + */ + clientSecret?: string; + /** + * Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2ProviderRequest + */ + accessCodeValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2ProviderRequest + */ + accessTokenValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2ProviderRequest + */ + refreshTokenValidity?: string; + /** + * When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof OAuth2ProviderRequest + */ + refreshTokenThreshold?: string; + /** + * Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. + * @type {boolean} + * @memberof OAuth2ProviderRequest + */ + includeClaimsInIdToken?: boolean; + /** + * Key used to sign the tokens. + * @type {string} + * @memberof OAuth2ProviderRequest + */ + signingKey?: string | null; + /** + * Key used to encrypt the tokens. When set, tokens will be encrypted and returned as JWEs. + * @type {string} + * @memberof OAuth2ProviderRequest + */ + encryptionKey?: string | null; + /** + * + * @type {Array} + * @memberof OAuth2ProviderRequest + */ + redirectUris: Array; + /** + * + * @type {string} + * @memberof OAuth2ProviderRequest + */ + logoutUri?: string; + /** + * Backchannel logs out with server to server calls. Frontchannel uses iframes in your browser + * @type {OAuth2ProviderLogoutMethodEnum} + * @memberof OAuth2ProviderRequest + */ + logoutMethod?: OAuth2ProviderLogoutMethodEnum; + /** + * Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + * @type {SubModeEnum} + * @memberof OAuth2ProviderRequest + */ + subMode?: SubModeEnum; + /** + * Configure how the issuer field of the ID Token should be filled. + * @type {IssuerModeEnum} + * @memberof OAuth2ProviderRequest + */ + issuerMode?: IssuerModeEnum; + /** + * + * @type {Array} + * @memberof OAuth2ProviderRequest + */ + jwtFederationSources?: Array; + /** + * + * @type {Array} + * @memberof OAuth2ProviderRequest + */ + jwtFederationProviders?: Array; +} + + + +/** + * Check if a given object implements the OAuth2ProviderRequest interface. + */ +export function instanceOfOAuth2ProviderRequest(value: object): value is OAuth2ProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('redirectUris' in value) || value['redirectUris'] === undefined) return false; + return true; +} + +export function OAuth2ProviderRequestFromJSON(json: any): OAuth2ProviderRequest { + return OAuth2ProviderRequestFromJSONTyped(json, false); +} + +export function OAuth2ProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'clientType': json['client_type'] == null ? undefined : ClientTypeEnumFromJSON(json['client_type']), + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'], + 'accessCodeValidity': json['access_code_validity'] == null ? undefined : json['access_code_validity'], + 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], + 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], + 'refreshTokenThreshold': json['refresh_token_threshold'] == null ? undefined : json['refresh_token_threshold'], + 'includeClaimsInIdToken': json['include_claims_in_id_token'] == null ? undefined : json['include_claims_in_id_token'], + 'signingKey': json['signing_key'] == null ? undefined : json['signing_key'], + 'encryptionKey': json['encryption_key'] == null ? undefined : json['encryption_key'], + 'redirectUris': ((json['redirect_uris'] as Array).map(RedirectURIRequestFromJSON)), + 'logoutUri': json['logout_uri'] == null ? undefined : json['logout_uri'], + 'logoutMethod': json['logout_method'] == null ? undefined : OAuth2ProviderLogoutMethodEnumFromJSON(json['logout_method']), + 'subMode': json['sub_mode'] == null ? undefined : SubModeEnumFromJSON(json['sub_mode']), + 'issuerMode': json['issuer_mode'] == null ? undefined : IssuerModeEnumFromJSON(json['issuer_mode']), + 'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + }; +} + +export function OAuth2ProviderRequestToJSON(json: any): OAuth2ProviderRequest { + return OAuth2ProviderRequestToJSONTyped(json, false); +} + +export function OAuth2ProviderRequestToJSONTyped(value?: OAuth2ProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'client_type': ClientTypeEnumToJSON(value['clientType']), + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'access_code_validity': value['accessCodeValidity'], + 'access_token_validity': value['accessTokenValidity'], + 'refresh_token_validity': value['refreshTokenValidity'], + 'refresh_token_threshold': value['refreshTokenThreshold'], + 'include_claims_in_id_token': value['includeClaimsInIdToken'], + 'signing_key': value['signingKey'], + 'encryption_key': value['encryptionKey'], + 'redirect_uris': ((value['redirectUris'] as Array).map(RedirectURIRequestToJSON)), + 'logout_uri': value['logoutUri'], + 'logout_method': OAuth2ProviderLogoutMethodEnumToJSON(value['logoutMethod']), + 'sub_mode': SubModeEnumToJSON(value['subMode']), + 'issuer_mode': IssuerModeEnumToJSON(value['issuerMode']), + 'jwt_federation_sources': value['jwtFederationSources'], + 'jwt_federation_providers': value['jwtFederationProviders'], + }; +} + diff --git a/packages/client-ts/src/models/OAuth2ProviderSetupURLs.ts b/packages/client-ts/src/models/OAuth2ProviderSetupURLs.ts new file mode 100644 index 0000000000..834d5f82e2 --- /dev/null +++ b/packages/client-ts/src/models/OAuth2ProviderSetupURLs.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuth2 Provider Metadata serializer + * @export + * @interface OAuth2ProviderSetupURLs + */ +export interface OAuth2ProviderSetupURLs { + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly issuer: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly authorize: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly token: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly userInfo: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly providerInfo: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly logout: string; + /** + * + * @type {string} + * @memberof OAuth2ProviderSetupURLs + */ + readonly jwks: string; +} + +/** + * Check if a given object implements the OAuth2ProviderSetupURLs interface. + */ +export function instanceOfOAuth2ProviderSetupURLs(value: object): value is OAuth2ProviderSetupURLs { + if (!('issuer' in value) || value['issuer'] === undefined) return false; + if (!('authorize' in value) || value['authorize'] === undefined) return false; + if (!('token' in value) || value['token'] === undefined) return false; + if (!('userInfo' in value) || value['userInfo'] === undefined) return false; + if (!('providerInfo' in value) || value['providerInfo'] === undefined) return false; + if (!('logout' in value) || value['logout'] === undefined) return false; + if (!('jwks' in value) || value['jwks'] === undefined) return false; + return true; +} + +export function OAuth2ProviderSetupURLsFromJSON(json: any): OAuth2ProviderSetupURLs { + return OAuth2ProviderSetupURLsFromJSONTyped(json, false); +} + +export function OAuth2ProviderSetupURLsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2ProviderSetupURLs { + if (json == null) { + return json; + } + return { + + 'issuer': json['issuer'], + 'authorize': json['authorize'], + 'token': json['token'], + 'userInfo': json['user_info'], + 'providerInfo': json['provider_info'], + 'logout': json['logout'], + 'jwks': json['jwks'], + }; +} + +export function OAuth2ProviderSetupURLsToJSON(json: any): OAuth2ProviderSetupURLs { + return OAuth2ProviderSetupURLsToJSONTyped(json, false); +} + +export function OAuth2ProviderSetupURLsToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/OAuthDeviceCodeChallenge.ts b/packages/client-ts/src/models/OAuthDeviceCodeChallenge.ts new file mode 100644 index 0000000000..64e96c81fe --- /dev/null +++ b/packages/client-ts/src/models/OAuthDeviceCodeChallenge.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * OAuth Device code challenge + * @export + * @interface OAuthDeviceCodeChallenge + */ +export interface OAuthDeviceCodeChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof OAuthDeviceCodeChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof OAuthDeviceCodeChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof OAuthDeviceCodeChallenge + */ + responseErrors?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the OAuthDeviceCodeChallenge interface. + */ +export function instanceOfOAuthDeviceCodeChallenge(value: object): value is OAuthDeviceCodeChallenge { + return true; +} + +export function OAuthDeviceCodeChallengeFromJSON(json: any): OAuthDeviceCodeChallenge { + return OAuthDeviceCodeChallengeFromJSONTyped(json, false); +} + +export function OAuthDeviceCodeChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthDeviceCodeChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + }; +} + +export function OAuthDeviceCodeChallengeToJSON(json: any): OAuthDeviceCodeChallenge { + return OAuthDeviceCodeChallengeToJSONTyped(json, false); +} + +export function OAuthDeviceCodeChallengeToJSONTyped(value?: OAuthDeviceCodeChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + }; +} + diff --git a/packages/client-ts/src/models/OAuthDeviceCodeChallengeResponseRequest.ts b/packages/client-ts/src/models/OAuthDeviceCodeChallengeResponseRequest.ts new file mode 100644 index 0000000000..0654aced79 --- /dev/null +++ b/packages/client-ts/src/models/OAuthDeviceCodeChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response that includes the user-entered device code + * @export + * @interface OAuthDeviceCodeChallengeResponseRequest + */ +export interface OAuthDeviceCodeChallengeResponseRequest { + /** + * + * @type {string} + * @memberof OAuthDeviceCodeChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof OAuthDeviceCodeChallengeResponseRequest + */ + code: string; +} + +/** + * Check if a given object implements the OAuthDeviceCodeChallengeResponseRequest interface. + */ +export function instanceOfOAuthDeviceCodeChallengeResponseRequest(value: object): value is OAuthDeviceCodeChallengeResponseRequest { + if (!('code' in value) || value['code'] === undefined) return false; + return true; +} + +export function OAuthDeviceCodeChallengeResponseRequestFromJSON(json: any): OAuthDeviceCodeChallengeResponseRequest { + return OAuthDeviceCodeChallengeResponseRequestFromJSONTyped(json, false); +} + +export function OAuthDeviceCodeChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthDeviceCodeChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'code': json['code'], + }; +} + +export function OAuthDeviceCodeChallengeResponseRequestToJSON(json: any): OAuthDeviceCodeChallengeResponseRequest { + return OAuthDeviceCodeChallengeResponseRequestToJSONTyped(json, false); +} + +export function OAuthDeviceCodeChallengeResponseRequestToJSONTyped(value?: OAuthDeviceCodeChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'code': value['code'], + }; +} + diff --git a/packages/client-ts/src/models/OAuthDeviceCodeFinishChallenge.ts b/packages/client-ts/src/models/OAuthDeviceCodeFinishChallenge.ts new file mode 100644 index 0000000000..2a2e3b2eb9 --- /dev/null +++ b/packages/client-ts/src/models/OAuthDeviceCodeFinishChallenge.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Final challenge after user enters their code + * @export + * @interface OAuthDeviceCodeFinishChallenge + */ +export interface OAuthDeviceCodeFinishChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof OAuthDeviceCodeFinishChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof OAuthDeviceCodeFinishChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof OAuthDeviceCodeFinishChallenge + */ + responseErrors?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the OAuthDeviceCodeFinishChallenge interface. + */ +export function instanceOfOAuthDeviceCodeFinishChallenge(value: object): value is OAuthDeviceCodeFinishChallenge { + return true; +} + +export function OAuthDeviceCodeFinishChallengeFromJSON(json: any): OAuthDeviceCodeFinishChallenge { + return OAuthDeviceCodeFinishChallengeFromJSONTyped(json, false); +} + +export function OAuthDeviceCodeFinishChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthDeviceCodeFinishChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + }; +} + +export function OAuthDeviceCodeFinishChallengeToJSON(json: any): OAuthDeviceCodeFinishChallenge { + return OAuthDeviceCodeFinishChallengeToJSONTyped(json, false); +} + +export function OAuthDeviceCodeFinishChallengeToJSONTyped(value?: OAuthDeviceCodeFinishChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + }; +} + diff --git a/packages/client-ts/src/models/OAuthDeviceCodeFinishChallengeResponseRequest.ts b/packages/client-ts/src/models/OAuthDeviceCodeFinishChallengeResponseRequest.ts new file mode 100644 index 0000000000..c65bc1fe9c --- /dev/null +++ b/packages/client-ts/src/models/OAuthDeviceCodeFinishChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response that device has been authenticated and tab can be closed + * @export + * @interface OAuthDeviceCodeFinishChallengeResponseRequest + */ +export interface OAuthDeviceCodeFinishChallengeResponseRequest { + /** + * + * @type {string} + * @memberof OAuthDeviceCodeFinishChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the OAuthDeviceCodeFinishChallengeResponseRequest interface. + */ +export function instanceOfOAuthDeviceCodeFinishChallengeResponseRequest(value: object): value is OAuthDeviceCodeFinishChallengeResponseRequest { + return true; +} + +export function OAuthDeviceCodeFinishChallengeResponseRequestFromJSON(json: any): OAuthDeviceCodeFinishChallengeResponseRequest { + return OAuthDeviceCodeFinishChallengeResponseRequestFromJSONTyped(json, false); +} + +export function OAuthDeviceCodeFinishChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthDeviceCodeFinishChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function OAuthDeviceCodeFinishChallengeResponseRequestToJSON(json: any): OAuthDeviceCodeFinishChallengeResponseRequest { + return OAuthDeviceCodeFinishChallengeResponseRequestToJSONTyped(json, false); +} + +export function OAuthDeviceCodeFinishChallengeResponseRequestToJSONTyped(value?: OAuthDeviceCodeFinishChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/OAuthSource.ts b/packages/client-ts/src/models/OAuthSource.ts new file mode 100644 index 0000000000..dfc12b9036 --- /dev/null +++ b/packages/client-ts/src/models/OAuthSource.ts @@ -0,0 +1,400 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SourceType } from './SourceType'; +import { + SourceTypeFromJSON, + SourceTypeFromJSONTyped, + SourceTypeToJSON, + SourceTypeToJSONTyped, +} from './SourceType'; +import type { PKCEMethodEnum } from './PKCEMethodEnum'; +import { + PKCEMethodEnumFromJSON, + PKCEMethodEnumFromJSONTyped, + PKCEMethodEnumToJSON, + PKCEMethodEnumToJSONTyped, +} from './PKCEMethodEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; +import type { AuthorizationCodeAuthMethodEnum } from './AuthorizationCodeAuthMethodEnum'; +import { + AuthorizationCodeAuthMethodEnumFromJSON, + AuthorizationCodeAuthMethodEnumFromJSONTyped, + AuthorizationCodeAuthMethodEnumToJSON, + AuthorizationCodeAuthMethodEnumToJSONTyped, +} from './AuthorizationCodeAuthMethodEnum'; +import type { ProviderTypeEnum } from './ProviderTypeEnum'; +import { + ProviderTypeEnumFromJSON, + ProviderTypeEnumFromJSONTyped, + ProviderTypeEnumToJSON, + ProviderTypeEnumToJSONTyped, +} from './ProviderTypeEnum'; + +/** + * OAuth Source Serializer + * @export + * @interface OAuthSource + */ +export interface OAuthSource { + /** + * + * @type {string} + * @memberof OAuthSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof OAuthSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof OAuthSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof OAuthSource + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof OAuthSource + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof OAuthSource + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof OAuthSource + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof OAuthSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof OAuthSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof OAuthSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof OAuthSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof OAuthSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof OAuthSource + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof OAuthSource + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof OAuthSource + */ + 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. + * @type {string} + * @memberof OAuthSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof OAuthSource + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof OAuthSource + */ + icon?: string; + /** + * + * @type {string} + * @memberof OAuthSource + */ + readonly iconUrl: string | null; + /** + * + * @type {ThemedUrls} + * @memberof OAuthSource + */ + readonly iconThemedUrls: ThemedUrls | null; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof OAuthSource + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * + * @type {ProviderTypeEnum} + * @memberof OAuthSource + */ + providerType: ProviderTypeEnum; + /** + * URL used to request the initial token. This URL is only required for OAuth 1. + * @type {string} + * @memberof OAuthSource + */ + requestTokenUrl?: string | null; + /** + * URL the user is redirect to to conest the flow. + * @type {string} + * @memberof OAuthSource + */ + authorizationUrl?: string | null; + /** + * URL used by authentik to retrieve tokens. + * @type {string} + * @memberof OAuthSource + */ + accessTokenUrl?: string | null; + /** + * URL used by authentik to get user information. + * @type {string} + * @memberof OAuthSource + */ + profileUrl?: string | null; + /** + * + * @type {PKCEMethodEnum} + * @memberof OAuthSource + */ + pkce?: PKCEMethodEnum; + /** + * + * @type {string} + * @memberof OAuthSource + */ + consumerKey: string; + /** + * Get OAuth Callback URL + * @type {string} + * @memberof OAuthSource + */ + readonly callbackUrl: string; + /** + * + * @type {string} + * @memberof OAuthSource + */ + additionalScopes?: string; + /** + * + * @type {SourceType} + * @memberof OAuthSource + */ + readonly type: SourceType; + /** + * + * @type {string} + * @memberof OAuthSource + */ + oidcWellKnownUrl?: string; + /** + * + * @type {string} + * @memberof OAuthSource + */ + oidcJwksUrl?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof OAuthSource + */ + oidcJwks?: { [key: string]: any; }; + /** + * How to perform authentication during an authorization_code token request flow + * @type {AuthorizationCodeAuthMethodEnum} + * @memberof OAuthSource + */ + authorizationCodeAuthMethod?: AuthorizationCodeAuthMethodEnum; +} + + + +/** + * Check if a given object implements the OAuthSource interface. + */ +export function instanceOfOAuthSource(value: object): value is OAuthSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + if (!('providerType' in value) || value['providerType'] === undefined) return false; + if (!('consumerKey' in value) || value['consumerKey'] === undefined) return false; + if (!('callbackUrl' in value) || value['callbackUrl'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function OAuthSourceFromJSON(json: any): OAuthSource { + return OAuthSourceFromJSONTyped(json, false); +} + +export function OAuthSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'providerType': ProviderTypeEnumFromJSON(json['provider_type']), + 'requestTokenUrl': json['request_token_url'] == null ? undefined : json['request_token_url'], + 'authorizationUrl': json['authorization_url'] == null ? undefined : json['authorization_url'], + 'accessTokenUrl': json['access_token_url'] == null ? undefined : json['access_token_url'], + 'profileUrl': json['profile_url'] == null ? undefined : json['profile_url'], + 'pkce': json['pkce'] == null ? undefined : PKCEMethodEnumFromJSON(json['pkce']), + 'consumerKey': json['consumer_key'], + 'callbackUrl': json['callback_url'], + 'additionalScopes': json['additional_scopes'] == null ? undefined : json['additional_scopes'], + 'type': SourceTypeFromJSON(json['type']), + 'oidcWellKnownUrl': json['oidc_well_known_url'] == null ? undefined : json['oidc_well_known_url'], + 'oidcJwksUrl': json['oidc_jwks_url'] == null ? undefined : json['oidc_jwks_url'], + 'oidcJwks': json['oidc_jwks'] == null ? undefined : json['oidc_jwks'], + 'authorizationCodeAuthMethod': json['authorization_code_auth_method'] == null ? undefined : AuthorizationCodeAuthMethodEnumFromJSON(json['authorization_code_auth_method']), + }; +} + +export function OAuthSourceToJSON(json: any): OAuthSource { + return OAuthSourceToJSONTyped(json, false); +} + +export function OAuthSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'provider_type': ProviderTypeEnumToJSON(value['providerType']), + 'request_token_url': value['requestTokenUrl'], + 'authorization_url': value['authorizationUrl'], + 'access_token_url': value['accessTokenUrl'], + 'profile_url': value['profileUrl'], + 'pkce': PKCEMethodEnumToJSON(value['pkce']), + 'consumer_key': value['consumerKey'], + 'additional_scopes': value['additionalScopes'], + 'oidc_well_known_url': value['oidcWellKnownUrl'], + 'oidc_jwks_url': value['oidcJwksUrl'], + 'oidc_jwks': value['oidcJwks'], + 'authorization_code_auth_method': AuthorizationCodeAuthMethodEnumToJSON(value['authorizationCodeAuthMethod']), + }; +} + diff --git a/packages/client-ts/src/models/OAuthSourcePropertyMapping.ts b/packages/client-ts/src/models/OAuthSourcePropertyMapping.ts new file mode 100644 index 0000000000..7a2109926e --- /dev/null +++ b/packages/client-ts/src/models/OAuthSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuthSourcePropertyMapping Serializer + * @export + * @interface OAuthSourcePropertyMapping + */ +export interface OAuthSourcePropertyMapping { + /** + * + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof OAuthSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the OAuthSourcePropertyMapping interface. + */ +export function instanceOfOAuthSourcePropertyMapping(value: object): value is OAuthSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function OAuthSourcePropertyMappingFromJSON(json: any): OAuthSourcePropertyMapping { + return OAuthSourcePropertyMappingFromJSONTyped(json, false); +} + +export function OAuthSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function OAuthSourcePropertyMappingToJSON(json: any): OAuthSourcePropertyMapping { + return OAuthSourcePropertyMappingToJSONTyped(json, false); +} + +export function OAuthSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/OAuthSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/OAuthSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..ac658df6fa --- /dev/null +++ b/packages/client-ts/src/models/OAuthSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuthSourcePropertyMapping Serializer + * @export + * @interface OAuthSourcePropertyMappingRequest + */ +export interface OAuthSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof OAuthSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof OAuthSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof OAuthSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the OAuthSourcePropertyMappingRequest interface. + */ +export function instanceOfOAuthSourcePropertyMappingRequest(value: object): value is OAuthSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function OAuthSourcePropertyMappingRequestFromJSON(json: any): OAuthSourcePropertyMappingRequest { + return OAuthSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function OAuthSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function OAuthSourcePropertyMappingRequestToJSON(json: any): OAuthSourcePropertyMappingRequest { + return OAuthSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function OAuthSourcePropertyMappingRequestToJSONTyped(value?: OAuthSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/OAuthSourceRequest.ts b/packages/client-ts/src/models/OAuthSourceRequest.ts new file mode 100644 index 0000000000..829bdd96a8 --- /dev/null +++ b/packages/client-ts/src/models/OAuthSourceRequest.ts @@ -0,0 +1,315 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { PKCEMethodEnum } from './PKCEMethodEnum'; +import { + PKCEMethodEnumFromJSON, + PKCEMethodEnumFromJSONTyped, + PKCEMethodEnumToJSON, + PKCEMethodEnumToJSONTyped, +} from './PKCEMethodEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; +import type { AuthorizationCodeAuthMethodEnum } from './AuthorizationCodeAuthMethodEnum'; +import { + AuthorizationCodeAuthMethodEnumFromJSON, + AuthorizationCodeAuthMethodEnumFromJSONTyped, + AuthorizationCodeAuthMethodEnumToJSON, + AuthorizationCodeAuthMethodEnumToJSONTyped, +} from './AuthorizationCodeAuthMethodEnum'; +import type { ProviderTypeEnum } from './ProviderTypeEnum'; +import { + ProviderTypeEnumFromJSON, + ProviderTypeEnumFromJSONTyped, + ProviderTypeEnumToJSON, + ProviderTypeEnumToJSONTyped, +} from './ProviderTypeEnum'; + +/** + * OAuth Source Serializer + * @export + * @interface OAuthSourceRequest + */ +export interface OAuthSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof OAuthSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof OAuthSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof OAuthSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof OAuthSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof OAuthSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof OAuthSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof OAuthSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof OAuthSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof OAuthSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof OAuthSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof OAuthSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * + * @type {ProviderTypeEnum} + * @memberof OAuthSourceRequest + */ + providerType: ProviderTypeEnum; + /** + * URL used to request the initial token. This URL is only required for OAuth 1. + * @type {string} + * @memberof OAuthSourceRequest + */ + requestTokenUrl?: string | null; + /** + * URL the user is redirect to to conest the flow. + * @type {string} + * @memberof OAuthSourceRequest + */ + authorizationUrl?: string | null; + /** + * URL used by authentik to retrieve tokens. + * @type {string} + * @memberof OAuthSourceRequest + */ + accessTokenUrl?: string | null; + /** + * URL used by authentik to get user information. + * @type {string} + * @memberof OAuthSourceRequest + */ + profileUrl?: string | null; + /** + * + * @type {PKCEMethodEnum} + * @memberof OAuthSourceRequest + */ + pkce?: PKCEMethodEnum; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + consumerKey: string; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + consumerSecret: string; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + additionalScopes?: string; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + oidcWellKnownUrl?: string; + /** + * + * @type {string} + * @memberof OAuthSourceRequest + */ + oidcJwksUrl?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof OAuthSourceRequest + */ + oidcJwks?: { [key: string]: any; }; + /** + * How to perform authentication during an authorization_code token request flow + * @type {AuthorizationCodeAuthMethodEnum} + * @memberof OAuthSourceRequest + */ + authorizationCodeAuthMethod?: AuthorizationCodeAuthMethodEnum; +} + + + +/** + * Check if a given object implements the OAuthSourceRequest interface. + */ +export function instanceOfOAuthSourceRequest(value: object): value is OAuthSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('providerType' in value) || value['providerType'] === undefined) return false; + if (!('consumerKey' in value) || value['consumerKey'] === undefined) return false; + if (!('consumerSecret' in value) || value['consumerSecret'] === undefined) return false; + return true; +} + +export function OAuthSourceRequestFromJSON(json: any): OAuthSourceRequest { + return OAuthSourceRequestFromJSONTyped(json, false); +} + +export function OAuthSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'providerType': ProviderTypeEnumFromJSON(json['provider_type']), + 'requestTokenUrl': json['request_token_url'] == null ? undefined : json['request_token_url'], + 'authorizationUrl': json['authorization_url'] == null ? undefined : json['authorization_url'], + 'accessTokenUrl': json['access_token_url'] == null ? undefined : json['access_token_url'], + 'profileUrl': json['profile_url'] == null ? undefined : json['profile_url'], + 'pkce': json['pkce'] == null ? undefined : PKCEMethodEnumFromJSON(json['pkce']), + 'consumerKey': json['consumer_key'], + 'consumerSecret': json['consumer_secret'], + 'additionalScopes': json['additional_scopes'] == null ? undefined : json['additional_scopes'], + 'oidcWellKnownUrl': json['oidc_well_known_url'] == null ? undefined : json['oidc_well_known_url'], + 'oidcJwksUrl': json['oidc_jwks_url'] == null ? undefined : json['oidc_jwks_url'], + 'oidcJwks': json['oidc_jwks'] == null ? undefined : json['oidc_jwks'], + 'authorizationCodeAuthMethod': json['authorization_code_auth_method'] == null ? undefined : AuthorizationCodeAuthMethodEnumFromJSON(json['authorization_code_auth_method']), + }; +} + +export function OAuthSourceRequestToJSON(json: any): OAuthSourceRequest { + return OAuthSourceRequestToJSONTyped(json, false); +} + +export function OAuthSourceRequestToJSONTyped(value?: OAuthSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'provider_type': ProviderTypeEnumToJSON(value['providerType']), + 'request_token_url': value['requestTokenUrl'], + 'authorization_url': value['authorizationUrl'], + 'access_token_url': value['accessTokenUrl'], + 'profile_url': value['profileUrl'], + 'pkce': PKCEMethodEnumToJSON(value['pkce']), + 'consumer_key': value['consumerKey'], + 'consumer_secret': value['consumerSecret'], + 'additional_scopes': value['additionalScopes'], + 'oidc_well_known_url': value['oidcWellKnownUrl'], + 'oidc_jwks_url': value['oidcJwksUrl'], + 'oidc_jwks': value['oidcJwks'], + 'authorization_code_auth_method': AuthorizationCodeAuthMethodEnumToJSON(value['authorizationCodeAuthMethod']), + }; +} + diff --git a/packages/client-ts/src/models/OpenIDConnectConfiguration.ts b/packages/client-ts/src/models/OpenIDConnectConfiguration.ts new file mode 100644 index 0000000000..7999ce0e44 --- /dev/null +++ b/packages/client-ts/src/models/OpenIDConnectConfiguration.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * rest_framework Serializer for OIDC Configuration + * @export + * @interface OpenIDConnectConfiguration + */ +export interface OpenIDConnectConfiguration { + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + issuer: string; + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + authorizationEndpoint: string; + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + tokenEndpoint: string; + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + userinfoEndpoint: string; + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + endSessionEndpoint: string; + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + introspectionEndpoint: string; + /** + * + * @type {string} + * @memberof OpenIDConnectConfiguration + */ + jwksUri: string; + /** + * + * @type {Array} + * @memberof OpenIDConnectConfiguration + */ + responseTypesSupported: Array; + /** + * + * @type {Array} + * @memberof OpenIDConnectConfiguration + */ + idTokenSigningAlgValuesSupported: Array; + /** + * + * @type {Array} + * @memberof OpenIDConnectConfiguration + */ + subjectTypesSupported: Array; + /** + * + * @type {Array} + * @memberof OpenIDConnectConfiguration + */ + tokenEndpointAuthMethodsSupported: Array; +} + +/** + * Check if a given object implements the OpenIDConnectConfiguration interface. + */ +export function instanceOfOpenIDConnectConfiguration(value: object): value is OpenIDConnectConfiguration { + if (!('issuer' in value) || value['issuer'] === undefined) return false; + if (!('authorizationEndpoint' in value) || value['authorizationEndpoint'] === undefined) return false; + if (!('tokenEndpoint' in value) || value['tokenEndpoint'] === undefined) return false; + if (!('userinfoEndpoint' in value) || value['userinfoEndpoint'] === undefined) return false; + if (!('endSessionEndpoint' in value) || value['endSessionEndpoint'] === undefined) return false; + if (!('introspectionEndpoint' in value) || value['introspectionEndpoint'] === undefined) return false; + if (!('jwksUri' in value) || value['jwksUri'] === undefined) return false; + if (!('responseTypesSupported' in value) || value['responseTypesSupported'] === undefined) return false; + if (!('idTokenSigningAlgValuesSupported' in value) || value['idTokenSigningAlgValuesSupported'] === undefined) return false; + if (!('subjectTypesSupported' in value) || value['subjectTypesSupported'] === undefined) return false; + if (!('tokenEndpointAuthMethodsSupported' in value) || value['tokenEndpointAuthMethodsSupported'] === undefined) return false; + return true; +} + +export function OpenIDConnectConfigurationFromJSON(json: any): OpenIDConnectConfiguration { + return OpenIDConnectConfigurationFromJSONTyped(json, false); +} + +export function OpenIDConnectConfigurationFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenIDConnectConfiguration { + if (json == null) { + return json; + } + return { + + 'issuer': json['issuer'], + 'authorizationEndpoint': json['authorization_endpoint'], + 'tokenEndpoint': json['token_endpoint'], + 'userinfoEndpoint': json['userinfo_endpoint'], + 'endSessionEndpoint': json['end_session_endpoint'], + 'introspectionEndpoint': json['introspection_endpoint'], + 'jwksUri': json['jwks_uri'], + 'responseTypesSupported': json['response_types_supported'], + 'idTokenSigningAlgValuesSupported': json['id_token_signing_alg_values_supported'], + 'subjectTypesSupported': json['subject_types_supported'], + 'tokenEndpointAuthMethodsSupported': json['token_endpoint_auth_methods_supported'], + }; +} + +export function OpenIDConnectConfigurationToJSON(json: any): OpenIDConnectConfiguration { + return OpenIDConnectConfigurationToJSONTyped(json, false); +} + +export function OpenIDConnectConfigurationToJSONTyped(value?: OpenIDConnectConfiguration | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'issuer': value['issuer'], + 'authorization_endpoint': value['authorizationEndpoint'], + 'token_endpoint': value['tokenEndpoint'], + 'userinfo_endpoint': value['userinfoEndpoint'], + 'end_session_endpoint': value['endSessionEndpoint'], + 'introspection_endpoint': value['introspectionEndpoint'], + 'jwks_uri': value['jwksUri'], + 'response_types_supported': value['responseTypesSupported'], + 'id_token_signing_alg_values_supported': value['idTokenSigningAlgValuesSupported'], + 'subject_types_supported': value['subjectTypesSupported'], + 'token_endpoint_auth_methods_supported': value['tokenEndpointAuthMethodsSupported'], + }; +} + diff --git a/packages/client-ts/src/models/OperatingSystem.ts b/packages/client-ts/src/models/OperatingSystem.ts new file mode 100644 index 0000000000..447cc737e9 --- /dev/null +++ b/packages/client-ts/src/models/OperatingSystem.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceFactsOSFamily } from './DeviceFactsOSFamily'; +import { + DeviceFactsOSFamilyFromJSON, + DeviceFactsOSFamilyFromJSONTyped, + DeviceFactsOSFamilyToJSON, + DeviceFactsOSFamilyToJSONTyped, +} from './DeviceFactsOSFamily'; + +/** + * For example: + * {"family":"linux","name":"Ubuntu","version":"24.04.3 LTS (Noble Numbat)","arch":"amd64"} + * {"family": "windows","name":"Server 2022 Datacenter","version":"10.0.20348.4405","arch":"amd64"} + * {"family": "windows","name":"Server 2022 Datacenter","version":"10.0.20348.4405","arch":"amd64"} + * {"family": "mac_os", "name": "", "version": "26.2", "arch": "arm64"} + * @export + * @interface OperatingSystem + */ +export interface OperatingSystem { + /** + * + * @type {DeviceFactsOSFamily} + * @memberof OperatingSystem + */ + family: DeviceFactsOSFamily; + /** + * Operating System name, such as 'Server 2022' or 'Ubuntu' + * @type {string} + * @memberof OperatingSystem + */ + name?: string; + /** + * Operating System version, must always be the version number but may contain build name + * @type {string} + * @memberof OperatingSystem + */ + version?: string; + /** + * + * @type {string} + * @memberof OperatingSystem + */ + arch?: string; +} + + + +/** + * Check if a given object implements the OperatingSystem interface. + */ +export function instanceOfOperatingSystem(value: object): value is OperatingSystem { + if (!('family' in value) || value['family'] === undefined) return false; + return true; +} + +export function OperatingSystemFromJSON(json: any): OperatingSystem { + return OperatingSystemFromJSONTyped(json, false); +} + +export function OperatingSystemFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperatingSystem { + if (json == null) { + return json; + } + return { + + 'family': DeviceFactsOSFamilyFromJSON(json['family']), + 'name': json['name'] == null ? undefined : json['name'], + 'version': json['version'] == null ? undefined : json['version'], + 'arch': json['arch'] == null ? undefined : json['arch'], + }; +} + +export function OperatingSystemToJSON(json: any): OperatingSystem { + return OperatingSystemToJSONTyped(json, false); +} + +export function OperatingSystemToJSONTyped(value?: OperatingSystem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'family': DeviceFactsOSFamilyToJSON(value['family']), + 'name': value['name'], + 'version': value['version'], + 'arch': value['arch'], + }; +} + diff --git a/packages/client-ts/src/models/OperatingSystemRequest.ts b/packages/client-ts/src/models/OperatingSystemRequest.ts new file mode 100644 index 0000000000..e84ddea54e --- /dev/null +++ b/packages/client-ts/src/models/OperatingSystemRequest.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceFactsOSFamily } from './DeviceFactsOSFamily'; +import { + DeviceFactsOSFamilyFromJSON, + DeviceFactsOSFamilyFromJSONTyped, + DeviceFactsOSFamilyToJSON, + DeviceFactsOSFamilyToJSONTyped, +} from './DeviceFactsOSFamily'; + +/** + * For example: + * {"family":"linux","name":"Ubuntu","version":"24.04.3 LTS (Noble Numbat)","arch":"amd64"} + * {"family": "windows","name":"Server 2022 Datacenter","version":"10.0.20348.4405","arch":"amd64"} + * {"family": "windows","name":"Server 2022 Datacenter","version":"10.0.20348.4405","arch":"amd64"} + * {"family": "mac_os", "name": "", "version": "26.2", "arch": "arm64"} + * @export + * @interface OperatingSystemRequest + */ +export interface OperatingSystemRequest { + /** + * + * @type {DeviceFactsOSFamily} + * @memberof OperatingSystemRequest + */ + family: DeviceFactsOSFamily; + /** + * Operating System name, such as 'Server 2022' or 'Ubuntu' + * @type {string} + * @memberof OperatingSystemRequest + */ + name?: string; + /** + * Operating System version, must always be the version number but may contain build name + * @type {string} + * @memberof OperatingSystemRequest + */ + version?: string; + /** + * + * @type {string} + * @memberof OperatingSystemRequest + */ + arch?: string; +} + + + +/** + * Check if a given object implements the OperatingSystemRequest interface. + */ +export function instanceOfOperatingSystemRequest(value: object): value is OperatingSystemRequest { + if (!('family' in value) || value['family'] === undefined) return false; + return true; +} + +export function OperatingSystemRequestFromJSON(json: any): OperatingSystemRequest { + return OperatingSystemRequestFromJSONTyped(json, false); +} + +export function OperatingSystemRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperatingSystemRequest { + if (json == null) { + return json; + } + return { + + 'family': DeviceFactsOSFamilyFromJSON(json['family']), + 'name': json['name'] == null ? undefined : json['name'], + 'version': json['version'] == null ? undefined : json['version'], + 'arch': json['arch'] == null ? undefined : json['arch'], + }; +} + +export function OperatingSystemRequestToJSON(json: any): OperatingSystemRequest { + return OperatingSystemRequestToJSONTyped(json, false); +} + +export function OperatingSystemRequestToJSONTyped(value?: OperatingSystemRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'family': DeviceFactsOSFamilyToJSON(value['family']), + 'name': value['name'], + 'version': value['version'], + 'arch': value['arch'], + }; +} + diff --git a/packages/client-ts/src/models/OutgoingSyncDeleteAction.ts b/packages/client-ts/src/models/OutgoingSyncDeleteAction.ts new file mode 100644 index 0000000000..785da14f6b --- /dev/null +++ b/packages/client-ts/src/models/OutgoingSyncDeleteAction.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const OutgoingSyncDeleteAction = { + DoNothing: 'do_nothing', + Delete: 'delete', + Suspend: 'suspend', + UnknownDefaultOpenApi: '11184809' +} as const; +export type OutgoingSyncDeleteAction = typeof OutgoingSyncDeleteAction[keyof typeof OutgoingSyncDeleteAction]; + + +export function instanceOfOutgoingSyncDeleteAction(value: any): boolean { + for (const key in OutgoingSyncDeleteAction) { + if (Object.prototype.hasOwnProperty.call(OutgoingSyncDeleteAction, key)) { + if (OutgoingSyncDeleteAction[key as keyof typeof OutgoingSyncDeleteAction] === value) { + return true; + } + } + } + return false; +} + +export function OutgoingSyncDeleteActionFromJSON(json: any): OutgoingSyncDeleteAction { + return OutgoingSyncDeleteActionFromJSONTyped(json, false); +} + +export function OutgoingSyncDeleteActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutgoingSyncDeleteAction { + return json as OutgoingSyncDeleteAction; +} + +export function OutgoingSyncDeleteActionToJSON(value?: OutgoingSyncDeleteAction | null): any { + return value as any; +} + +export function OutgoingSyncDeleteActionToJSONTyped(value: any, ignoreDiscriminator: boolean): OutgoingSyncDeleteAction { + return value as OutgoingSyncDeleteAction; +} + diff --git a/packages/client-ts/src/models/Outpost.ts b/packages/client-ts/src/models/Outpost.ts new file mode 100644 index 0000000000..e7e3fea604 --- /dev/null +++ b/packages/client-ts/src/models/Outpost.ts @@ -0,0 +1,173 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ServiceConnection } from './ServiceConnection'; +import { + ServiceConnectionFromJSON, + ServiceConnectionFromJSONTyped, + ServiceConnectionToJSON, + ServiceConnectionToJSONTyped, +} from './ServiceConnection'; +import type { OutpostTypeEnum } from './OutpostTypeEnum'; +import { + OutpostTypeEnumFromJSON, + OutpostTypeEnumFromJSONTyped, + OutpostTypeEnumToJSON, + OutpostTypeEnumToJSONTyped, +} from './OutpostTypeEnum'; +import type { Provider } from './Provider'; +import { + ProviderFromJSON, + ProviderFromJSONTyped, + ProviderToJSON, + ProviderToJSONTyped, +} from './Provider'; + +/** + * Outpost Serializer + * @export + * @interface Outpost + */ +export interface Outpost { + /** + * + * @type {string} + * @memberof Outpost + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Outpost + */ + name: string; + /** + * + * @type {OutpostTypeEnum} + * @memberof Outpost + */ + type: OutpostTypeEnum; + /** + * + * @type {Array} + * @memberof Outpost + */ + providers: Array; + /** + * + * @type {Array} + * @memberof Outpost + */ + readonly providersObj: Array; + /** + * Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. + * @type {string} + * @memberof Outpost + */ + serviceConnection?: string | null; + /** + * + * @type {ServiceConnection} + * @memberof Outpost + */ + readonly serviceConnectionObj: ServiceConnection | null; + /** + * + * @type {number} + * @memberof Outpost + */ + readonly refreshIntervalS: number; + /** + * Get Token identifier + * @type {string} + * @memberof Outpost + */ + readonly tokenIdentifier: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Outpost + */ + config: { [key: string]: any; }; + /** + * 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. + * @type {string} + * @memberof Outpost + */ + managed?: string | null; +} + + + +/** + * Check if a given object implements the Outpost interface. + */ +export function instanceOfOutpost(value: object): value is Outpost { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('providers' in value) || value['providers'] === undefined) return false; + if (!('providersObj' in value) || value['providersObj'] === undefined) return false; + if (!('serviceConnectionObj' in value) || value['serviceConnectionObj'] === undefined) return false; + if (!('refreshIntervalS' in value) || value['refreshIntervalS'] === undefined) return false; + if (!('tokenIdentifier' in value) || value['tokenIdentifier'] === undefined) return false; + if (!('config' in value) || value['config'] === undefined) return false; + return true; +} + +export function OutpostFromJSON(json: any): Outpost { + return OutpostFromJSONTyped(json, false); +} + +export function OutpostFromJSONTyped(json: any, ignoreDiscriminator: boolean): Outpost { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'type': OutpostTypeEnumFromJSON(json['type']), + 'providers': json['providers'], + 'providersObj': ((json['providers_obj'] as Array).map(ProviderFromJSON)), + 'serviceConnection': json['service_connection'] == null ? undefined : json['service_connection'], + 'serviceConnectionObj': ServiceConnectionFromJSON(json['service_connection_obj']), + 'refreshIntervalS': json['refresh_interval_s'], + 'tokenIdentifier': json['token_identifier'], + 'config': json['config'], + 'managed': json['managed'] == null ? undefined : json['managed'], + }; +} + +export function OutpostToJSON(json: any): Outpost { + return OutpostToJSONTyped(json, false); +} + +export function OutpostToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': OutpostTypeEnumToJSON(value['type']), + 'providers': value['providers'], + 'service_connection': value['serviceConnection'], + 'config': value['config'], + 'managed': value['managed'], + }; +} + diff --git a/packages/client-ts/src/models/OutpostDefaultConfig.ts b/packages/client-ts/src/models/OutpostDefaultConfig.ts new file mode 100644 index 0000000000..69dd71142b --- /dev/null +++ b/packages/client-ts/src/models/OutpostDefaultConfig.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Global default outpost config + * @export + * @interface OutpostDefaultConfig + */ +export interface OutpostDefaultConfig { + /** + * + * @type {{ [key: string]: any; }} + * @memberof OutpostDefaultConfig + */ + readonly config: { [key: string]: any; }; +} + +/** + * Check if a given object implements the OutpostDefaultConfig interface. + */ +export function instanceOfOutpostDefaultConfig(value: object): value is OutpostDefaultConfig { + if (!('config' in value) || value['config'] === undefined) return false; + return true; +} + +export function OutpostDefaultConfigFromJSON(json: any): OutpostDefaultConfig { + return OutpostDefaultConfigFromJSONTyped(json, false); +} + +export function OutpostDefaultConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutpostDefaultConfig { + if (json == null) { + return json; + } + return { + + 'config': json['config'], + }; +} + +export function OutpostDefaultConfigToJSON(json: any): OutpostDefaultConfig { + return OutpostDefaultConfigToJSONTyped(json, false); +} + +export function OutpostDefaultConfigToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/OutpostHealth.ts b/packages/client-ts/src/models/OutpostHealth.ts new file mode 100644 index 0000000000..9877560939 --- /dev/null +++ b/packages/client-ts/src/models/OutpostHealth.ts @@ -0,0 +1,153 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Outpost health status + * @export + * @interface OutpostHealth + */ +export interface OutpostHealth { + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly uid: string; + /** + * + * @type {Date} + * @memberof OutpostHealth + */ + readonly lastSeen: Date; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly version: string; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly golangVersion: string; + /** + * + * @type {boolean} + * @memberof OutpostHealth + */ + readonly opensslEnabled: boolean; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly opensslVersion: string; + /** + * Get FIPS enabled + * @type {boolean} + * @memberof OutpostHealth + */ + readonly fipsEnabled: boolean | null; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly versionShould: string; + /** + * + * @type {boolean} + * @memberof OutpostHealth + */ + readonly versionOutdated: boolean; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly buildHash: string; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly buildHashShould: string; + /** + * + * @type {string} + * @memberof OutpostHealth + */ + readonly hostname: string; +} + +/** + * Check if a given object implements the OutpostHealth interface. + */ +export function instanceOfOutpostHealth(value: object): value is OutpostHealth { + if (!('uid' in value) || value['uid'] === undefined) return false; + if (!('lastSeen' in value) || value['lastSeen'] === undefined) return false; + if (!('version' in value) || value['version'] === undefined) return false; + if (!('golangVersion' in value) || value['golangVersion'] === undefined) return false; + if (!('opensslEnabled' in value) || value['opensslEnabled'] === undefined) return false; + if (!('opensslVersion' in value) || value['opensslVersion'] === undefined) return false; + if (!('fipsEnabled' in value) || value['fipsEnabled'] === undefined) return false; + if (!('versionShould' in value) || value['versionShould'] === undefined) return false; + if (!('versionOutdated' in value) || value['versionOutdated'] === undefined) return false; + if (!('buildHash' in value) || value['buildHash'] === undefined) return false; + if (!('buildHashShould' in value) || value['buildHashShould'] === undefined) return false; + if (!('hostname' in value) || value['hostname'] === undefined) return false; + return true; +} + +export function OutpostHealthFromJSON(json: any): OutpostHealth { + return OutpostHealthFromJSONTyped(json, false); +} + +export function OutpostHealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutpostHealth { + if (json == null) { + return json; + } + return { + + 'uid': json['uid'], + 'lastSeen': (new Date(json['last_seen'])), + 'version': json['version'], + 'golangVersion': json['golang_version'], + 'opensslEnabled': json['openssl_enabled'], + 'opensslVersion': json['openssl_version'], + 'fipsEnabled': json['fips_enabled'], + 'versionShould': json['version_should'], + 'versionOutdated': json['version_outdated'], + 'buildHash': json['build_hash'], + 'buildHashShould': json['build_hash_should'], + 'hostname': json['hostname'], + }; +} + +export function OutpostHealthToJSON(json: any): OutpostHealth { + return OutpostHealthToJSONTyped(json, false); +} + +export function OutpostHealthToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/OutpostRequest.ts b/packages/client-ts/src/models/OutpostRequest.ts new file mode 100644 index 0000000000..2478a51259 --- /dev/null +++ b/packages/client-ts/src/models/OutpostRequest.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutpostTypeEnum } from './OutpostTypeEnum'; +import { + OutpostTypeEnumFromJSON, + OutpostTypeEnumFromJSONTyped, + OutpostTypeEnumToJSON, + OutpostTypeEnumToJSONTyped, +} from './OutpostTypeEnum'; + +/** + * Outpost Serializer + * @export + * @interface OutpostRequest + */ +export interface OutpostRequest { + /** + * + * @type {string} + * @memberof OutpostRequest + */ + name: string; + /** + * + * @type {OutpostTypeEnum} + * @memberof OutpostRequest + */ + type: OutpostTypeEnum; + /** + * + * @type {Array} + * @memberof OutpostRequest + */ + providers: Array; + /** + * Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. + * @type {string} + * @memberof OutpostRequest + */ + serviceConnection?: string | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof OutpostRequest + */ + config: { [key: string]: any; }; + /** + * 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. + * @type {string} + * @memberof OutpostRequest + */ + managed?: string | null; +} + + + +/** + * Check if a given object implements the OutpostRequest interface. + */ +export function instanceOfOutpostRequest(value: object): value is OutpostRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('providers' in value) || value['providers'] === undefined) return false; + if (!('config' in value) || value['config'] === undefined) return false; + return true; +} + +export function OutpostRequestFromJSON(json: any): OutpostRequest { + return OutpostRequestFromJSONTyped(json, false); +} + +export function OutpostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutpostRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': OutpostTypeEnumFromJSON(json['type']), + 'providers': json['providers'], + 'serviceConnection': json['service_connection'] == null ? undefined : json['service_connection'], + 'config': json['config'], + 'managed': json['managed'] == null ? undefined : json['managed'], + }; +} + +export function OutpostRequestToJSON(json: any): OutpostRequest { + return OutpostRequestToJSONTyped(json, false); +} + +export function OutpostRequestToJSONTyped(value?: OutpostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': OutpostTypeEnumToJSON(value['type']), + 'providers': value['providers'], + 'service_connection': value['serviceConnection'], + 'config': value['config'], + 'managed': value['managed'], + }; +} + diff --git a/packages/client-ts/src/models/OutpostTypeEnum.ts b/packages/client-ts/src/models/OutpostTypeEnum.ts new file mode 100644 index 0000000000..cce81a07a0 --- /dev/null +++ b/packages/client-ts/src/models/OutpostTypeEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const OutpostTypeEnum = { + Proxy: 'proxy', + Ldap: 'ldap', + Radius: 'radius', + Rac: 'rac', + UnknownDefaultOpenApi: '11184809' +} as const; +export type OutpostTypeEnum = typeof OutpostTypeEnum[keyof typeof OutpostTypeEnum]; + + +export function instanceOfOutpostTypeEnum(value: any): boolean { + for (const key in OutpostTypeEnum) { + if (Object.prototype.hasOwnProperty.call(OutpostTypeEnum, key)) { + if (OutpostTypeEnum[key as keyof typeof OutpostTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function OutpostTypeEnumFromJSON(json: any): OutpostTypeEnum { + return OutpostTypeEnumFromJSONTyped(json, false); +} + +export function OutpostTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutpostTypeEnum { + return json as OutpostTypeEnum; +} + +export function OutpostTypeEnumToJSON(value?: OutpostTypeEnum | null): any { + return value as any; +} + +export function OutpostTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): OutpostTypeEnum { + return value as OutpostTypeEnum; +} + diff --git a/packages/client-ts/src/models/PKCEMethodEnum.ts b/packages/client-ts/src/models/PKCEMethodEnum.ts new file mode 100644 index 0000000000..57d1735347 --- /dev/null +++ b/packages/client-ts/src/models/PKCEMethodEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const PKCEMethodEnum = { + None: 'none', + Plain: 'plain', + S256: 'S256', + UnknownDefaultOpenApi: '11184809' +} as const; +export type PKCEMethodEnum = typeof PKCEMethodEnum[keyof typeof PKCEMethodEnum]; + + +export function instanceOfPKCEMethodEnum(value: any): boolean { + for (const key in PKCEMethodEnum) { + if (Object.prototype.hasOwnProperty.call(PKCEMethodEnum, key)) { + if (PKCEMethodEnum[key as keyof typeof PKCEMethodEnum] === value) { + return true; + } + } + } + return false; +} + +export function PKCEMethodEnumFromJSON(json: any): PKCEMethodEnum { + return PKCEMethodEnumFromJSONTyped(json, false); +} + +export function PKCEMethodEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): PKCEMethodEnum { + return json as PKCEMethodEnum; +} + +export function PKCEMethodEnumToJSON(value?: PKCEMethodEnum | null): any { + return value as any; +} + +export function PKCEMethodEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): PKCEMethodEnum { + return value as PKCEMethodEnum; +} + diff --git a/packages/client-ts/src/models/PaginatedAgentConnectorList.ts b/packages/client-ts/src/models/PaginatedAgentConnectorList.ts new file mode 100644 index 0000000000..0701f8a29e --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAgentConnectorList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AgentConnector } from './AgentConnector'; +import { + AgentConnectorFromJSON, + AgentConnectorFromJSONTyped, + AgentConnectorToJSON, + AgentConnectorToJSONTyped, +} from './AgentConnector'; + +/** + * + * @export + * @interface PaginatedAgentConnectorList + */ +export interface PaginatedAgentConnectorList { + /** + * + * @type {Pagination} + * @memberof PaginatedAgentConnectorList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAgentConnectorList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAgentConnectorList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAgentConnectorList interface. + */ +export function instanceOfPaginatedAgentConnectorList(value: object): value is PaginatedAgentConnectorList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAgentConnectorListFromJSON(json: any): PaginatedAgentConnectorList { + return PaginatedAgentConnectorListFromJSONTyped(json, false); +} + +export function PaginatedAgentConnectorListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAgentConnectorList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AgentConnectorFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAgentConnectorListToJSON(json: any): PaginatedAgentConnectorList { + return PaginatedAgentConnectorListToJSONTyped(json, false); +} + +export function PaginatedAgentConnectorListToJSONTyped(value?: PaginatedAgentConnectorList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AgentConnectorToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedApplicationEntitlementList.ts b/packages/client-ts/src/models/PaginatedApplicationEntitlementList.ts new file mode 100644 index 0000000000..0a6126f77a --- /dev/null +++ b/packages/client-ts/src/models/PaginatedApplicationEntitlementList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ApplicationEntitlement } from './ApplicationEntitlement'; +import { + ApplicationEntitlementFromJSON, + ApplicationEntitlementFromJSONTyped, + ApplicationEntitlementToJSON, + ApplicationEntitlementToJSONTyped, +} from './ApplicationEntitlement'; + +/** + * + * @export + * @interface PaginatedApplicationEntitlementList + */ +export interface PaginatedApplicationEntitlementList { + /** + * + * @type {Pagination} + * @memberof PaginatedApplicationEntitlementList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedApplicationEntitlementList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedApplicationEntitlementList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedApplicationEntitlementList interface. + */ +export function instanceOfPaginatedApplicationEntitlementList(value: object): value is PaginatedApplicationEntitlementList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedApplicationEntitlementListFromJSON(json: any): PaginatedApplicationEntitlementList { + return PaginatedApplicationEntitlementListFromJSONTyped(json, false); +} + +export function PaginatedApplicationEntitlementListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedApplicationEntitlementList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ApplicationEntitlementFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedApplicationEntitlementListToJSON(json: any): PaginatedApplicationEntitlementList { + return PaginatedApplicationEntitlementListToJSONTyped(json, false); +} + +export function PaginatedApplicationEntitlementListToJSONTyped(value?: PaginatedApplicationEntitlementList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ApplicationEntitlementToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedApplicationList.ts b/packages/client-ts/src/models/PaginatedApplicationList.ts new file mode 100644 index 0000000000..a62339fb9e --- /dev/null +++ b/packages/client-ts/src/models/PaginatedApplicationList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Application } from './Application'; +import { + ApplicationFromJSON, + ApplicationFromJSONTyped, + ApplicationToJSON, + ApplicationToJSONTyped, +} from './Application'; + +/** + * + * @export + * @interface PaginatedApplicationList + */ +export interface PaginatedApplicationList { + /** + * + * @type {Pagination} + * @memberof PaginatedApplicationList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedApplicationList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedApplicationList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedApplicationList interface. + */ +export function instanceOfPaginatedApplicationList(value: object): value is PaginatedApplicationList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedApplicationListFromJSON(json: any): PaginatedApplicationList { + return PaginatedApplicationListFromJSONTyped(json, false); +} + +export function PaginatedApplicationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedApplicationList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ApplicationFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedApplicationListToJSON(json: any): PaginatedApplicationList { + return PaginatedApplicationListToJSONTyped(json, false); +} + +export function PaginatedApplicationListToJSONTyped(value?: PaginatedApplicationList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ApplicationToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatedSessionList.ts b/packages/client-ts/src/models/PaginatedAuthenticatedSessionList.ts new file mode 100644 index 0000000000..7980fabfc1 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatedSessionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatedSession } from './AuthenticatedSession'; +import { + AuthenticatedSessionFromJSON, + AuthenticatedSessionFromJSONTyped, + AuthenticatedSessionToJSON, + AuthenticatedSessionToJSONTyped, +} from './AuthenticatedSession'; + +/** + * + * @export + * @interface PaginatedAuthenticatedSessionList + */ +export interface PaginatedAuthenticatedSessionList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatedSessionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatedSessionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatedSessionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatedSessionList interface. + */ +export function instanceOfPaginatedAuthenticatedSessionList(value: object): value is PaginatedAuthenticatedSessionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatedSessionListFromJSON(json: any): PaginatedAuthenticatedSessionList { + return PaginatedAuthenticatedSessionListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatedSessionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatedSessionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatedSessionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatedSessionListToJSON(json: any): PaginatedAuthenticatedSessionList { + return PaginatedAuthenticatedSessionListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatedSessionListToJSONTyped(value?: PaginatedAuthenticatedSessionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatedSessionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorDuoStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorDuoStageList.ts new file mode 100644 index 0000000000..8928a16655 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorDuoStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { AuthenticatorDuoStage } from './AuthenticatorDuoStage'; +import { + AuthenticatorDuoStageFromJSON, + AuthenticatorDuoStageFromJSONTyped, + AuthenticatorDuoStageToJSON, + AuthenticatorDuoStageToJSONTyped, +} from './AuthenticatorDuoStage'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedAuthenticatorDuoStageList + */ +export interface PaginatedAuthenticatorDuoStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorDuoStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorDuoStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorDuoStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorDuoStageList interface. + */ +export function instanceOfPaginatedAuthenticatorDuoStageList(value: object): value is PaginatedAuthenticatorDuoStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorDuoStageListFromJSON(json: any): PaginatedAuthenticatorDuoStageList { + return PaginatedAuthenticatorDuoStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorDuoStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorDuoStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorDuoStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorDuoStageListToJSON(json: any): PaginatedAuthenticatorDuoStageList { + return PaginatedAuthenticatorDuoStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorDuoStageListToJSONTyped(value?: PaginatedAuthenticatorDuoStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorDuoStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorEmailStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorEmailStageList.ts new file mode 100644 index 0000000000..3870b59364 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorEmailStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorEmailStage } from './AuthenticatorEmailStage'; +import { + AuthenticatorEmailStageFromJSON, + AuthenticatorEmailStageFromJSONTyped, + AuthenticatorEmailStageToJSON, + AuthenticatorEmailStageToJSONTyped, +} from './AuthenticatorEmailStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorEmailStageList + */ +export interface PaginatedAuthenticatorEmailStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorEmailStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorEmailStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorEmailStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorEmailStageList interface. + */ +export function instanceOfPaginatedAuthenticatorEmailStageList(value: object): value is PaginatedAuthenticatorEmailStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorEmailStageListFromJSON(json: any): PaginatedAuthenticatorEmailStageList { + return PaginatedAuthenticatorEmailStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorEmailStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorEmailStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorEmailStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorEmailStageListToJSON(json: any): PaginatedAuthenticatorEmailStageList { + return PaginatedAuthenticatorEmailStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorEmailStageListToJSONTyped(value?: PaginatedAuthenticatorEmailStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorEmailStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorEndpointGDTCStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorEndpointGDTCStageList.ts new file mode 100644 index 0000000000..76485f3fb7 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorEndpointGDTCStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorEndpointGDTCStage } from './AuthenticatorEndpointGDTCStage'; +import { + AuthenticatorEndpointGDTCStageFromJSON, + AuthenticatorEndpointGDTCStageFromJSONTyped, + AuthenticatorEndpointGDTCStageToJSON, + AuthenticatorEndpointGDTCStageToJSONTyped, +} from './AuthenticatorEndpointGDTCStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorEndpointGDTCStageList + */ +export interface PaginatedAuthenticatorEndpointGDTCStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorEndpointGDTCStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorEndpointGDTCStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorEndpointGDTCStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorEndpointGDTCStageList interface. + */ +export function instanceOfPaginatedAuthenticatorEndpointGDTCStageList(value: object): value is PaginatedAuthenticatorEndpointGDTCStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorEndpointGDTCStageListFromJSON(json: any): PaginatedAuthenticatorEndpointGDTCStageList { + return PaginatedAuthenticatorEndpointGDTCStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorEndpointGDTCStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorEndpointGDTCStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorEndpointGDTCStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorEndpointGDTCStageListToJSON(json: any): PaginatedAuthenticatorEndpointGDTCStageList { + return PaginatedAuthenticatorEndpointGDTCStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorEndpointGDTCStageListToJSONTyped(value?: PaginatedAuthenticatorEndpointGDTCStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorEndpointGDTCStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorSMSStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorSMSStageList.ts new file mode 100644 index 0000000000..350b31a1cb --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorSMSStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorSMSStage } from './AuthenticatorSMSStage'; +import { + AuthenticatorSMSStageFromJSON, + AuthenticatorSMSStageFromJSONTyped, + AuthenticatorSMSStageToJSON, + AuthenticatorSMSStageToJSONTyped, +} from './AuthenticatorSMSStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorSMSStageList + */ +export interface PaginatedAuthenticatorSMSStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorSMSStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorSMSStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorSMSStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorSMSStageList interface. + */ +export function instanceOfPaginatedAuthenticatorSMSStageList(value: object): value is PaginatedAuthenticatorSMSStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorSMSStageListFromJSON(json: any): PaginatedAuthenticatorSMSStageList { + return PaginatedAuthenticatorSMSStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorSMSStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorSMSStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorSMSStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorSMSStageListToJSON(json: any): PaginatedAuthenticatorSMSStageList { + return PaginatedAuthenticatorSMSStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorSMSStageListToJSONTyped(value?: PaginatedAuthenticatorSMSStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorSMSStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorStaticStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorStaticStageList.ts new file mode 100644 index 0000000000..2e01035da2 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorStaticStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorStaticStage } from './AuthenticatorStaticStage'; +import { + AuthenticatorStaticStageFromJSON, + AuthenticatorStaticStageFromJSONTyped, + AuthenticatorStaticStageToJSON, + AuthenticatorStaticStageToJSONTyped, +} from './AuthenticatorStaticStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorStaticStageList + */ +export interface PaginatedAuthenticatorStaticStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorStaticStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorStaticStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorStaticStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorStaticStageList interface. + */ +export function instanceOfPaginatedAuthenticatorStaticStageList(value: object): value is PaginatedAuthenticatorStaticStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorStaticStageListFromJSON(json: any): PaginatedAuthenticatorStaticStageList { + return PaginatedAuthenticatorStaticStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorStaticStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorStaticStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorStaticStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorStaticStageListToJSON(json: any): PaginatedAuthenticatorStaticStageList { + return PaginatedAuthenticatorStaticStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorStaticStageListToJSONTyped(value?: PaginatedAuthenticatorStaticStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorStaticStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorTOTPStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorTOTPStageList.ts new file mode 100644 index 0000000000..5f585b79e3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorTOTPStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorTOTPStage } from './AuthenticatorTOTPStage'; +import { + AuthenticatorTOTPStageFromJSON, + AuthenticatorTOTPStageFromJSONTyped, + AuthenticatorTOTPStageToJSON, + AuthenticatorTOTPStageToJSONTyped, +} from './AuthenticatorTOTPStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorTOTPStageList + */ +export interface PaginatedAuthenticatorTOTPStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorTOTPStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorTOTPStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorTOTPStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorTOTPStageList interface. + */ +export function instanceOfPaginatedAuthenticatorTOTPStageList(value: object): value is PaginatedAuthenticatorTOTPStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorTOTPStageListFromJSON(json: any): PaginatedAuthenticatorTOTPStageList { + return PaginatedAuthenticatorTOTPStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorTOTPStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorTOTPStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorTOTPStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorTOTPStageListToJSON(json: any): PaginatedAuthenticatorTOTPStageList { + return PaginatedAuthenticatorTOTPStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorTOTPStageListToJSONTyped(value?: PaginatedAuthenticatorTOTPStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorTOTPStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorValidateStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorValidateStageList.ts new file mode 100644 index 0000000000..fd1a805c37 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorValidateStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorValidateStage } from './AuthenticatorValidateStage'; +import { + AuthenticatorValidateStageFromJSON, + AuthenticatorValidateStageFromJSONTyped, + AuthenticatorValidateStageToJSON, + AuthenticatorValidateStageToJSONTyped, +} from './AuthenticatorValidateStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorValidateStageList + */ +export interface PaginatedAuthenticatorValidateStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorValidateStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorValidateStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorValidateStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorValidateStageList interface. + */ +export function instanceOfPaginatedAuthenticatorValidateStageList(value: object): value is PaginatedAuthenticatorValidateStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorValidateStageListFromJSON(json: any): PaginatedAuthenticatorValidateStageList { + return PaginatedAuthenticatorValidateStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorValidateStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorValidateStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorValidateStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorValidateStageListToJSON(json: any): PaginatedAuthenticatorValidateStageList { + return PaginatedAuthenticatorValidateStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorValidateStageListToJSONTyped(value?: PaginatedAuthenticatorValidateStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorValidateStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedAuthenticatorWebAuthnStageList.ts b/packages/client-ts/src/models/PaginatedAuthenticatorWebAuthnStageList.ts new file mode 100644 index 0000000000..47125f481c --- /dev/null +++ b/packages/client-ts/src/models/PaginatedAuthenticatorWebAuthnStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { AuthenticatorWebAuthnStage } from './AuthenticatorWebAuthnStage'; +import { + AuthenticatorWebAuthnStageFromJSON, + AuthenticatorWebAuthnStageFromJSONTyped, + AuthenticatorWebAuthnStageToJSON, + AuthenticatorWebAuthnStageToJSONTyped, +} from './AuthenticatorWebAuthnStage'; + +/** + * + * @export + * @interface PaginatedAuthenticatorWebAuthnStageList + */ +export interface PaginatedAuthenticatorWebAuthnStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedAuthenticatorWebAuthnStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedAuthenticatorWebAuthnStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedAuthenticatorWebAuthnStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedAuthenticatorWebAuthnStageList interface. + */ +export function instanceOfPaginatedAuthenticatorWebAuthnStageList(value: object): value is PaginatedAuthenticatorWebAuthnStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedAuthenticatorWebAuthnStageListFromJSON(json: any): PaginatedAuthenticatorWebAuthnStageList { + return PaginatedAuthenticatorWebAuthnStageListFromJSONTyped(json, false); +} + +export function PaginatedAuthenticatorWebAuthnStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAuthenticatorWebAuthnStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(AuthenticatorWebAuthnStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedAuthenticatorWebAuthnStageListToJSON(json: any): PaginatedAuthenticatorWebAuthnStageList { + return PaginatedAuthenticatorWebAuthnStageListToJSONTyped(json, false); +} + +export function PaginatedAuthenticatorWebAuthnStageListToJSONTyped(value?: PaginatedAuthenticatorWebAuthnStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(AuthenticatorWebAuthnStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedBlueprintInstanceList.ts b/packages/client-ts/src/models/PaginatedBlueprintInstanceList.ts new file mode 100644 index 0000000000..4e79baa98c --- /dev/null +++ b/packages/client-ts/src/models/PaginatedBlueprintInstanceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { BlueprintInstance } from './BlueprintInstance'; +import { + BlueprintInstanceFromJSON, + BlueprintInstanceFromJSONTyped, + BlueprintInstanceToJSON, + BlueprintInstanceToJSONTyped, +} from './BlueprintInstance'; + +/** + * + * @export + * @interface PaginatedBlueprintInstanceList + */ +export interface PaginatedBlueprintInstanceList { + /** + * + * @type {Pagination} + * @memberof PaginatedBlueprintInstanceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedBlueprintInstanceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedBlueprintInstanceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedBlueprintInstanceList interface. + */ +export function instanceOfPaginatedBlueprintInstanceList(value: object): value is PaginatedBlueprintInstanceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedBlueprintInstanceListFromJSON(json: any): PaginatedBlueprintInstanceList { + return PaginatedBlueprintInstanceListFromJSONTyped(json, false); +} + +export function PaginatedBlueprintInstanceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedBlueprintInstanceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(BlueprintInstanceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedBlueprintInstanceListToJSON(json: any): PaginatedBlueprintInstanceList { + return PaginatedBlueprintInstanceListToJSONTyped(json, false); +} + +export function PaginatedBlueprintInstanceListToJSONTyped(value?: PaginatedBlueprintInstanceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(BlueprintInstanceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedBrandList.ts b/packages/client-ts/src/models/PaginatedBrandList.ts new file mode 100644 index 0000000000..7c4cd24bc0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedBrandList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Brand } from './Brand'; +import { + BrandFromJSON, + BrandFromJSONTyped, + BrandToJSON, + BrandToJSONTyped, +} from './Brand'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedBrandList + */ +export interface PaginatedBrandList { + /** + * + * @type {Pagination} + * @memberof PaginatedBrandList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedBrandList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedBrandList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedBrandList interface. + */ +export function instanceOfPaginatedBrandList(value: object): value is PaginatedBrandList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedBrandListFromJSON(json: any): PaginatedBrandList { + return PaginatedBrandListFromJSONTyped(json, false); +} + +export function PaginatedBrandListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedBrandList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(BrandFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedBrandListToJSON(json: any): PaginatedBrandList { + return PaginatedBrandListToJSONTyped(json, false); +} + +export function PaginatedBrandListToJSONTyped(value?: PaginatedBrandList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(BrandToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedCaptchaStageList.ts b/packages/client-ts/src/models/PaginatedCaptchaStageList.ts new file mode 100644 index 0000000000..bfcfbe126b --- /dev/null +++ b/packages/client-ts/src/models/PaginatedCaptchaStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CaptchaStage } from './CaptchaStage'; +import { + CaptchaStageFromJSON, + CaptchaStageFromJSONTyped, + CaptchaStageToJSON, + CaptchaStageToJSONTyped, +} from './CaptchaStage'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedCaptchaStageList + */ +export interface PaginatedCaptchaStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedCaptchaStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedCaptchaStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedCaptchaStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedCaptchaStageList interface. + */ +export function instanceOfPaginatedCaptchaStageList(value: object): value is PaginatedCaptchaStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedCaptchaStageListFromJSON(json: any): PaginatedCaptchaStageList { + return PaginatedCaptchaStageListFromJSONTyped(json, false); +} + +export function PaginatedCaptchaStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCaptchaStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(CaptchaStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedCaptchaStageListToJSON(json: any): PaginatedCaptchaStageList { + return PaginatedCaptchaStageListToJSONTyped(json, false); +} + +export function PaginatedCaptchaStageListToJSONTyped(value?: PaginatedCaptchaStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(CaptchaStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedCertificateKeyPairList.ts b/packages/client-ts/src/models/PaginatedCertificateKeyPairList.ts new file mode 100644 index 0000000000..0fd54f5291 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedCertificateKeyPairList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { CertificateKeyPair } from './CertificateKeyPair'; +import { + CertificateKeyPairFromJSON, + CertificateKeyPairFromJSONTyped, + CertificateKeyPairToJSON, + CertificateKeyPairToJSONTyped, +} from './CertificateKeyPair'; + +/** + * + * @export + * @interface PaginatedCertificateKeyPairList + */ +export interface PaginatedCertificateKeyPairList { + /** + * + * @type {Pagination} + * @memberof PaginatedCertificateKeyPairList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedCertificateKeyPairList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedCertificateKeyPairList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedCertificateKeyPairList interface. + */ +export function instanceOfPaginatedCertificateKeyPairList(value: object): value is PaginatedCertificateKeyPairList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedCertificateKeyPairListFromJSON(json: any): PaginatedCertificateKeyPairList { + return PaginatedCertificateKeyPairListFromJSONTyped(json, false); +} + +export function PaginatedCertificateKeyPairListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCertificateKeyPairList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(CertificateKeyPairFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedCertificateKeyPairListToJSON(json: any): PaginatedCertificateKeyPairList { + return PaginatedCertificateKeyPairListToJSONTyped(json, false); +} + +export function PaginatedCertificateKeyPairListToJSONTyped(value?: PaginatedCertificateKeyPairList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(CertificateKeyPairToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedConnectionTokenList.ts b/packages/client-ts/src/models/PaginatedConnectionTokenList.ts new file mode 100644 index 0000000000..25c4501ecf --- /dev/null +++ b/packages/client-ts/src/models/PaginatedConnectionTokenList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ConnectionToken } from './ConnectionToken'; +import { + ConnectionTokenFromJSON, + ConnectionTokenFromJSONTyped, + ConnectionTokenToJSON, + ConnectionTokenToJSONTyped, +} from './ConnectionToken'; + +/** + * + * @export + * @interface PaginatedConnectionTokenList + */ +export interface PaginatedConnectionTokenList { + /** + * + * @type {Pagination} + * @memberof PaginatedConnectionTokenList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedConnectionTokenList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedConnectionTokenList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedConnectionTokenList interface. + */ +export function instanceOfPaginatedConnectionTokenList(value: object): value is PaginatedConnectionTokenList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedConnectionTokenListFromJSON(json: any): PaginatedConnectionTokenList { + return PaginatedConnectionTokenListFromJSONTyped(json, false); +} + +export function PaginatedConnectionTokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedConnectionTokenList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ConnectionTokenFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedConnectionTokenListToJSON(json: any): PaginatedConnectionTokenList { + return PaginatedConnectionTokenListToJSONTyped(json, false); +} + +export function PaginatedConnectionTokenListToJSONTyped(value?: PaginatedConnectionTokenList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ConnectionTokenToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedConnectorList.ts b/packages/client-ts/src/models/PaginatedConnectorList.ts new file mode 100644 index 0000000000..bc429c8ee8 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedConnectorList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Connector } from './Connector'; +import { + ConnectorFromJSON, + ConnectorFromJSONTyped, + ConnectorToJSON, + ConnectorToJSONTyped, +} from './Connector'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedConnectorList + */ +export interface PaginatedConnectorList { + /** + * + * @type {Pagination} + * @memberof PaginatedConnectorList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedConnectorList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedConnectorList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedConnectorList interface. + */ +export function instanceOfPaginatedConnectorList(value: object): value is PaginatedConnectorList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedConnectorListFromJSON(json: any): PaginatedConnectorList { + return PaginatedConnectorListFromJSONTyped(json, false); +} + +export function PaginatedConnectorListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedConnectorList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ConnectorFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedConnectorListToJSON(json: any): PaginatedConnectorList { + return PaginatedConnectorListToJSONTyped(json, false); +} + +export function PaginatedConnectorListToJSONTyped(value?: PaginatedConnectorList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ConnectorToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedConsentStageList.ts b/packages/client-ts/src/models/PaginatedConsentStageList.ts new file mode 100644 index 0000000000..b36a31443f --- /dev/null +++ b/packages/client-ts/src/models/PaginatedConsentStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ConsentStage } from './ConsentStage'; +import { + ConsentStageFromJSON, + ConsentStageFromJSONTyped, + ConsentStageToJSON, + ConsentStageToJSONTyped, +} from './ConsentStage'; + +/** + * + * @export + * @interface PaginatedConsentStageList + */ +export interface PaginatedConsentStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedConsentStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedConsentStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedConsentStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedConsentStageList interface. + */ +export function instanceOfPaginatedConsentStageList(value: object): value is PaginatedConsentStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedConsentStageListFromJSON(json: any): PaginatedConsentStageList { + return PaginatedConsentStageListFromJSONTyped(json, false); +} + +export function PaginatedConsentStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedConsentStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ConsentStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedConsentStageListToJSON(json: any): PaginatedConsentStageList { + return PaginatedConsentStageListToJSONTyped(json, false); +} + +export function PaginatedConsentStageListToJSONTyped(value?: PaginatedConsentStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ConsentStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDataExportList.ts b/packages/client-ts/src/models/PaginatedDataExportList.ts new file mode 100644 index 0000000000..d4a630ca56 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDataExportList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { DataExport } from './DataExport'; +import { + DataExportFromJSON, + DataExportFromJSONTyped, + DataExportToJSON, + DataExportToJSONTyped, +} from './DataExport'; + +/** + * + * @export + * @interface PaginatedDataExportList + */ +export interface PaginatedDataExportList { + /** + * + * @type {Pagination} + * @memberof PaginatedDataExportList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDataExportList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDataExportList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDataExportList interface. + */ +export function instanceOfPaginatedDataExportList(value: object): value is PaginatedDataExportList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDataExportListFromJSON(json: any): PaginatedDataExportList { + return PaginatedDataExportListFromJSONTyped(json, false); +} + +export function PaginatedDataExportListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDataExportList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DataExportFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDataExportListToJSON(json: any): PaginatedDataExportList { + return PaginatedDataExportListToJSONTyped(json, false); +} + +export function PaginatedDataExportListToJSONTyped(value?: PaginatedDataExportList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DataExportToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDenyStageList.ts b/packages/client-ts/src/models/PaginatedDenyStageList.ts new file mode 100644 index 0000000000..ce27eda606 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDenyStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DenyStage } from './DenyStage'; +import { + DenyStageFromJSON, + DenyStageFromJSONTyped, + DenyStageToJSON, + DenyStageToJSONTyped, +} from './DenyStage'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedDenyStageList + */ +export interface PaginatedDenyStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedDenyStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDenyStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDenyStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDenyStageList interface. + */ +export function instanceOfPaginatedDenyStageList(value: object): value is PaginatedDenyStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDenyStageListFromJSON(json: any): PaginatedDenyStageList { + return PaginatedDenyStageListFromJSONTyped(json, false); +} + +export function PaginatedDenyStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDenyStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DenyStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDenyStageListToJSON(json: any): PaginatedDenyStageList { + return PaginatedDenyStageListToJSONTyped(json, false); +} + +export function PaginatedDenyStageListToJSONTyped(value?: PaginatedDenyStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DenyStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDeviceAccessGroupList.ts b/packages/client-ts/src/models/PaginatedDeviceAccessGroupList.ts new file mode 100644 index 0000000000..9d6c27b00f --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDeviceAccessGroupList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceAccessGroup } from './DeviceAccessGroup'; +import { + DeviceAccessGroupFromJSON, + DeviceAccessGroupFromJSONTyped, + DeviceAccessGroupToJSON, + DeviceAccessGroupToJSONTyped, +} from './DeviceAccessGroup'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedDeviceAccessGroupList + */ +export interface PaginatedDeviceAccessGroupList { + /** + * + * @type {Pagination} + * @memberof PaginatedDeviceAccessGroupList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDeviceAccessGroupList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDeviceAccessGroupList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDeviceAccessGroupList interface. + */ +export function instanceOfPaginatedDeviceAccessGroupList(value: object): value is PaginatedDeviceAccessGroupList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDeviceAccessGroupListFromJSON(json: any): PaginatedDeviceAccessGroupList { + return PaginatedDeviceAccessGroupListFromJSONTyped(json, false); +} + +export function PaginatedDeviceAccessGroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDeviceAccessGroupList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DeviceAccessGroupFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDeviceAccessGroupListToJSON(json: any): PaginatedDeviceAccessGroupList { + return PaginatedDeviceAccessGroupListToJSONTyped(json, false); +} + +export function PaginatedDeviceAccessGroupListToJSONTyped(value?: PaginatedDeviceAccessGroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DeviceAccessGroupToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDeviceUserBindingList.ts b/packages/client-ts/src/models/PaginatedDeviceUserBindingList.ts new file mode 100644 index 0000000000..3372ad2758 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDeviceUserBindingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { DeviceUserBinding } from './DeviceUserBinding'; +import { + DeviceUserBindingFromJSON, + DeviceUserBindingFromJSONTyped, + DeviceUserBindingToJSON, + DeviceUserBindingToJSONTyped, +} from './DeviceUserBinding'; + +/** + * + * @export + * @interface PaginatedDeviceUserBindingList + */ +export interface PaginatedDeviceUserBindingList { + /** + * + * @type {Pagination} + * @memberof PaginatedDeviceUserBindingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDeviceUserBindingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDeviceUserBindingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDeviceUserBindingList interface. + */ +export function instanceOfPaginatedDeviceUserBindingList(value: object): value is PaginatedDeviceUserBindingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDeviceUserBindingListFromJSON(json: any): PaginatedDeviceUserBindingList { + return PaginatedDeviceUserBindingListFromJSONTyped(json, false); +} + +export function PaginatedDeviceUserBindingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDeviceUserBindingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DeviceUserBindingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDeviceUserBindingListToJSON(json: any): PaginatedDeviceUserBindingList { + return PaginatedDeviceUserBindingListToJSONTyped(json, false); +} + +export function PaginatedDeviceUserBindingListToJSONTyped(value?: PaginatedDeviceUserBindingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DeviceUserBindingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDockerServiceConnectionList.ts b/packages/client-ts/src/models/PaginatedDockerServiceConnectionList.ts new file mode 100644 index 0000000000..c457c4952a --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDockerServiceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { DockerServiceConnection } from './DockerServiceConnection'; +import { + DockerServiceConnectionFromJSON, + DockerServiceConnectionFromJSONTyped, + DockerServiceConnectionToJSON, + DockerServiceConnectionToJSONTyped, +} from './DockerServiceConnection'; + +/** + * + * @export + * @interface PaginatedDockerServiceConnectionList + */ +export interface PaginatedDockerServiceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedDockerServiceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDockerServiceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDockerServiceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDockerServiceConnectionList interface. + */ +export function instanceOfPaginatedDockerServiceConnectionList(value: object): value is PaginatedDockerServiceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDockerServiceConnectionListFromJSON(json: any): PaginatedDockerServiceConnectionList { + return PaginatedDockerServiceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedDockerServiceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDockerServiceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DockerServiceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDockerServiceConnectionListToJSON(json: any): PaginatedDockerServiceConnectionList { + return PaginatedDockerServiceConnectionListToJSONTyped(json, false); +} + +export function PaginatedDockerServiceConnectionListToJSONTyped(value?: PaginatedDockerServiceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DockerServiceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDomainList.ts b/packages/client-ts/src/models/PaginatedDomainList.ts new file mode 100644 index 0000000000..a85d4b521f --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDomainList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Domain } from './Domain'; +import { + DomainFromJSON, + DomainFromJSONTyped, + DomainToJSON, + DomainToJSONTyped, +} from './Domain'; + +/** + * + * @export + * @interface PaginatedDomainList + */ +export interface PaginatedDomainList { + /** + * + * @type {Pagination} + * @memberof PaginatedDomainList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDomainList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDomainList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDomainList interface. + */ +export function instanceOfPaginatedDomainList(value: object): value is PaginatedDomainList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDomainListFromJSON(json: any): PaginatedDomainList { + return PaginatedDomainListFromJSONTyped(json, false); +} + +export function PaginatedDomainListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDomainList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DomainFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDomainListToJSON(json: any): PaginatedDomainList { + return PaginatedDomainListToJSONTyped(json, false); +} + +export function PaginatedDomainListToJSONTyped(value?: PaginatedDomainList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DomainToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDummyPolicyList.ts b/packages/client-ts/src/models/PaginatedDummyPolicyList.ts new file mode 100644 index 0000000000..9165d59963 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDummyPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { DummyPolicy } from './DummyPolicy'; +import { + DummyPolicyFromJSON, + DummyPolicyFromJSONTyped, + DummyPolicyToJSON, + DummyPolicyToJSONTyped, +} from './DummyPolicy'; + +/** + * + * @export + * @interface PaginatedDummyPolicyList + */ +export interface PaginatedDummyPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedDummyPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDummyPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDummyPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDummyPolicyList interface. + */ +export function instanceOfPaginatedDummyPolicyList(value: object): value is PaginatedDummyPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDummyPolicyListFromJSON(json: any): PaginatedDummyPolicyList { + return PaginatedDummyPolicyListFromJSONTyped(json, false); +} + +export function PaginatedDummyPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDummyPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DummyPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDummyPolicyListToJSON(json: any): PaginatedDummyPolicyList { + return PaginatedDummyPolicyListToJSONTyped(json, false); +} + +export function PaginatedDummyPolicyListToJSONTyped(value?: PaginatedDummyPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DummyPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDummyStageList.ts b/packages/client-ts/src/models/PaginatedDummyStageList.ts new file mode 100644 index 0000000000..75b6cbc77f --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDummyStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { DummyStage } from './DummyStage'; +import { + DummyStageFromJSON, + DummyStageFromJSONTyped, + DummyStageToJSON, + DummyStageToJSONTyped, +} from './DummyStage'; + +/** + * + * @export + * @interface PaginatedDummyStageList + */ +export interface PaginatedDummyStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedDummyStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDummyStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDummyStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDummyStageList interface. + */ +export function instanceOfPaginatedDummyStageList(value: object): value is PaginatedDummyStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDummyStageListFromJSON(json: any): PaginatedDummyStageList { + return PaginatedDummyStageListFromJSONTyped(json, false); +} + +export function PaginatedDummyStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDummyStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DummyStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDummyStageListToJSON(json: any): PaginatedDummyStageList { + return PaginatedDummyStageListToJSONTyped(json, false); +} + +export function PaginatedDummyStageListToJSONTyped(value?: PaginatedDummyStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DummyStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedDuoDeviceList.ts b/packages/client-ts/src/models/PaginatedDuoDeviceList.ts new file mode 100644 index 0000000000..0e0e5a8084 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedDuoDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { DuoDevice } from './DuoDevice'; +import { + DuoDeviceFromJSON, + DuoDeviceFromJSONTyped, + DuoDeviceToJSON, + DuoDeviceToJSONTyped, +} from './DuoDevice'; + +/** + * + * @export + * @interface PaginatedDuoDeviceList + */ +export interface PaginatedDuoDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedDuoDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedDuoDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedDuoDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedDuoDeviceList interface. + */ +export function instanceOfPaginatedDuoDeviceList(value: object): value is PaginatedDuoDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedDuoDeviceListFromJSON(json: any): PaginatedDuoDeviceList { + return PaginatedDuoDeviceListFromJSONTyped(json, false); +} + +export function PaginatedDuoDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedDuoDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(DuoDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedDuoDeviceListToJSON(json: any): PaginatedDuoDeviceList { + return PaginatedDuoDeviceListToJSONTyped(json, false); +} + +export function PaginatedDuoDeviceListToJSONTyped(value?: PaginatedDuoDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(DuoDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEmailDeviceList.ts b/packages/client-ts/src/models/PaginatedEmailDeviceList.ts new file mode 100644 index 0000000000..c0fd17936a --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEmailDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EmailDevice } from './EmailDevice'; +import { + EmailDeviceFromJSON, + EmailDeviceFromJSONTyped, + EmailDeviceToJSON, + EmailDeviceToJSONTyped, +} from './EmailDevice'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedEmailDeviceList + */ +export interface PaginatedEmailDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedEmailDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEmailDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEmailDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEmailDeviceList interface. + */ +export function instanceOfPaginatedEmailDeviceList(value: object): value is PaginatedEmailDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEmailDeviceListFromJSON(json: any): PaginatedEmailDeviceList { + return PaginatedEmailDeviceListFromJSONTyped(json, false); +} + +export function PaginatedEmailDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEmailDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EmailDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEmailDeviceListToJSON(json: any): PaginatedEmailDeviceList { + return PaginatedEmailDeviceListToJSONTyped(json, false); +} + +export function PaginatedEmailDeviceListToJSONTyped(value?: PaginatedEmailDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EmailDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEmailStageList.ts b/packages/client-ts/src/models/PaginatedEmailStageList.ts new file mode 100644 index 0000000000..0fa995b92f --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEmailStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EmailStage } from './EmailStage'; +import { + EmailStageFromJSON, + EmailStageFromJSONTyped, + EmailStageToJSON, + EmailStageToJSONTyped, +} from './EmailStage'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedEmailStageList + */ +export interface PaginatedEmailStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedEmailStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEmailStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEmailStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEmailStageList interface. + */ +export function instanceOfPaginatedEmailStageList(value: object): value is PaginatedEmailStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEmailStageListFromJSON(json: any): PaginatedEmailStageList { + return PaginatedEmailStageListFromJSONTyped(json, false); +} + +export function PaginatedEmailStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEmailStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EmailStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEmailStageListToJSON(json: any): PaginatedEmailStageList { + return PaginatedEmailStageListToJSONTyped(json, false); +} + +export function PaginatedEmailStageListToJSONTyped(value?: PaginatedEmailStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EmailStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEndpointDeviceList.ts b/packages/client-ts/src/models/PaginatedEndpointDeviceList.ts new file mode 100644 index 0000000000..a87195f868 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEndpointDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { EndpointDevice } from './EndpointDevice'; +import { + EndpointDeviceFromJSON, + EndpointDeviceFromJSONTyped, + EndpointDeviceToJSON, + EndpointDeviceToJSONTyped, +} from './EndpointDevice'; + +/** + * + * @export + * @interface PaginatedEndpointDeviceList + */ +export interface PaginatedEndpointDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedEndpointDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEndpointDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEndpointDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEndpointDeviceList interface. + */ +export function instanceOfPaginatedEndpointDeviceList(value: object): value is PaginatedEndpointDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEndpointDeviceListFromJSON(json: any): PaginatedEndpointDeviceList { + return PaginatedEndpointDeviceListFromJSONTyped(json, false); +} + +export function PaginatedEndpointDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEndpointDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EndpointDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEndpointDeviceListToJSON(json: any): PaginatedEndpointDeviceList { + return PaginatedEndpointDeviceListToJSONTyped(json, false); +} + +export function PaginatedEndpointDeviceListToJSONTyped(value?: PaginatedEndpointDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EndpointDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEndpointList.ts b/packages/client-ts/src/models/PaginatedEndpointList.ts new file mode 100644 index 0000000000..2e614f9e21 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEndpointList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Endpoint } from './Endpoint'; +import { + EndpointFromJSON, + EndpointFromJSONTyped, + EndpointToJSON, + EndpointToJSONTyped, +} from './Endpoint'; + +/** + * + * @export + * @interface PaginatedEndpointList + */ +export interface PaginatedEndpointList { + /** + * + * @type {Pagination} + * @memberof PaginatedEndpointList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEndpointList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEndpointList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEndpointList interface. + */ +export function instanceOfPaginatedEndpointList(value: object): value is PaginatedEndpointList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEndpointListFromJSON(json: any): PaginatedEndpointList { + return PaginatedEndpointListFromJSONTyped(json, false); +} + +export function PaginatedEndpointListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEndpointList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EndpointFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEndpointListToJSON(json: any): PaginatedEndpointList { + return PaginatedEndpointListToJSONTyped(json, false); +} + +export function PaginatedEndpointListToJSONTyped(value?: PaginatedEndpointList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EndpointToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEndpointStageList.ts b/packages/client-ts/src/models/PaginatedEndpointStageList.ts new file mode 100644 index 0000000000..95ca946bfc --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEndpointStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { EndpointStage } from './EndpointStage'; +import { + EndpointStageFromJSON, + EndpointStageFromJSONTyped, + EndpointStageToJSON, + EndpointStageToJSONTyped, +} from './EndpointStage'; + +/** + * + * @export + * @interface PaginatedEndpointStageList + */ +export interface PaginatedEndpointStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedEndpointStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEndpointStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEndpointStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEndpointStageList interface. + */ +export function instanceOfPaginatedEndpointStageList(value: object): value is PaginatedEndpointStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEndpointStageListFromJSON(json: any): PaginatedEndpointStageList { + return PaginatedEndpointStageListFromJSONTyped(json, false); +} + +export function PaginatedEndpointStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEndpointStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EndpointStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEndpointStageListToJSON(json: any): PaginatedEndpointStageList { + return PaginatedEndpointStageListToJSONTyped(json, false); +} + +export function PaginatedEndpointStageListToJSONTyped(value?: PaginatedEndpointStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EndpointStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEnrollmentTokenList.ts b/packages/client-ts/src/models/PaginatedEnrollmentTokenList.ts new file mode 100644 index 0000000000..9687158142 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEnrollmentTokenList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EnrollmentToken } from './EnrollmentToken'; +import { + EnrollmentTokenFromJSON, + EnrollmentTokenFromJSONTyped, + EnrollmentTokenToJSON, + EnrollmentTokenToJSONTyped, +} from './EnrollmentToken'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedEnrollmentTokenList + */ +export interface PaginatedEnrollmentTokenList { + /** + * + * @type {Pagination} + * @memberof PaginatedEnrollmentTokenList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEnrollmentTokenList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEnrollmentTokenList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEnrollmentTokenList interface. + */ +export function instanceOfPaginatedEnrollmentTokenList(value: object): value is PaginatedEnrollmentTokenList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEnrollmentTokenListFromJSON(json: any): PaginatedEnrollmentTokenList { + return PaginatedEnrollmentTokenListFromJSONTyped(json, false); +} + +export function PaginatedEnrollmentTokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnrollmentTokenList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EnrollmentTokenFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEnrollmentTokenListToJSON(json: any): PaginatedEnrollmentTokenList { + return PaginatedEnrollmentTokenListToJSONTyped(json, false); +} + +export function PaginatedEnrollmentTokenListToJSONTyped(value?: PaginatedEnrollmentTokenList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EnrollmentTokenToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEventList.ts b/packages/client-ts/src/models/PaginatedEventList.ts new file mode 100644 index 0000000000..6181bfd8bd --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEventList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Event } from './Event'; +import { + EventFromJSON, + EventFromJSONTyped, + EventToJSON, + EventToJSONTyped, +} from './Event'; + +/** + * + * @export + * @interface PaginatedEventList + */ +export interface PaginatedEventList { + /** + * + * @type {Pagination} + * @memberof PaginatedEventList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEventList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEventList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEventList interface. + */ +export function instanceOfPaginatedEventList(value: object): value is PaginatedEventList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEventListFromJSON(json: any): PaginatedEventList { + return PaginatedEventListFromJSONTyped(json, false); +} + +export function PaginatedEventListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEventList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EventFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEventListToJSON(json: any): PaginatedEventList { + return PaginatedEventListToJSONTyped(json, false); +} + +export function PaginatedEventListToJSONTyped(value?: PaginatedEventList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EventToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedEventMatcherPolicyList.ts b/packages/client-ts/src/models/PaginatedEventMatcherPolicyList.ts new file mode 100644 index 0000000000..03698a1dd0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedEventMatcherPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { EventMatcherPolicy } from './EventMatcherPolicy'; +import { + EventMatcherPolicyFromJSON, + EventMatcherPolicyFromJSONTyped, + EventMatcherPolicyToJSON, + EventMatcherPolicyToJSONTyped, +} from './EventMatcherPolicy'; + +/** + * + * @export + * @interface PaginatedEventMatcherPolicyList + */ +export interface PaginatedEventMatcherPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedEventMatcherPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedEventMatcherPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedEventMatcherPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedEventMatcherPolicyList interface. + */ +export function instanceOfPaginatedEventMatcherPolicyList(value: object): value is PaginatedEventMatcherPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedEventMatcherPolicyListFromJSON(json: any): PaginatedEventMatcherPolicyList { + return PaginatedEventMatcherPolicyListFromJSONTyped(json, false); +} + +export function PaginatedEventMatcherPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEventMatcherPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(EventMatcherPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedEventMatcherPolicyListToJSON(json: any): PaginatedEventMatcherPolicyList { + return PaginatedEventMatcherPolicyListToJSONTyped(json, false); +} + +export function PaginatedEventMatcherPolicyListToJSONTyped(value?: PaginatedEventMatcherPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(EventMatcherPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedExpiringBaseGrantModelList.ts b/packages/client-ts/src/models/PaginatedExpiringBaseGrantModelList.ts new file mode 100644 index 0000000000..f190a9d9c0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedExpiringBaseGrantModelList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ExpiringBaseGrantModel } from './ExpiringBaseGrantModel'; +import { + ExpiringBaseGrantModelFromJSON, + ExpiringBaseGrantModelFromJSONTyped, + ExpiringBaseGrantModelToJSON, + ExpiringBaseGrantModelToJSONTyped, +} from './ExpiringBaseGrantModel'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedExpiringBaseGrantModelList + */ +export interface PaginatedExpiringBaseGrantModelList { + /** + * + * @type {Pagination} + * @memberof PaginatedExpiringBaseGrantModelList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedExpiringBaseGrantModelList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedExpiringBaseGrantModelList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedExpiringBaseGrantModelList interface. + */ +export function instanceOfPaginatedExpiringBaseGrantModelList(value: object): value is PaginatedExpiringBaseGrantModelList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedExpiringBaseGrantModelListFromJSON(json: any): PaginatedExpiringBaseGrantModelList { + return PaginatedExpiringBaseGrantModelListFromJSONTyped(json, false); +} + +export function PaginatedExpiringBaseGrantModelListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedExpiringBaseGrantModelList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ExpiringBaseGrantModelFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedExpiringBaseGrantModelListToJSON(json: any): PaginatedExpiringBaseGrantModelList { + return PaginatedExpiringBaseGrantModelListToJSONTyped(json, false); +} + +export function PaginatedExpiringBaseGrantModelListToJSONTyped(value?: PaginatedExpiringBaseGrantModelList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ExpiringBaseGrantModelToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedExpressionPolicyList.ts b/packages/client-ts/src/models/PaginatedExpressionPolicyList.ts new file mode 100644 index 0000000000..bbfc1e7866 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedExpressionPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ExpressionPolicy } from './ExpressionPolicy'; +import { + ExpressionPolicyFromJSON, + ExpressionPolicyFromJSONTyped, + ExpressionPolicyToJSON, + ExpressionPolicyToJSONTyped, +} from './ExpressionPolicy'; + +/** + * + * @export + * @interface PaginatedExpressionPolicyList + */ +export interface PaginatedExpressionPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedExpressionPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedExpressionPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedExpressionPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedExpressionPolicyList interface. + */ +export function instanceOfPaginatedExpressionPolicyList(value: object): value is PaginatedExpressionPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedExpressionPolicyListFromJSON(json: any): PaginatedExpressionPolicyList { + return PaginatedExpressionPolicyListFromJSONTyped(json, false); +} + +export function PaginatedExpressionPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedExpressionPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ExpressionPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedExpressionPolicyListToJSON(json: any): PaginatedExpressionPolicyList { + return PaginatedExpressionPolicyListToJSONTyped(json, false); +} + +export function PaginatedExpressionPolicyListToJSONTyped(value?: PaginatedExpressionPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ExpressionPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedExtraRoleObjectPermissionList.ts b/packages/client-ts/src/models/PaginatedExtraRoleObjectPermissionList.ts new file mode 100644 index 0000000000..9e9ff07b18 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedExtraRoleObjectPermissionList.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ExtraRoleObjectPermission } from './ExtraRoleObjectPermission'; +import { + ExtraRoleObjectPermissionFromJSON, + ExtraRoleObjectPermissionFromJSONTyped, + ExtraRoleObjectPermissionToJSON, + ExtraRoleObjectPermissionToJSONTyped, +} from './ExtraRoleObjectPermission'; + +/** + * + * @export + * @interface PaginatedExtraRoleObjectPermissionList + */ +export interface PaginatedExtraRoleObjectPermissionList { + /** + * + * @type {Pagination} + * @memberof PaginatedExtraRoleObjectPermissionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedExtraRoleObjectPermissionList + */ + results: Array; +} + +/** + * Check if a given object implements the PaginatedExtraRoleObjectPermissionList interface. + */ +export function instanceOfPaginatedExtraRoleObjectPermissionList(value: object): value is PaginatedExtraRoleObjectPermissionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + return true; +} + +export function PaginatedExtraRoleObjectPermissionListFromJSON(json: any): PaginatedExtraRoleObjectPermissionList { + return PaginatedExtraRoleObjectPermissionListFromJSONTyped(json, false); +} + +export function PaginatedExtraRoleObjectPermissionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedExtraRoleObjectPermissionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ExtraRoleObjectPermissionFromJSON)), + }; +} + +export function PaginatedExtraRoleObjectPermissionListToJSON(json: any): PaginatedExtraRoleObjectPermissionList { + return PaginatedExtraRoleObjectPermissionListToJSONTyped(json, false); +} + +export function PaginatedExtraRoleObjectPermissionListToJSONTyped(value?: PaginatedExtraRoleObjectPermissionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ExtraRoleObjectPermissionToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/PaginatedFleetConnectorList.ts b/packages/client-ts/src/models/PaginatedFleetConnectorList.ts new file mode 100644 index 0000000000..fb3a9ad8c0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedFleetConnectorList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FleetConnector } from './FleetConnector'; +import { + FleetConnectorFromJSON, + FleetConnectorFromJSONTyped, + FleetConnectorToJSON, + FleetConnectorToJSONTyped, +} from './FleetConnector'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedFleetConnectorList + */ +export interface PaginatedFleetConnectorList { + /** + * + * @type {Pagination} + * @memberof PaginatedFleetConnectorList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedFleetConnectorList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedFleetConnectorList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedFleetConnectorList interface. + */ +export function instanceOfPaginatedFleetConnectorList(value: object): value is PaginatedFleetConnectorList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedFleetConnectorListFromJSON(json: any): PaginatedFleetConnectorList { + return PaginatedFleetConnectorListFromJSONTyped(json, false); +} + +export function PaginatedFleetConnectorListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedFleetConnectorList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(FleetConnectorFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedFleetConnectorListToJSON(json: any): PaginatedFleetConnectorList { + return PaginatedFleetConnectorListToJSONTyped(json, false); +} + +export function PaginatedFleetConnectorListToJSONTyped(value?: PaginatedFleetConnectorList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(FleetConnectorToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedFlowList.ts b/packages/client-ts/src/models/PaginatedFlowList.ts new file mode 100644 index 0000000000..06905e3f69 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedFlowList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Flow } from './Flow'; +import { + FlowFromJSON, + FlowFromJSONTyped, + FlowToJSON, + FlowToJSONTyped, +} from './Flow'; + +/** + * + * @export + * @interface PaginatedFlowList + */ +export interface PaginatedFlowList { + /** + * + * @type {Pagination} + * @memberof PaginatedFlowList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedFlowList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedFlowList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedFlowList interface. + */ +export function instanceOfPaginatedFlowList(value: object): value is PaginatedFlowList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedFlowListFromJSON(json: any): PaginatedFlowList { + return PaginatedFlowListFromJSONTyped(json, false); +} + +export function PaginatedFlowListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedFlowList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(FlowFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedFlowListToJSON(json: any): PaginatedFlowList { + return PaginatedFlowListToJSONTyped(json, false); +} + +export function PaginatedFlowListToJSONTyped(value?: PaginatedFlowList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(FlowToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedFlowStageBindingList.ts b/packages/client-ts/src/models/PaginatedFlowStageBindingList.ts new file mode 100644 index 0000000000..1fea0dd14c --- /dev/null +++ b/packages/client-ts/src/models/PaginatedFlowStageBindingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { FlowStageBinding } from './FlowStageBinding'; +import { + FlowStageBindingFromJSON, + FlowStageBindingFromJSONTyped, + FlowStageBindingToJSON, + FlowStageBindingToJSONTyped, +} from './FlowStageBinding'; + +/** + * + * @export + * @interface PaginatedFlowStageBindingList + */ +export interface PaginatedFlowStageBindingList { + /** + * + * @type {Pagination} + * @memberof PaginatedFlowStageBindingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedFlowStageBindingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedFlowStageBindingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedFlowStageBindingList interface. + */ +export function instanceOfPaginatedFlowStageBindingList(value: object): value is PaginatedFlowStageBindingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedFlowStageBindingListFromJSON(json: any): PaginatedFlowStageBindingList { + return PaginatedFlowStageBindingListFromJSONTyped(json, false); +} + +export function PaginatedFlowStageBindingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedFlowStageBindingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(FlowStageBindingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedFlowStageBindingListToJSON(json: any): PaginatedFlowStageBindingList { + return PaginatedFlowStageBindingListToJSONTyped(json, false); +} + +export function PaginatedFlowStageBindingListToJSONTyped(value?: PaginatedFlowStageBindingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(FlowStageBindingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGeoIPPolicyList.ts b/packages/client-ts/src/models/PaginatedGeoIPPolicyList.ts new file mode 100644 index 0000000000..51b3504ee5 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGeoIPPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GeoIPPolicy } from './GeoIPPolicy'; +import { + GeoIPPolicyFromJSON, + GeoIPPolicyFromJSONTyped, + GeoIPPolicyToJSON, + GeoIPPolicyToJSONTyped, +} from './GeoIPPolicy'; + +/** + * + * @export + * @interface PaginatedGeoIPPolicyList + */ +export interface PaginatedGeoIPPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedGeoIPPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGeoIPPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGeoIPPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGeoIPPolicyList interface. + */ +export function instanceOfPaginatedGeoIPPolicyList(value: object): value is PaginatedGeoIPPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGeoIPPolicyListFromJSON(json: any): PaginatedGeoIPPolicyList { + return PaginatedGeoIPPolicyListFromJSONTyped(json, false); +} + +export function PaginatedGeoIPPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGeoIPPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GeoIPPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGeoIPPolicyListToJSON(json: any): PaginatedGeoIPPolicyList { + return PaginatedGeoIPPolicyListToJSONTyped(json, false); +} + +export function PaginatedGeoIPPolicyListToJSONTyped(value?: PaginatedGeoIPPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GeoIPPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGoogleChromeConnectorList.ts b/packages/client-ts/src/models/PaginatedGoogleChromeConnectorList.ts new file mode 100644 index 0000000000..b8bdbd771c --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGoogleChromeConnectorList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GoogleChromeConnector } from './GoogleChromeConnector'; +import { + GoogleChromeConnectorFromJSON, + GoogleChromeConnectorFromJSONTyped, + GoogleChromeConnectorToJSON, + GoogleChromeConnectorToJSONTyped, +} from './GoogleChromeConnector'; + +/** + * + * @export + * @interface PaginatedGoogleChromeConnectorList + */ +export interface PaginatedGoogleChromeConnectorList { + /** + * + * @type {Pagination} + * @memberof PaginatedGoogleChromeConnectorList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGoogleChromeConnectorList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGoogleChromeConnectorList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGoogleChromeConnectorList interface. + */ +export function instanceOfPaginatedGoogleChromeConnectorList(value: object): value is PaginatedGoogleChromeConnectorList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGoogleChromeConnectorListFromJSON(json: any): PaginatedGoogleChromeConnectorList { + return PaginatedGoogleChromeConnectorListFromJSONTyped(json, false); +} + +export function PaginatedGoogleChromeConnectorListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGoogleChromeConnectorList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GoogleChromeConnectorFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGoogleChromeConnectorListToJSON(json: any): PaginatedGoogleChromeConnectorList { + return PaginatedGoogleChromeConnectorListToJSONTyped(json, false); +} + +export function PaginatedGoogleChromeConnectorListToJSONTyped(value?: PaginatedGoogleChromeConnectorList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GoogleChromeConnectorToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGoogleEndpointDeviceList.ts b/packages/client-ts/src/models/PaginatedGoogleEndpointDeviceList.ts new file mode 100644 index 0000000000..a32872d8f3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGoogleEndpointDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GoogleEndpointDevice } from './GoogleEndpointDevice'; +import { + GoogleEndpointDeviceFromJSON, + GoogleEndpointDeviceFromJSONTyped, + GoogleEndpointDeviceToJSON, + GoogleEndpointDeviceToJSONTyped, +} from './GoogleEndpointDevice'; + +/** + * + * @export + * @interface PaginatedGoogleEndpointDeviceList + */ +export interface PaginatedGoogleEndpointDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedGoogleEndpointDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGoogleEndpointDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGoogleEndpointDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGoogleEndpointDeviceList interface. + */ +export function instanceOfPaginatedGoogleEndpointDeviceList(value: object): value is PaginatedGoogleEndpointDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGoogleEndpointDeviceListFromJSON(json: any): PaginatedGoogleEndpointDeviceList { + return PaginatedGoogleEndpointDeviceListFromJSONTyped(json, false); +} + +export function PaginatedGoogleEndpointDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGoogleEndpointDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GoogleEndpointDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGoogleEndpointDeviceListToJSON(json: any): PaginatedGoogleEndpointDeviceList { + return PaginatedGoogleEndpointDeviceListToJSONTyped(json, false); +} + +export function PaginatedGoogleEndpointDeviceListToJSONTyped(value?: PaginatedGoogleEndpointDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GoogleEndpointDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderGroupList.ts b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderGroupList.ts new file mode 100644 index 0000000000..c55de9bcc9 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderGroupList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GoogleWorkspaceProviderGroup } from './GoogleWorkspaceProviderGroup'; +import { + GoogleWorkspaceProviderGroupFromJSON, + GoogleWorkspaceProviderGroupFromJSONTyped, + GoogleWorkspaceProviderGroupToJSON, + GoogleWorkspaceProviderGroupToJSONTyped, +} from './GoogleWorkspaceProviderGroup'; + +/** + * + * @export + * @interface PaginatedGoogleWorkspaceProviderGroupList + */ +export interface PaginatedGoogleWorkspaceProviderGroupList { + /** + * + * @type {Pagination} + * @memberof PaginatedGoogleWorkspaceProviderGroupList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGoogleWorkspaceProviderGroupList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGoogleWorkspaceProviderGroupList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGoogleWorkspaceProviderGroupList interface. + */ +export function instanceOfPaginatedGoogleWorkspaceProviderGroupList(value: object): value is PaginatedGoogleWorkspaceProviderGroupList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGoogleWorkspaceProviderGroupListFromJSON(json: any): PaginatedGoogleWorkspaceProviderGroupList { + return PaginatedGoogleWorkspaceProviderGroupListFromJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderGroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGoogleWorkspaceProviderGroupList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GoogleWorkspaceProviderGroupFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGoogleWorkspaceProviderGroupListToJSON(json: any): PaginatedGoogleWorkspaceProviderGroupList { + return PaginatedGoogleWorkspaceProviderGroupListToJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderGroupListToJSONTyped(value?: PaginatedGoogleWorkspaceProviderGroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GoogleWorkspaceProviderGroupToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderList.ts b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderList.ts new file mode 100644 index 0000000000..b0bae03760 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GoogleWorkspaceProvider } from './GoogleWorkspaceProvider'; +import { + GoogleWorkspaceProviderFromJSON, + GoogleWorkspaceProviderFromJSONTyped, + GoogleWorkspaceProviderToJSON, + GoogleWorkspaceProviderToJSONTyped, +} from './GoogleWorkspaceProvider'; + +/** + * + * @export + * @interface PaginatedGoogleWorkspaceProviderList + */ +export interface PaginatedGoogleWorkspaceProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedGoogleWorkspaceProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGoogleWorkspaceProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGoogleWorkspaceProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGoogleWorkspaceProviderList interface. + */ +export function instanceOfPaginatedGoogleWorkspaceProviderList(value: object): value is PaginatedGoogleWorkspaceProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGoogleWorkspaceProviderListFromJSON(json: any): PaginatedGoogleWorkspaceProviderList { + return PaginatedGoogleWorkspaceProviderListFromJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGoogleWorkspaceProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GoogleWorkspaceProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGoogleWorkspaceProviderListToJSON(json: any): PaginatedGoogleWorkspaceProviderList { + return PaginatedGoogleWorkspaceProviderListToJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderListToJSONTyped(value?: PaginatedGoogleWorkspaceProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GoogleWorkspaceProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderMappingList.ts b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderMappingList.ts new file mode 100644 index 0000000000..20ac81184c --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GoogleWorkspaceProviderMapping } from './GoogleWorkspaceProviderMapping'; +import { + GoogleWorkspaceProviderMappingFromJSON, + GoogleWorkspaceProviderMappingFromJSONTyped, + GoogleWorkspaceProviderMappingToJSON, + GoogleWorkspaceProviderMappingToJSONTyped, +} from './GoogleWorkspaceProviderMapping'; + +/** + * + * @export + * @interface PaginatedGoogleWorkspaceProviderMappingList + */ +export interface PaginatedGoogleWorkspaceProviderMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedGoogleWorkspaceProviderMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGoogleWorkspaceProviderMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGoogleWorkspaceProviderMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGoogleWorkspaceProviderMappingList interface. + */ +export function instanceOfPaginatedGoogleWorkspaceProviderMappingList(value: object): value is PaginatedGoogleWorkspaceProviderMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGoogleWorkspaceProviderMappingListFromJSON(json: any): PaginatedGoogleWorkspaceProviderMappingList { + return PaginatedGoogleWorkspaceProviderMappingListFromJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGoogleWorkspaceProviderMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GoogleWorkspaceProviderMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGoogleWorkspaceProviderMappingListToJSON(json: any): PaginatedGoogleWorkspaceProviderMappingList { + return PaginatedGoogleWorkspaceProviderMappingListToJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderMappingListToJSONTyped(value?: PaginatedGoogleWorkspaceProviderMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GoogleWorkspaceProviderMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderUserList.ts b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderUserList.ts new file mode 100644 index 0000000000..33ce299b16 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGoogleWorkspaceProviderUserList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GoogleWorkspaceProviderUser } from './GoogleWorkspaceProviderUser'; +import { + GoogleWorkspaceProviderUserFromJSON, + GoogleWorkspaceProviderUserFromJSONTyped, + GoogleWorkspaceProviderUserToJSON, + GoogleWorkspaceProviderUserToJSONTyped, +} from './GoogleWorkspaceProviderUser'; + +/** + * + * @export + * @interface PaginatedGoogleWorkspaceProviderUserList + */ +export interface PaginatedGoogleWorkspaceProviderUserList { + /** + * + * @type {Pagination} + * @memberof PaginatedGoogleWorkspaceProviderUserList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGoogleWorkspaceProviderUserList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGoogleWorkspaceProviderUserList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGoogleWorkspaceProviderUserList interface. + */ +export function instanceOfPaginatedGoogleWorkspaceProviderUserList(value: object): value is PaginatedGoogleWorkspaceProviderUserList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGoogleWorkspaceProviderUserListFromJSON(json: any): PaginatedGoogleWorkspaceProviderUserList { + return PaginatedGoogleWorkspaceProviderUserListFromJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGoogleWorkspaceProviderUserList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GoogleWorkspaceProviderUserFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGoogleWorkspaceProviderUserListToJSON(json: any): PaginatedGoogleWorkspaceProviderUserList { + return PaginatedGoogleWorkspaceProviderUserListToJSONTyped(json, false); +} + +export function PaginatedGoogleWorkspaceProviderUserListToJSONTyped(value?: PaginatedGoogleWorkspaceProviderUserList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GoogleWorkspaceProviderUserToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupKerberosSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupKerberosSourceConnectionList.ts new file mode 100644 index 0000000000..b9940dfff8 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupKerberosSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GroupKerberosSourceConnection } from './GroupKerberosSourceConnection'; +import { + GroupKerberosSourceConnectionFromJSON, + GroupKerberosSourceConnectionFromJSONTyped, + GroupKerberosSourceConnectionToJSON, + GroupKerberosSourceConnectionToJSONTyped, +} from './GroupKerberosSourceConnection'; + +/** + * + * @export + * @interface PaginatedGroupKerberosSourceConnectionList + */ +export interface PaginatedGroupKerberosSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupKerberosSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupKerberosSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupKerberosSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupKerberosSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupKerberosSourceConnectionList(value: object): value is PaginatedGroupKerberosSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupKerberosSourceConnectionListFromJSON(json: any): PaginatedGroupKerberosSourceConnectionList { + return PaginatedGroupKerberosSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupKerberosSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupKerberosSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupKerberosSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupKerberosSourceConnectionListToJSON(json: any): PaginatedGroupKerberosSourceConnectionList { + return PaginatedGroupKerberosSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupKerberosSourceConnectionListToJSONTyped(value?: PaginatedGroupKerberosSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupKerberosSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupLDAPSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupLDAPSourceConnectionList.ts new file mode 100644 index 0000000000..96b48f710e --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupLDAPSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GroupLDAPSourceConnection } from './GroupLDAPSourceConnection'; +import { + GroupLDAPSourceConnectionFromJSON, + GroupLDAPSourceConnectionFromJSONTyped, + GroupLDAPSourceConnectionToJSON, + GroupLDAPSourceConnectionToJSONTyped, +} from './GroupLDAPSourceConnection'; + +/** + * + * @export + * @interface PaginatedGroupLDAPSourceConnectionList + */ +export interface PaginatedGroupLDAPSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupLDAPSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupLDAPSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupLDAPSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupLDAPSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupLDAPSourceConnectionList(value: object): value is PaginatedGroupLDAPSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupLDAPSourceConnectionListFromJSON(json: any): PaginatedGroupLDAPSourceConnectionList { + return PaginatedGroupLDAPSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupLDAPSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupLDAPSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupLDAPSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupLDAPSourceConnectionListToJSON(json: any): PaginatedGroupLDAPSourceConnectionList { + return PaginatedGroupLDAPSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupLDAPSourceConnectionListToJSONTyped(value?: PaginatedGroupLDAPSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupLDAPSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupList.ts b/packages/client-ts/src/models/PaginatedGroupList.ts new file mode 100644 index 0000000000..d20f8c9489 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Group } from './Group'; +import { + GroupFromJSON, + GroupFromJSONTyped, + GroupToJSON, + GroupToJSONTyped, +} from './Group'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedGroupList + */ +export interface PaginatedGroupList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupList interface. + */ +export function instanceOfPaginatedGroupList(value: object): value is PaginatedGroupList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupListFromJSON(json: any): PaginatedGroupList { + return PaginatedGroupListFromJSONTyped(json, false); +} + +export function PaginatedGroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupListToJSON(json: any): PaginatedGroupList { + return PaginatedGroupListToJSONTyped(json, false); +} + +export function PaginatedGroupListToJSONTyped(value?: PaginatedGroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupOAuthSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupOAuthSourceConnectionList.ts new file mode 100644 index 0000000000..de4b5fb798 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupOAuthSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GroupOAuthSourceConnection } from './GroupOAuthSourceConnection'; +import { + GroupOAuthSourceConnectionFromJSON, + GroupOAuthSourceConnectionFromJSONTyped, + GroupOAuthSourceConnectionToJSON, + GroupOAuthSourceConnectionToJSONTyped, +} from './GroupOAuthSourceConnection'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedGroupOAuthSourceConnectionList + */ +export interface PaginatedGroupOAuthSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupOAuthSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupOAuthSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupOAuthSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupOAuthSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupOAuthSourceConnectionList(value: object): value is PaginatedGroupOAuthSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupOAuthSourceConnectionListFromJSON(json: any): PaginatedGroupOAuthSourceConnectionList { + return PaginatedGroupOAuthSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupOAuthSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupOAuthSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupOAuthSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupOAuthSourceConnectionListToJSON(json: any): PaginatedGroupOAuthSourceConnectionList { + return PaginatedGroupOAuthSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupOAuthSourceConnectionListToJSONTyped(value?: PaginatedGroupOAuthSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupOAuthSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupPlexSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupPlexSourceConnectionList.ts new file mode 100644 index 0000000000..297b77dc82 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupPlexSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GroupPlexSourceConnection } from './GroupPlexSourceConnection'; +import { + GroupPlexSourceConnectionFromJSON, + GroupPlexSourceConnectionFromJSONTyped, + GroupPlexSourceConnectionToJSON, + GroupPlexSourceConnectionToJSONTyped, +} from './GroupPlexSourceConnection'; + +/** + * + * @export + * @interface PaginatedGroupPlexSourceConnectionList + */ +export interface PaginatedGroupPlexSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupPlexSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupPlexSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupPlexSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupPlexSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupPlexSourceConnectionList(value: object): value is PaginatedGroupPlexSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupPlexSourceConnectionListFromJSON(json: any): PaginatedGroupPlexSourceConnectionList { + return PaginatedGroupPlexSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupPlexSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupPlexSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupPlexSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupPlexSourceConnectionListToJSON(json: any): PaginatedGroupPlexSourceConnectionList { + return PaginatedGroupPlexSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupPlexSourceConnectionListToJSONTyped(value?: PaginatedGroupPlexSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupPlexSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupSAMLSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupSAMLSourceConnectionList.ts new file mode 100644 index 0000000000..128f0a92d3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupSAMLSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GroupSAMLSourceConnection } from './GroupSAMLSourceConnection'; +import { + GroupSAMLSourceConnectionFromJSON, + GroupSAMLSourceConnectionFromJSONTyped, + GroupSAMLSourceConnectionToJSON, + GroupSAMLSourceConnectionToJSONTyped, +} from './GroupSAMLSourceConnection'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedGroupSAMLSourceConnectionList + */ +export interface PaginatedGroupSAMLSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupSAMLSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupSAMLSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupSAMLSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupSAMLSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupSAMLSourceConnectionList(value: object): value is PaginatedGroupSAMLSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupSAMLSourceConnectionListFromJSON(json: any): PaginatedGroupSAMLSourceConnectionList { + return PaginatedGroupSAMLSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupSAMLSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupSAMLSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupSAMLSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupSAMLSourceConnectionListToJSON(json: any): PaginatedGroupSAMLSourceConnectionList { + return PaginatedGroupSAMLSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupSAMLSourceConnectionListToJSONTyped(value?: PaginatedGroupSAMLSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupSAMLSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupSourceConnectionList.ts new file mode 100644 index 0000000000..d8b421ab20 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GroupSourceConnection } from './GroupSourceConnection'; +import { + GroupSourceConnectionFromJSON, + GroupSourceConnectionFromJSONTyped, + GroupSourceConnectionToJSON, + GroupSourceConnectionToJSONTyped, +} from './GroupSourceConnection'; + +/** + * + * @export + * @interface PaginatedGroupSourceConnectionList + */ +export interface PaginatedGroupSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupSourceConnectionList(value: object): value is PaginatedGroupSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupSourceConnectionListFromJSON(json: any): PaginatedGroupSourceConnectionList { + return PaginatedGroupSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupSourceConnectionListToJSON(json: any): PaginatedGroupSourceConnectionList { + return PaginatedGroupSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupSourceConnectionListToJSONTyped(value?: PaginatedGroupSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedGroupTelegramSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedGroupTelegramSourceConnectionList.ts new file mode 100644 index 0000000000..de233327aa --- /dev/null +++ b/packages/client-ts/src/models/PaginatedGroupTelegramSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { GroupTelegramSourceConnection } from './GroupTelegramSourceConnection'; +import { + GroupTelegramSourceConnectionFromJSON, + GroupTelegramSourceConnectionFromJSONTyped, + GroupTelegramSourceConnectionToJSON, + GroupTelegramSourceConnectionToJSONTyped, +} from './GroupTelegramSourceConnection'; + +/** + * + * @export + * @interface PaginatedGroupTelegramSourceConnectionList + */ +export interface PaginatedGroupTelegramSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedGroupTelegramSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedGroupTelegramSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedGroupTelegramSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedGroupTelegramSourceConnectionList interface. + */ +export function instanceOfPaginatedGroupTelegramSourceConnectionList(value: object): value is PaginatedGroupTelegramSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedGroupTelegramSourceConnectionListFromJSON(json: any): PaginatedGroupTelegramSourceConnectionList { + return PaginatedGroupTelegramSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedGroupTelegramSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGroupTelegramSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(GroupTelegramSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedGroupTelegramSourceConnectionListToJSON(json: any): PaginatedGroupTelegramSourceConnectionList { + return PaginatedGroupTelegramSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedGroupTelegramSourceConnectionListToJSONTyped(value?: PaginatedGroupTelegramSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(GroupTelegramSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedIdentificationStageList.ts b/packages/client-ts/src/models/PaginatedIdentificationStageList.ts new file mode 100644 index 0000000000..cb91f2e976 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedIdentificationStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { IdentificationStage } from './IdentificationStage'; +import { + IdentificationStageFromJSON, + IdentificationStageFromJSONTyped, + IdentificationStageToJSON, + IdentificationStageToJSONTyped, +} from './IdentificationStage'; + +/** + * + * @export + * @interface PaginatedIdentificationStageList + */ +export interface PaginatedIdentificationStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedIdentificationStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedIdentificationStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedIdentificationStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedIdentificationStageList interface. + */ +export function instanceOfPaginatedIdentificationStageList(value: object): value is PaginatedIdentificationStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedIdentificationStageListFromJSON(json: any): PaginatedIdentificationStageList { + return PaginatedIdentificationStageListFromJSONTyped(json, false); +} + +export function PaginatedIdentificationStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedIdentificationStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(IdentificationStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedIdentificationStageListToJSON(json: any): PaginatedIdentificationStageList { + return PaginatedIdentificationStageListToJSONTyped(json, false); +} + +export function PaginatedIdentificationStageListToJSONTyped(value?: PaginatedIdentificationStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(IdentificationStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedInitialPermissionsList.ts b/packages/client-ts/src/models/PaginatedInitialPermissionsList.ts new file mode 100644 index 0000000000..b6071d8ed9 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedInitialPermissionsList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { InitialPermissions } from './InitialPermissions'; +import { + InitialPermissionsFromJSON, + InitialPermissionsFromJSONTyped, + InitialPermissionsToJSON, + InitialPermissionsToJSONTyped, +} from './InitialPermissions'; + +/** + * + * @export + * @interface PaginatedInitialPermissionsList + */ +export interface PaginatedInitialPermissionsList { + /** + * + * @type {Pagination} + * @memberof PaginatedInitialPermissionsList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedInitialPermissionsList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedInitialPermissionsList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedInitialPermissionsList interface. + */ +export function instanceOfPaginatedInitialPermissionsList(value: object): value is PaginatedInitialPermissionsList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedInitialPermissionsListFromJSON(json: any): PaginatedInitialPermissionsList { + return PaginatedInitialPermissionsListFromJSONTyped(json, false); +} + +export function PaginatedInitialPermissionsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedInitialPermissionsList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(InitialPermissionsFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedInitialPermissionsListToJSON(json: any): PaginatedInitialPermissionsList { + return PaginatedInitialPermissionsListToJSONTyped(json, false); +} + +export function PaginatedInitialPermissionsListToJSONTyped(value?: PaginatedInitialPermissionsList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(InitialPermissionsToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedInvitationList.ts b/packages/client-ts/src/models/PaginatedInvitationList.ts new file mode 100644 index 0000000000..5e677a5737 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedInvitationList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Invitation } from './Invitation'; +import { + InvitationFromJSON, + InvitationFromJSONTyped, + InvitationToJSON, + InvitationToJSONTyped, +} from './Invitation'; + +/** + * + * @export + * @interface PaginatedInvitationList + */ +export interface PaginatedInvitationList { + /** + * + * @type {Pagination} + * @memberof PaginatedInvitationList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedInvitationList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedInvitationList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedInvitationList interface. + */ +export function instanceOfPaginatedInvitationList(value: object): value is PaginatedInvitationList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedInvitationListFromJSON(json: any): PaginatedInvitationList { + return PaginatedInvitationListFromJSONTyped(json, false); +} + +export function PaginatedInvitationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedInvitationList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(InvitationFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedInvitationListToJSON(json: any): PaginatedInvitationList { + return PaginatedInvitationListToJSONTyped(json, false); +} + +export function PaginatedInvitationListToJSONTyped(value?: PaginatedInvitationList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(InvitationToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedInvitationStageList.ts b/packages/client-ts/src/models/PaginatedInvitationStageList.ts new file mode 100644 index 0000000000..af03908a13 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedInvitationStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { InvitationStage } from './InvitationStage'; +import { + InvitationStageFromJSON, + InvitationStageFromJSONTyped, + InvitationStageToJSON, + InvitationStageToJSONTyped, +} from './InvitationStage'; + +/** + * + * @export + * @interface PaginatedInvitationStageList + */ +export interface PaginatedInvitationStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedInvitationStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedInvitationStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedInvitationStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedInvitationStageList interface. + */ +export function instanceOfPaginatedInvitationStageList(value: object): value is PaginatedInvitationStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedInvitationStageListFromJSON(json: any): PaginatedInvitationStageList { + return PaginatedInvitationStageListFromJSONTyped(json, false); +} + +export function PaginatedInvitationStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedInvitationStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(InvitationStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedInvitationStageListToJSON(json: any): PaginatedInvitationStageList { + return PaginatedInvitationStageListToJSONTyped(json, false); +} + +export function PaginatedInvitationStageListToJSONTyped(value?: PaginatedInvitationStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(InvitationStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedKerberosSourceList.ts b/packages/client-ts/src/models/PaginatedKerberosSourceList.ts new file mode 100644 index 0000000000..646af47b44 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedKerberosSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { KerberosSource } from './KerberosSource'; +import { + KerberosSourceFromJSON, + KerberosSourceFromJSONTyped, + KerberosSourceToJSON, + KerberosSourceToJSONTyped, +} from './KerberosSource'; + +/** + * + * @export + * @interface PaginatedKerberosSourceList + */ +export interface PaginatedKerberosSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedKerberosSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedKerberosSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedKerberosSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedKerberosSourceList interface. + */ +export function instanceOfPaginatedKerberosSourceList(value: object): value is PaginatedKerberosSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedKerberosSourceListFromJSON(json: any): PaginatedKerberosSourceList { + return PaginatedKerberosSourceListFromJSONTyped(json, false); +} + +export function PaginatedKerberosSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedKerberosSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(KerberosSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedKerberosSourceListToJSON(json: any): PaginatedKerberosSourceList { + return PaginatedKerberosSourceListToJSONTyped(json, false); +} + +export function PaginatedKerberosSourceListToJSONTyped(value?: PaginatedKerberosSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(KerberosSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedKerberosSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedKerberosSourcePropertyMappingList.ts new file mode 100644 index 0000000000..2ab23fa3d3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedKerberosSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { KerberosSourcePropertyMapping } from './KerberosSourcePropertyMapping'; +import { + KerberosSourcePropertyMappingFromJSON, + KerberosSourcePropertyMappingFromJSONTyped, + KerberosSourcePropertyMappingToJSON, + KerberosSourcePropertyMappingToJSONTyped, +} from './KerberosSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedKerberosSourcePropertyMappingList + */ +export interface PaginatedKerberosSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedKerberosSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedKerberosSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedKerberosSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedKerberosSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedKerberosSourcePropertyMappingList(value: object): value is PaginatedKerberosSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedKerberosSourcePropertyMappingListFromJSON(json: any): PaginatedKerberosSourcePropertyMappingList { + return PaginatedKerberosSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedKerberosSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedKerberosSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(KerberosSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedKerberosSourcePropertyMappingListToJSON(json: any): PaginatedKerberosSourcePropertyMappingList { + return PaginatedKerberosSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedKerberosSourcePropertyMappingListToJSONTyped(value?: PaginatedKerberosSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(KerberosSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedKubernetesServiceConnectionList.ts b/packages/client-ts/src/models/PaginatedKubernetesServiceConnectionList.ts new file mode 100644 index 0000000000..92f16b116d --- /dev/null +++ b/packages/client-ts/src/models/PaginatedKubernetesServiceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { KubernetesServiceConnection } from './KubernetesServiceConnection'; +import { + KubernetesServiceConnectionFromJSON, + KubernetesServiceConnectionFromJSONTyped, + KubernetesServiceConnectionToJSON, + KubernetesServiceConnectionToJSONTyped, +} from './KubernetesServiceConnection'; + +/** + * + * @export + * @interface PaginatedKubernetesServiceConnectionList + */ +export interface PaginatedKubernetesServiceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedKubernetesServiceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedKubernetesServiceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedKubernetesServiceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedKubernetesServiceConnectionList interface. + */ +export function instanceOfPaginatedKubernetesServiceConnectionList(value: object): value is PaginatedKubernetesServiceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedKubernetesServiceConnectionListFromJSON(json: any): PaginatedKubernetesServiceConnectionList { + return PaginatedKubernetesServiceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedKubernetesServiceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedKubernetesServiceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(KubernetesServiceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedKubernetesServiceConnectionListToJSON(json: any): PaginatedKubernetesServiceConnectionList { + return PaginatedKubernetesServiceConnectionListToJSONTyped(json, false); +} + +export function PaginatedKubernetesServiceConnectionListToJSONTyped(value?: PaginatedKubernetesServiceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(KubernetesServiceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLDAPOutpostConfigList.ts b/packages/client-ts/src/models/PaginatedLDAPOutpostConfigList.ts new file mode 100644 index 0000000000..280afd517b --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLDAPOutpostConfigList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { LDAPOutpostConfig } from './LDAPOutpostConfig'; +import { + LDAPOutpostConfigFromJSON, + LDAPOutpostConfigFromJSONTyped, + LDAPOutpostConfigToJSON, + LDAPOutpostConfigToJSONTyped, +} from './LDAPOutpostConfig'; + +/** + * + * @export + * @interface PaginatedLDAPOutpostConfigList + */ +export interface PaginatedLDAPOutpostConfigList { + /** + * + * @type {Pagination} + * @memberof PaginatedLDAPOutpostConfigList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLDAPOutpostConfigList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLDAPOutpostConfigList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLDAPOutpostConfigList interface. + */ +export function instanceOfPaginatedLDAPOutpostConfigList(value: object): value is PaginatedLDAPOutpostConfigList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLDAPOutpostConfigListFromJSON(json: any): PaginatedLDAPOutpostConfigList { + return PaginatedLDAPOutpostConfigListFromJSONTyped(json, false); +} + +export function PaginatedLDAPOutpostConfigListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLDAPOutpostConfigList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LDAPOutpostConfigFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLDAPOutpostConfigListToJSON(json: any): PaginatedLDAPOutpostConfigList { + return PaginatedLDAPOutpostConfigListToJSONTyped(json, false); +} + +export function PaginatedLDAPOutpostConfigListToJSONTyped(value?: PaginatedLDAPOutpostConfigList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LDAPOutpostConfigToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLDAPProviderList.ts b/packages/client-ts/src/models/PaginatedLDAPProviderList.ts new file mode 100644 index 0000000000..22dbddb2a4 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLDAPProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { LDAPProvider } from './LDAPProvider'; +import { + LDAPProviderFromJSON, + LDAPProviderFromJSONTyped, + LDAPProviderToJSON, + LDAPProviderToJSONTyped, +} from './LDAPProvider'; + +/** + * + * @export + * @interface PaginatedLDAPProviderList + */ +export interface PaginatedLDAPProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedLDAPProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLDAPProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLDAPProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLDAPProviderList interface. + */ +export function instanceOfPaginatedLDAPProviderList(value: object): value is PaginatedLDAPProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLDAPProviderListFromJSON(json: any): PaginatedLDAPProviderList { + return PaginatedLDAPProviderListFromJSONTyped(json, false); +} + +export function PaginatedLDAPProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLDAPProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LDAPProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLDAPProviderListToJSON(json: any): PaginatedLDAPProviderList { + return PaginatedLDAPProviderListToJSONTyped(json, false); +} + +export function PaginatedLDAPProviderListToJSONTyped(value?: PaginatedLDAPProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LDAPProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLDAPSourceList.ts b/packages/client-ts/src/models/PaginatedLDAPSourceList.ts new file mode 100644 index 0000000000..e55424d201 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLDAPSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { LDAPSource } from './LDAPSource'; +import { + LDAPSourceFromJSON, + LDAPSourceFromJSONTyped, + LDAPSourceToJSON, + LDAPSourceToJSONTyped, +} from './LDAPSource'; + +/** + * + * @export + * @interface PaginatedLDAPSourceList + */ +export interface PaginatedLDAPSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedLDAPSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLDAPSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLDAPSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLDAPSourceList interface. + */ +export function instanceOfPaginatedLDAPSourceList(value: object): value is PaginatedLDAPSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLDAPSourceListFromJSON(json: any): PaginatedLDAPSourceList { + return PaginatedLDAPSourceListFromJSONTyped(json, false); +} + +export function PaginatedLDAPSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLDAPSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LDAPSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLDAPSourceListToJSON(json: any): PaginatedLDAPSourceList { + return PaginatedLDAPSourceListToJSONTyped(json, false); +} + +export function PaginatedLDAPSourceListToJSONTyped(value?: PaginatedLDAPSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LDAPSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLDAPSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedLDAPSourcePropertyMappingList.ts new file mode 100644 index 0000000000..5903f738e1 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLDAPSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { LDAPSourcePropertyMapping } from './LDAPSourcePropertyMapping'; +import { + LDAPSourcePropertyMappingFromJSON, + LDAPSourcePropertyMappingFromJSONTyped, + LDAPSourcePropertyMappingToJSON, + LDAPSourcePropertyMappingToJSONTyped, +} from './LDAPSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedLDAPSourcePropertyMappingList + */ +export interface PaginatedLDAPSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedLDAPSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLDAPSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLDAPSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLDAPSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedLDAPSourcePropertyMappingList(value: object): value is PaginatedLDAPSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLDAPSourcePropertyMappingListFromJSON(json: any): PaginatedLDAPSourcePropertyMappingList { + return PaginatedLDAPSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedLDAPSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLDAPSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LDAPSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLDAPSourcePropertyMappingListToJSON(json: any): PaginatedLDAPSourcePropertyMappingList { + return PaginatedLDAPSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedLDAPSourcePropertyMappingListToJSONTyped(value?: PaginatedLDAPSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LDAPSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLicenseList.ts b/packages/client-ts/src/models/PaginatedLicenseList.ts new file mode 100644 index 0000000000..7c02bad204 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLicenseList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { License } from './License'; +import { + LicenseFromJSON, + LicenseFromJSONTyped, + LicenseToJSON, + LicenseToJSONTyped, +} from './License'; + +/** + * + * @export + * @interface PaginatedLicenseList + */ +export interface PaginatedLicenseList { + /** + * + * @type {Pagination} + * @memberof PaginatedLicenseList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLicenseList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLicenseList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLicenseList interface. + */ +export function instanceOfPaginatedLicenseList(value: object): value is PaginatedLicenseList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLicenseListFromJSON(json: any): PaginatedLicenseList { + return PaginatedLicenseListFromJSONTyped(json, false); +} + +export function PaginatedLicenseListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLicenseList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LicenseFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLicenseListToJSON(json: any): PaginatedLicenseList { + return PaginatedLicenseListToJSONTyped(json, false); +} + +export function PaginatedLicenseListToJSONTyped(value?: PaginatedLicenseList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LicenseToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLifecycleIterationList.ts b/packages/client-ts/src/models/PaginatedLifecycleIterationList.ts new file mode 100644 index 0000000000..bbbc3a2ba0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLifecycleIterationList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { LifecycleIteration } from './LifecycleIteration'; +import { + LifecycleIterationFromJSON, + LifecycleIterationFromJSONTyped, + LifecycleIterationToJSON, + LifecycleIterationToJSONTyped, +} from './LifecycleIteration'; + +/** + * + * @export + * @interface PaginatedLifecycleIterationList + */ +export interface PaginatedLifecycleIterationList { + /** + * + * @type {Pagination} + * @memberof PaginatedLifecycleIterationList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLifecycleIterationList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLifecycleIterationList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLifecycleIterationList interface. + */ +export function instanceOfPaginatedLifecycleIterationList(value: object): value is PaginatedLifecycleIterationList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLifecycleIterationListFromJSON(json: any): PaginatedLifecycleIterationList { + return PaginatedLifecycleIterationListFromJSONTyped(json, false); +} + +export function PaginatedLifecycleIterationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLifecycleIterationList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LifecycleIterationFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLifecycleIterationListToJSON(json: any): PaginatedLifecycleIterationList { + return PaginatedLifecycleIterationListToJSONTyped(json, false); +} + +export function PaginatedLifecycleIterationListToJSONTyped(value?: PaginatedLifecycleIterationList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LifecycleIterationToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedLifecycleRuleList.ts b/packages/client-ts/src/models/PaginatedLifecycleRuleList.ts new file mode 100644 index 0000000000..7e72d948f4 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedLifecycleRuleList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { LifecycleRule } from './LifecycleRule'; +import { + LifecycleRuleFromJSON, + LifecycleRuleFromJSONTyped, + LifecycleRuleToJSON, + LifecycleRuleToJSONTyped, +} from './LifecycleRule'; + +/** + * + * @export + * @interface PaginatedLifecycleRuleList + */ +export interface PaginatedLifecycleRuleList { + /** + * + * @type {Pagination} + * @memberof PaginatedLifecycleRuleList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedLifecycleRuleList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedLifecycleRuleList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedLifecycleRuleList interface. + */ +export function instanceOfPaginatedLifecycleRuleList(value: object): value is PaginatedLifecycleRuleList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedLifecycleRuleListFromJSON(json: any): PaginatedLifecycleRuleList { + return PaginatedLifecycleRuleListFromJSONTyped(json, false); +} + +export function PaginatedLifecycleRuleListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLifecycleRuleList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(LifecycleRuleFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedLifecycleRuleListToJSON(json: any): PaginatedLifecycleRuleList { + return PaginatedLifecycleRuleListToJSONTyped(json, false); +} + +export function PaginatedLifecycleRuleListToJSONTyped(value?: PaginatedLifecycleRuleList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(LifecycleRuleToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderGroupList.ts b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderGroupList.ts new file mode 100644 index 0000000000..dbf5780321 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderGroupList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { MicrosoftEntraProviderGroup } from './MicrosoftEntraProviderGroup'; +import { + MicrosoftEntraProviderGroupFromJSON, + MicrosoftEntraProviderGroupFromJSONTyped, + MicrosoftEntraProviderGroupToJSON, + MicrosoftEntraProviderGroupToJSONTyped, +} from './MicrosoftEntraProviderGroup'; + +/** + * + * @export + * @interface PaginatedMicrosoftEntraProviderGroupList + */ +export interface PaginatedMicrosoftEntraProviderGroupList { + /** + * + * @type {Pagination} + * @memberof PaginatedMicrosoftEntraProviderGroupList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedMicrosoftEntraProviderGroupList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedMicrosoftEntraProviderGroupList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedMicrosoftEntraProviderGroupList interface. + */ +export function instanceOfPaginatedMicrosoftEntraProviderGroupList(value: object): value is PaginatedMicrosoftEntraProviderGroupList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedMicrosoftEntraProviderGroupListFromJSON(json: any): PaginatedMicrosoftEntraProviderGroupList { + return PaginatedMicrosoftEntraProviderGroupListFromJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderGroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMicrosoftEntraProviderGroupList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(MicrosoftEntraProviderGroupFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedMicrosoftEntraProviderGroupListToJSON(json: any): PaginatedMicrosoftEntraProviderGroupList { + return PaginatedMicrosoftEntraProviderGroupListToJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderGroupListToJSONTyped(value?: PaginatedMicrosoftEntraProviderGroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(MicrosoftEntraProviderGroupToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderList.ts b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderList.ts new file mode 100644 index 0000000000..29ae18efbc --- /dev/null +++ b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { MicrosoftEntraProvider } from './MicrosoftEntraProvider'; +import { + MicrosoftEntraProviderFromJSON, + MicrosoftEntraProviderFromJSONTyped, + MicrosoftEntraProviderToJSON, + MicrosoftEntraProviderToJSONTyped, +} from './MicrosoftEntraProvider'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedMicrosoftEntraProviderList + */ +export interface PaginatedMicrosoftEntraProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedMicrosoftEntraProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedMicrosoftEntraProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedMicrosoftEntraProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedMicrosoftEntraProviderList interface. + */ +export function instanceOfPaginatedMicrosoftEntraProviderList(value: object): value is PaginatedMicrosoftEntraProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedMicrosoftEntraProviderListFromJSON(json: any): PaginatedMicrosoftEntraProviderList { + return PaginatedMicrosoftEntraProviderListFromJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMicrosoftEntraProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(MicrosoftEntraProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedMicrosoftEntraProviderListToJSON(json: any): PaginatedMicrosoftEntraProviderList { + return PaginatedMicrosoftEntraProviderListToJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderListToJSONTyped(value?: PaginatedMicrosoftEntraProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(MicrosoftEntraProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderMappingList.ts b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderMappingList.ts new file mode 100644 index 0000000000..f104c0c533 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { MicrosoftEntraProviderMapping } from './MicrosoftEntraProviderMapping'; +import { + MicrosoftEntraProviderMappingFromJSON, + MicrosoftEntraProviderMappingFromJSONTyped, + MicrosoftEntraProviderMappingToJSON, + MicrosoftEntraProviderMappingToJSONTyped, +} from './MicrosoftEntraProviderMapping'; + +/** + * + * @export + * @interface PaginatedMicrosoftEntraProviderMappingList + */ +export interface PaginatedMicrosoftEntraProviderMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedMicrosoftEntraProviderMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedMicrosoftEntraProviderMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedMicrosoftEntraProviderMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedMicrosoftEntraProviderMappingList interface. + */ +export function instanceOfPaginatedMicrosoftEntraProviderMappingList(value: object): value is PaginatedMicrosoftEntraProviderMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedMicrosoftEntraProviderMappingListFromJSON(json: any): PaginatedMicrosoftEntraProviderMappingList { + return PaginatedMicrosoftEntraProviderMappingListFromJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMicrosoftEntraProviderMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(MicrosoftEntraProviderMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedMicrosoftEntraProviderMappingListToJSON(json: any): PaginatedMicrosoftEntraProviderMappingList { + return PaginatedMicrosoftEntraProviderMappingListToJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderMappingListToJSONTyped(value?: PaginatedMicrosoftEntraProviderMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(MicrosoftEntraProviderMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderUserList.ts b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderUserList.ts new file mode 100644 index 0000000000..c007e21017 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedMicrosoftEntraProviderUserList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { MicrosoftEntraProviderUser } from './MicrosoftEntraProviderUser'; +import { + MicrosoftEntraProviderUserFromJSON, + MicrosoftEntraProviderUserFromJSONTyped, + MicrosoftEntraProviderUserToJSON, + MicrosoftEntraProviderUserToJSONTyped, +} from './MicrosoftEntraProviderUser'; + +/** + * + * @export + * @interface PaginatedMicrosoftEntraProviderUserList + */ +export interface PaginatedMicrosoftEntraProviderUserList { + /** + * + * @type {Pagination} + * @memberof PaginatedMicrosoftEntraProviderUserList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedMicrosoftEntraProviderUserList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedMicrosoftEntraProviderUserList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedMicrosoftEntraProviderUserList interface. + */ +export function instanceOfPaginatedMicrosoftEntraProviderUserList(value: object): value is PaginatedMicrosoftEntraProviderUserList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedMicrosoftEntraProviderUserListFromJSON(json: any): PaginatedMicrosoftEntraProviderUserList { + return PaginatedMicrosoftEntraProviderUserListFromJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMicrosoftEntraProviderUserList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(MicrosoftEntraProviderUserFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedMicrosoftEntraProviderUserListToJSON(json: any): PaginatedMicrosoftEntraProviderUserList { + return PaginatedMicrosoftEntraProviderUserListToJSONTyped(json, false); +} + +export function PaginatedMicrosoftEntraProviderUserListToJSONTyped(value?: PaginatedMicrosoftEntraProviderUserList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(MicrosoftEntraProviderUserToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedMutualTLSStageList.ts b/packages/client-ts/src/models/PaginatedMutualTLSStageList.ts new file mode 100644 index 0000000000..d8ccabce75 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedMutualTLSStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { MutualTLSStage } from './MutualTLSStage'; +import { + MutualTLSStageFromJSON, + MutualTLSStageFromJSONTyped, + MutualTLSStageToJSON, + MutualTLSStageToJSONTyped, +} from './MutualTLSStage'; + +/** + * + * @export + * @interface PaginatedMutualTLSStageList + */ +export interface PaginatedMutualTLSStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedMutualTLSStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedMutualTLSStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedMutualTLSStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedMutualTLSStageList interface. + */ +export function instanceOfPaginatedMutualTLSStageList(value: object): value is PaginatedMutualTLSStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedMutualTLSStageListFromJSON(json: any): PaginatedMutualTLSStageList { + return PaginatedMutualTLSStageListFromJSONTyped(json, false); +} + +export function PaginatedMutualTLSStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMutualTLSStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(MutualTLSStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedMutualTLSStageListToJSON(json: any): PaginatedMutualTLSStageList { + return PaginatedMutualTLSStageListToJSONTyped(json, false); +} + +export function PaginatedMutualTLSStageListToJSONTyped(value?: PaginatedMutualTLSStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(MutualTLSStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedNotificationList.ts b/packages/client-ts/src/models/PaginatedNotificationList.ts new file mode 100644 index 0000000000..bd97ea9656 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedNotificationList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Notification } from './Notification'; +import { + NotificationFromJSON, + NotificationFromJSONTyped, + NotificationToJSON, + NotificationToJSONTyped, +} from './Notification'; + +/** + * + * @export + * @interface PaginatedNotificationList + */ +export interface PaginatedNotificationList { + /** + * + * @type {Pagination} + * @memberof PaginatedNotificationList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedNotificationList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedNotificationList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedNotificationList interface. + */ +export function instanceOfPaginatedNotificationList(value: object): value is PaginatedNotificationList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedNotificationListFromJSON(json: any): PaginatedNotificationList { + return PaginatedNotificationListFromJSONTyped(json, false); +} + +export function PaginatedNotificationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedNotificationList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(NotificationFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedNotificationListToJSON(json: any): PaginatedNotificationList { + return PaginatedNotificationListToJSONTyped(json, false); +} + +export function PaginatedNotificationListToJSONTyped(value?: PaginatedNotificationList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(NotificationToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedNotificationRuleList.ts b/packages/client-ts/src/models/PaginatedNotificationRuleList.ts new file mode 100644 index 0000000000..b864b771fc --- /dev/null +++ b/packages/client-ts/src/models/PaginatedNotificationRuleList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { NotificationRule } from './NotificationRule'; +import { + NotificationRuleFromJSON, + NotificationRuleFromJSONTyped, + NotificationRuleToJSON, + NotificationRuleToJSONTyped, +} from './NotificationRule'; + +/** + * + * @export + * @interface PaginatedNotificationRuleList + */ +export interface PaginatedNotificationRuleList { + /** + * + * @type {Pagination} + * @memberof PaginatedNotificationRuleList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedNotificationRuleList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedNotificationRuleList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedNotificationRuleList interface. + */ +export function instanceOfPaginatedNotificationRuleList(value: object): value is PaginatedNotificationRuleList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedNotificationRuleListFromJSON(json: any): PaginatedNotificationRuleList { + return PaginatedNotificationRuleListFromJSONTyped(json, false); +} + +export function PaginatedNotificationRuleListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedNotificationRuleList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(NotificationRuleFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedNotificationRuleListToJSON(json: any): PaginatedNotificationRuleList { + return PaginatedNotificationRuleListToJSONTyped(json, false); +} + +export function PaginatedNotificationRuleListToJSONTyped(value?: PaginatedNotificationRuleList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(NotificationRuleToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedNotificationTransportList.ts b/packages/client-ts/src/models/PaginatedNotificationTransportList.ts new file mode 100644 index 0000000000..88a855aa9e --- /dev/null +++ b/packages/client-ts/src/models/PaginatedNotificationTransportList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { NotificationTransport } from './NotificationTransport'; +import { + NotificationTransportFromJSON, + NotificationTransportFromJSONTyped, + NotificationTransportToJSON, + NotificationTransportToJSONTyped, +} from './NotificationTransport'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedNotificationTransportList + */ +export interface PaginatedNotificationTransportList { + /** + * + * @type {Pagination} + * @memberof PaginatedNotificationTransportList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedNotificationTransportList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedNotificationTransportList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedNotificationTransportList interface. + */ +export function instanceOfPaginatedNotificationTransportList(value: object): value is PaginatedNotificationTransportList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedNotificationTransportListFromJSON(json: any): PaginatedNotificationTransportList { + return PaginatedNotificationTransportListFromJSONTyped(json, false); +} + +export function PaginatedNotificationTransportListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedNotificationTransportList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(NotificationTransportFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedNotificationTransportListToJSON(json: any): PaginatedNotificationTransportList { + return PaginatedNotificationTransportListToJSONTyped(json, false); +} + +export function PaginatedNotificationTransportListToJSONTyped(value?: PaginatedNotificationTransportList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(NotificationTransportToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedNotificationWebhookMappingList.ts b/packages/client-ts/src/models/PaginatedNotificationWebhookMappingList.ts new file mode 100644 index 0000000000..fa6be417d0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedNotificationWebhookMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { NotificationWebhookMapping } from './NotificationWebhookMapping'; +import { + NotificationWebhookMappingFromJSON, + NotificationWebhookMappingFromJSONTyped, + NotificationWebhookMappingToJSON, + NotificationWebhookMappingToJSONTyped, +} from './NotificationWebhookMapping'; + +/** + * + * @export + * @interface PaginatedNotificationWebhookMappingList + */ +export interface PaginatedNotificationWebhookMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedNotificationWebhookMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedNotificationWebhookMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedNotificationWebhookMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedNotificationWebhookMappingList interface. + */ +export function instanceOfPaginatedNotificationWebhookMappingList(value: object): value is PaginatedNotificationWebhookMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedNotificationWebhookMappingListFromJSON(json: any): PaginatedNotificationWebhookMappingList { + return PaginatedNotificationWebhookMappingListFromJSONTyped(json, false); +} + +export function PaginatedNotificationWebhookMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedNotificationWebhookMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(NotificationWebhookMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedNotificationWebhookMappingListToJSON(json: any): PaginatedNotificationWebhookMappingList { + return PaginatedNotificationWebhookMappingListToJSONTyped(json, false); +} + +export function PaginatedNotificationWebhookMappingListToJSONTyped(value?: PaginatedNotificationWebhookMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(NotificationWebhookMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedOAuth2ProviderList.ts b/packages/client-ts/src/models/PaginatedOAuth2ProviderList.ts new file mode 100644 index 0000000000..f352dd6cf5 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedOAuth2ProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { OAuth2Provider } from './OAuth2Provider'; +import { + OAuth2ProviderFromJSON, + OAuth2ProviderFromJSONTyped, + OAuth2ProviderToJSON, + OAuth2ProviderToJSONTyped, +} from './OAuth2Provider'; + +/** + * + * @export + * @interface PaginatedOAuth2ProviderList + */ +export interface PaginatedOAuth2ProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedOAuth2ProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedOAuth2ProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedOAuth2ProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedOAuth2ProviderList interface. + */ +export function instanceOfPaginatedOAuth2ProviderList(value: object): value is PaginatedOAuth2ProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedOAuth2ProviderListFromJSON(json: any): PaginatedOAuth2ProviderList { + return PaginatedOAuth2ProviderListFromJSONTyped(json, false); +} + +export function PaginatedOAuth2ProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOAuth2ProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(OAuth2ProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedOAuth2ProviderListToJSON(json: any): PaginatedOAuth2ProviderList { + return PaginatedOAuth2ProviderListToJSONTyped(json, false); +} + +export function PaginatedOAuth2ProviderListToJSONTyped(value?: PaginatedOAuth2ProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(OAuth2ProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedOAuthSourceList.ts b/packages/client-ts/src/models/PaginatedOAuthSourceList.ts new file mode 100644 index 0000000000..722892df80 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedOAuthSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { OAuthSource } from './OAuthSource'; +import { + OAuthSourceFromJSON, + OAuthSourceFromJSONTyped, + OAuthSourceToJSON, + OAuthSourceToJSONTyped, +} from './OAuthSource'; + +/** + * + * @export + * @interface PaginatedOAuthSourceList + */ +export interface PaginatedOAuthSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedOAuthSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedOAuthSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedOAuthSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedOAuthSourceList interface. + */ +export function instanceOfPaginatedOAuthSourceList(value: object): value is PaginatedOAuthSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedOAuthSourceListFromJSON(json: any): PaginatedOAuthSourceList { + return PaginatedOAuthSourceListFromJSONTyped(json, false); +} + +export function PaginatedOAuthSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOAuthSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(OAuthSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedOAuthSourceListToJSON(json: any): PaginatedOAuthSourceList { + return PaginatedOAuthSourceListToJSONTyped(json, false); +} + +export function PaginatedOAuthSourceListToJSONTyped(value?: PaginatedOAuthSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(OAuthSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedOAuthSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedOAuthSourcePropertyMappingList.ts new file mode 100644 index 0000000000..7f8c695f60 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedOAuthSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { OAuthSourcePropertyMapping } from './OAuthSourcePropertyMapping'; +import { + OAuthSourcePropertyMappingFromJSON, + OAuthSourcePropertyMappingFromJSONTyped, + OAuthSourcePropertyMappingToJSON, + OAuthSourcePropertyMappingToJSONTyped, +} from './OAuthSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedOAuthSourcePropertyMappingList + */ +export interface PaginatedOAuthSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedOAuthSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedOAuthSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedOAuthSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedOAuthSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedOAuthSourcePropertyMappingList(value: object): value is PaginatedOAuthSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedOAuthSourcePropertyMappingListFromJSON(json: any): PaginatedOAuthSourcePropertyMappingList { + return PaginatedOAuthSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedOAuthSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOAuthSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(OAuthSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedOAuthSourcePropertyMappingListToJSON(json: any): PaginatedOAuthSourcePropertyMappingList { + return PaginatedOAuthSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedOAuthSourcePropertyMappingListToJSONTyped(value?: PaginatedOAuthSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(OAuthSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedOutpostList.ts b/packages/client-ts/src/models/PaginatedOutpostList.ts new file mode 100644 index 0000000000..96826bdfb3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedOutpostList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Outpost } from './Outpost'; +import { + OutpostFromJSON, + OutpostFromJSONTyped, + OutpostToJSON, + OutpostToJSONTyped, +} from './Outpost'; + +/** + * + * @export + * @interface PaginatedOutpostList + */ +export interface PaginatedOutpostList { + /** + * + * @type {Pagination} + * @memberof PaginatedOutpostList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedOutpostList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedOutpostList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedOutpostList interface. + */ +export function instanceOfPaginatedOutpostList(value: object): value is PaginatedOutpostList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedOutpostListFromJSON(json: any): PaginatedOutpostList { + return PaginatedOutpostListFromJSONTyped(json, false); +} + +export function PaginatedOutpostListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOutpostList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(OutpostFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedOutpostListToJSON(json: any): PaginatedOutpostList { + return PaginatedOutpostListToJSONTyped(json, false); +} + +export function PaginatedOutpostListToJSONTyped(value?: PaginatedOutpostList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(OutpostToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPasswordExpiryPolicyList.ts b/packages/client-ts/src/models/PaginatedPasswordExpiryPolicyList.ts new file mode 100644 index 0000000000..cf6d55ca20 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPasswordExpiryPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PasswordExpiryPolicy } from './PasswordExpiryPolicy'; +import { + PasswordExpiryPolicyFromJSON, + PasswordExpiryPolicyFromJSONTyped, + PasswordExpiryPolicyToJSON, + PasswordExpiryPolicyToJSONTyped, +} from './PasswordExpiryPolicy'; + +/** + * + * @export + * @interface PaginatedPasswordExpiryPolicyList + */ +export interface PaginatedPasswordExpiryPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedPasswordExpiryPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPasswordExpiryPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPasswordExpiryPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPasswordExpiryPolicyList interface. + */ +export function instanceOfPaginatedPasswordExpiryPolicyList(value: object): value is PaginatedPasswordExpiryPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPasswordExpiryPolicyListFromJSON(json: any): PaginatedPasswordExpiryPolicyList { + return PaginatedPasswordExpiryPolicyListFromJSONTyped(json, false); +} + +export function PaginatedPasswordExpiryPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPasswordExpiryPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PasswordExpiryPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPasswordExpiryPolicyListToJSON(json: any): PaginatedPasswordExpiryPolicyList { + return PaginatedPasswordExpiryPolicyListToJSONTyped(json, false); +} + +export function PaginatedPasswordExpiryPolicyListToJSONTyped(value?: PaginatedPasswordExpiryPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PasswordExpiryPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPasswordPolicyList.ts b/packages/client-ts/src/models/PaginatedPasswordPolicyList.ts new file mode 100644 index 0000000000..e74629cdf3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPasswordPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PasswordPolicy } from './PasswordPolicy'; +import { + PasswordPolicyFromJSON, + PasswordPolicyFromJSONTyped, + PasswordPolicyToJSON, + PasswordPolicyToJSONTyped, +} from './PasswordPolicy'; + +/** + * + * @export + * @interface PaginatedPasswordPolicyList + */ +export interface PaginatedPasswordPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedPasswordPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPasswordPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPasswordPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPasswordPolicyList interface. + */ +export function instanceOfPaginatedPasswordPolicyList(value: object): value is PaginatedPasswordPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPasswordPolicyListFromJSON(json: any): PaginatedPasswordPolicyList { + return PaginatedPasswordPolicyListFromJSONTyped(json, false); +} + +export function PaginatedPasswordPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPasswordPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PasswordPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPasswordPolicyListToJSON(json: any): PaginatedPasswordPolicyList { + return PaginatedPasswordPolicyListToJSONTyped(json, false); +} + +export function PaginatedPasswordPolicyListToJSONTyped(value?: PaginatedPasswordPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PasswordPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPasswordStageList.ts b/packages/client-ts/src/models/PaginatedPasswordStageList.ts new file mode 100644 index 0000000000..f19beaea87 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPasswordStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PasswordStage } from './PasswordStage'; +import { + PasswordStageFromJSON, + PasswordStageFromJSONTyped, + PasswordStageToJSON, + PasswordStageToJSONTyped, +} from './PasswordStage'; + +/** + * + * @export + * @interface PaginatedPasswordStageList + */ +export interface PaginatedPasswordStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedPasswordStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPasswordStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPasswordStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPasswordStageList interface. + */ +export function instanceOfPaginatedPasswordStageList(value: object): value is PaginatedPasswordStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPasswordStageListFromJSON(json: any): PaginatedPasswordStageList { + return PaginatedPasswordStageListFromJSONTyped(json, false); +} + +export function PaginatedPasswordStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPasswordStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PasswordStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPasswordStageListToJSON(json: any): PaginatedPasswordStageList { + return PaginatedPasswordStageListToJSONTyped(json, false); +} + +export function PaginatedPasswordStageListToJSONTyped(value?: PaginatedPasswordStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PasswordStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPermissionList.ts b/packages/client-ts/src/models/PaginatedPermissionList.ts new file mode 100644 index 0000000000..03753e16a0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPermissionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Permission } from './Permission'; +import { + PermissionFromJSON, + PermissionFromJSONTyped, + PermissionToJSON, + PermissionToJSONTyped, +} from './Permission'; + +/** + * + * @export + * @interface PaginatedPermissionList + */ +export interface PaginatedPermissionList { + /** + * + * @type {Pagination} + * @memberof PaginatedPermissionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPermissionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPermissionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPermissionList interface. + */ +export function instanceOfPaginatedPermissionList(value: object): value is PaginatedPermissionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPermissionListFromJSON(json: any): PaginatedPermissionList { + return PaginatedPermissionListFromJSONTyped(json, false); +} + +export function PaginatedPermissionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPermissionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PermissionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPermissionListToJSON(json: any): PaginatedPermissionList { + return PaginatedPermissionListToJSONTyped(json, false); +} + +export function PaginatedPermissionListToJSONTyped(value?: PaginatedPermissionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PermissionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPlexSourceList.ts b/packages/client-ts/src/models/PaginatedPlexSourceList.ts new file mode 100644 index 0000000000..fe75722075 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPlexSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PlexSource } from './PlexSource'; +import { + PlexSourceFromJSON, + PlexSourceFromJSONTyped, + PlexSourceToJSON, + PlexSourceToJSONTyped, +} from './PlexSource'; + +/** + * + * @export + * @interface PaginatedPlexSourceList + */ +export interface PaginatedPlexSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedPlexSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPlexSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPlexSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPlexSourceList interface. + */ +export function instanceOfPaginatedPlexSourceList(value: object): value is PaginatedPlexSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPlexSourceListFromJSON(json: any): PaginatedPlexSourceList { + return PaginatedPlexSourceListFromJSONTyped(json, false); +} + +export function PaginatedPlexSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPlexSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PlexSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPlexSourceListToJSON(json: any): PaginatedPlexSourceList { + return PaginatedPlexSourceListToJSONTyped(json, false); +} + +export function PaginatedPlexSourceListToJSONTyped(value?: PaginatedPlexSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PlexSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPlexSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedPlexSourcePropertyMappingList.ts new file mode 100644 index 0000000000..d8b412d9a3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPlexSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PlexSourcePropertyMapping } from './PlexSourcePropertyMapping'; +import { + PlexSourcePropertyMappingFromJSON, + PlexSourcePropertyMappingFromJSONTyped, + PlexSourcePropertyMappingToJSON, + PlexSourcePropertyMappingToJSONTyped, +} from './PlexSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedPlexSourcePropertyMappingList + */ +export interface PaginatedPlexSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedPlexSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPlexSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPlexSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPlexSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedPlexSourcePropertyMappingList(value: object): value is PaginatedPlexSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPlexSourcePropertyMappingListFromJSON(json: any): PaginatedPlexSourcePropertyMappingList { + return PaginatedPlexSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedPlexSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPlexSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PlexSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPlexSourcePropertyMappingListToJSON(json: any): PaginatedPlexSourcePropertyMappingList { + return PaginatedPlexSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedPlexSourcePropertyMappingListToJSONTyped(value?: PaginatedPlexSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PlexSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPolicyBindingList.ts b/packages/client-ts/src/models/PaginatedPolicyBindingList.ts new file mode 100644 index 0000000000..9391b718f7 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPolicyBindingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PolicyBinding } from './PolicyBinding'; +import { + PolicyBindingFromJSON, + PolicyBindingFromJSONTyped, + PolicyBindingToJSON, + PolicyBindingToJSONTyped, +} from './PolicyBinding'; + +/** + * + * @export + * @interface PaginatedPolicyBindingList + */ +export interface PaginatedPolicyBindingList { + /** + * + * @type {Pagination} + * @memberof PaginatedPolicyBindingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPolicyBindingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPolicyBindingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPolicyBindingList interface. + */ +export function instanceOfPaginatedPolicyBindingList(value: object): value is PaginatedPolicyBindingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPolicyBindingListFromJSON(json: any): PaginatedPolicyBindingList { + return PaginatedPolicyBindingListFromJSONTyped(json, false); +} + +export function PaginatedPolicyBindingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPolicyBindingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PolicyBindingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPolicyBindingListToJSON(json: any): PaginatedPolicyBindingList { + return PaginatedPolicyBindingListToJSONTyped(json, false); +} + +export function PaginatedPolicyBindingListToJSONTyped(value?: PaginatedPolicyBindingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PolicyBindingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPolicyList.ts b/packages/client-ts/src/models/PaginatedPolicyList.ts new file mode 100644 index 0000000000..c1651fd2ef --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Policy } from './Policy'; +import { + PolicyFromJSON, + PolicyFromJSONTyped, + PolicyToJSON, + PolicyToJSONTyped, +} from './Policy'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedPolicyList + */ +export interface PaginatedPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPolicyList interface. + */ +export function instanceOfPaginatedPolicyList(value: object): value is PaginatedPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPolicyListFromJSON(json: any): PaginatedPolicyList { + return PaginatedPolicyListFromJSONTyped(json, false); +} + +export function PaginatedPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPolicyListToJSON(json: any): PaginatedPolicyList { + return PaginatedPolicyListToJSONTyped(json, false); +} + +export function PaginatedPolicyListToJSONTyped(value?: PaginatedPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPromptList.ts b/packages/client-ts/src/models/PaginatedPromptList.ts new file mode 100644 index 0000000000..764e8ade1b --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPromptList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Prompt } from './Prompt'; +import { + PromptFromJSON, + PromptFromJSONTyped, + PromptToJSON, + PromptToJSONTyped, +} from './Prompt'; + +/** + * + * @export + * @interface PaginatedPromptList + */ +export interface PaginatedPromptList { + /** + * + * @type {Pagination} + * @memberof PaginatedPromptList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPromptList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPromptList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPromptList interface. + */ +export function instanceOfPaginatedPromptList(value: object): value is PaginatedPromptList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPromptListFromJSON(json: any): PaginatedPromptList { + return PaginatedPromptListFromJSONTyped(json, false); +} + +export function PaginatedPromptListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPromptList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PromptFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPromptListToJSON(json: any): PaginatedPromptList { + return PaginatedPromptListToJSONTyped(json, false); +} + +export function PaginatedPromptListToJSONTyped(value?: PaginatedPromptList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PromptToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPromptStageList.ts b/packages/client-ts/src/models/PaginatedPromptStageList.ts new file mode 100644 index 0000000000..5a75f739b4 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPromptStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PromptStage } from './PromptStage'; +import { + PromptStageFromJSON, + PromptStageFromJSONTyped, + PromptStageToJSON, + PromptStageToJSONTyped, +} from './PromptStage'; + +/** + * + * @export + * @interface PaginatedPromptStageList + */ +export interface PaginatedPromptStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedPromptStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPromptStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPromptStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPromptStageList interface. + */ +export function instanceOfPaginatedPromptStageList(value: object): value is PaginatedPromptStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPromptStageListFromJSON(json: any): PaginatedPromptStageList { + return PaginatedPromptStageListFromJSONTyped(json, false); +} + +export function PaginatedPromptStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPromptStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PromptStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPromptStageListToJSON(json: any): PaginatedPromptStageList { + return PaginatedPromptStageListToJSONTyped(json, false); +} + +export function PaginatedPromptStageListToJSONTyped(value?: PaginatedPromptStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PromptStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedPropertyMappingList.ts b/packages/client-ts/src/models/PaginatedPropertyMappingList.ts new file mode 100644 index 0000000000..4c94921d71 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedPropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { PropertyMapping } from './PropertyMapping'; +import { + PropertyMappingFromJSON, + PropertyMappingFromJSONTyped, + PropertyMappingToJSON, + PropertyMappingToJSONTyped, +} from './PropertyMapping'; + +/** + * + * @export + * @interface PaginatedPropertyMappingList + */ +export interface PaginatedPropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedPropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedPropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedPropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedPropertyMappingList interface. + */ +export function instanceOfPaginatedPropertyMappingList(value: object): value is PaginatedPropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedPropertyMappingListFromJSON(json: any): PaginatedPropertyMappingList { + return PaginatedPropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedPropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(PropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedPropertyMappingListToJSON(json: any): PaginatedPropertyMappingList { + return PaginatedPropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedPropertyMappingListToJSONTyped(value?: PaginatedPropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(PropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedProviderList.ts b/packages/client-ts/src/models/PaginatedProviderList.ts new file mode 100644 index 0000000000..b9446b8024 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Provider } from './Provider'; +import { + ProviderFromJSON, + ProviderFromJSONTyped, + ProviderToJSON, + ProviderToJSONTyped, +} from './Provider'; + +/** + * + * @export + * @interface PaginatedProviderList + */ +export interface PaginatedProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedProviderList interface. + */ +export function instanceOfPaginatedProviderList(value: object): value is PaginatedProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedProviderListFromJSON(json: any): PaginatedProviderList { + return PaginatedProviderListFromJSONTyped(json, false); +} + +export function PaginatedProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedProviderListToJSON(json: any): PaginatedProviderList { + return PaginatedProviderListToJSONTyped(json, false); +} + +export function PaginatedProviderListToJSONTyped(value?: PaginatedProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedProxyOutpostConfigList.ts b/packages/client-ts/src/models/PaginatedProxyOutpostConfigList.ts new file mode 100644 index 0000000000..e3d232fad0 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedProxyOutpostConfigList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ProxyOutpostConfig } from './ProxyOutpostConfig'; +import { + ProxyOutpostConfigFromJSON, + ProxyOutpostConfigFromJSONTyped, + ProxyOutpostConfigToJSON, + ProxyOutpostConfigToJSONTyped, +} from './ProxyOutpostConfig'; + +/** + * + * @export + * @interface PaginatedProxyOutpostConfigList + */ +export interface PaginatedProxyOutpostConfigList { + /** + * + * @type {Pagination} + * @memberof PaginatedProxyOutpostConfigList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedProxyOutpostConfigList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedProxyOutpostConfigList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedProxyOutpostConfigList interface. + */ +export function instanceOfPaginatedProxyOutpostConfigList(value: object): value is PaginatedProxyOutpostConfigList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedProxyOutpostConfigListFromJSON(json: any): PaginatedProxyOutpostConfigList { + return PaginatedProxyOutpostConfigListFromJSONTyped(json, false); +} + +export function PaginatedProxyOutpostConfigListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedProxyOutpostConfigList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ProxyOutpostConfigFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedProxyOutpostConfigListToJSON(json: any): PaginatedProxyOutpostConfigList { + return PaginatedProxyOutpostConfigListToJSONTyped(json, false); +} + +export function PaginatedProxyOutpostConfigListToJSONTyped(value?: PaginatedProxyOutpostConfigList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ProxyOutpostConfigToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedProxyProviderList.ts b/packages/client-ts/src/models/PaginatedProxyProviderList.ts new file mode 100644 index 0000000000..62cbdb1681 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedProxyProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ProxyProvider } from './ProxyProvider'; +import { + ProxyProviderFromJSON, + ProxyProviderFromJSONTyped, + ProxyProviderToJSON, + ProxyProviderToJSONTyped, +} from './ProxyProvider'; + +/** + * + * @export + * @interface PaginatedProxyProviderList + */ +export interface PaginatedProxyProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedProxyProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedProxyProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedProxyProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedProxyProviderList interface. + */ +export function instanceOfPaginatedProxyProviderList(value: object): value is PaginatedProxyProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedProxyProviderListFromJSON(json: any): PaginatedProxyProviderList { + return PaginatedProxyProviderListFromJSONTyped(json, false); +} + +export function PaginatedProxyProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedProxyProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ProxyProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedProxyProviderListToJSON(json: any): PaginatedProxyProviderList { + return PaginatedProxyProviderListToJSONTyped(json, false); +} + +export function PaginatedProxyProviderListToJSONTyped(value?: PaginatedProxyProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ProxyProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRACPropertyMappingList.ts b/packages/client-ts/src/models/PaginatedRACPropertyMappingList.ts new file mode 100644 index 0000000000..84b4ad3f17 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRACPropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { RACPropertyMapping } from './RACPropertyMapping'; +import { + RACPropertyMappingFromJSON, + RACPropertyMappingFromJSONTyped, + RACPropertyMappingToJSON, + RACPropertyMappingToJSONTyped, +} from './RACPropertyMapping'; + +/** + * + * @export + * @interface PaginatedRACPropertyMappingList + */ +export interface PaginatedRACPropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedRACPropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRACPropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRACPropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRACPropertyMappingList interface. + */ +export function instanceOfPaginatedRACPropertyMappingList(value: object): value is PaginatedRACPropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRACPropertyMappingListFromJSON(json: any): PaginatedRACPropertyMappingList { + return PaginatedRACPropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedRACPropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRACPropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RACPropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRACPropertyMappingListToJSON(json: any): PaginatedRACPropertyMappingList { + return PaginatedRACPropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedRACPropertyMappingListToJSONTyped(value?: PaginatedRACPropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RACPropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRACProviderList.ts b/packages/client-ts/src/models/PaginatedRACProviderList.ts new file mode 100644 index 0000000000..804512f1b3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRACProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { RACProvider } from './RACProvider'; +import { + RACProviderFromJSON, + RACProviderFromJSONTyped, + RACProviderToJSON, + RACProviderToJSONTyped, +} from './RACProvider'; + +/** + * + * @export + * @interface PaginatedRACProviderList + */ +export interface PaginatedRACProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedRACProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRACProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRACProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRACProviderList interface. + */ +export function instanceOfPaginatedRACProviderList(value: object): value is PaginatedRACProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRACProviderListFromJSON(json: any): PaginatedRACProviderList { + return PaginatedRACProviderListFromJSONTyped(json, false); +} + +export function PaginatedRACProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRACProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RACProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRACProviderListToJSON(json: any): PaginatedRACProviderList { + return PaginatedRACProviderListToJSONTyped(json, false); +} + +export function PaginatedRACProviderListToJSONTyped(value?: PaginatedRACProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RACProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRadiusOutpostConfigList.ts b/packages/client-ts/src/models/PaginatedRadiusOutpostConfigList.ts new file mode 100644 index 0000000000..f74563ae26 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRadiusOutpostConfigList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RadiusOutpostConfig } from './RadiusOutpostConfig'; +import { + RadiusOutpostConfigFromJSON, + RadiusOutpostConfigFromJSONTyped, + RadiusOutpostConfigToJSON, + RadiusOutpostConfigToJSONTyped, +} from './RadiusOutpostConfig'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedRadiusOutpostConfigList + */ +export interface PaginatedRadiusOutpostConfigList { + /** + * + * @type {Pagination} + * @memberof PaginatedRadiusOutpostConfigList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRadiusOutpostConfigList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRadiusOutpostConfigList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRadiusOutpostConfigList interface. + */ +export function instanceOfPaginatedRadiusOutpostConfigList(value: object): value is PaginatedRadiusOutpostConfigList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRadiusOutpostConfigListFromJSON(json: any): PaginatedRadiusOutpostConfigList { + return PaginatedRadiusOutpostConfigListFromJSONTyped(json, false); +} + +export function PaginatedRadiusOutpostConfigListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRadiusOutpostConfigList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RadiusOutpostConfigFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRadiusOutpostConfigListToJSON(json: any): PaginatedRadiusOutpostConfigList { + return PaginatedRadiusOutpostConfigListToJSONTyped(json, false); +} + +export function PaginatedRadiusOutpostConfigListToJSONTyped(value?: PaginatedRadiusOutpostConfigList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RadiusOutpostConfigToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRadiusProviderList.ts b/packages/client-ts/src/models/PaginatedRadiusProviderList.ts new file mode 100644 index 0000000000..78f253bcc8 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRadiusProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { RadiusProvider } from './RadiusProvider'; +import { + RadiusProviderFromJSON, + RadiusProviderFromJSONTyped, + RadiusProviderToJSON, + RadiusProviderToJSONTyped, +} from './RadiusProvider'; + +/** + * + * @export + * @interface PaginatedRadiusProviderList + */ +export interface PaginatedRadiusProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedRadiusProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRadiusProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRadiusProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRadiusProviderList interface. + */ +export function instanceOfPaginatedRadiusProviderList(value: object): value is PaginatedRadiusProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRadiusProviderListFromJSON(json: any): PaginatedRadiusProviderList { + return PaginatedRadiusProviderListFromJSONTyped(json, false); +} + +export function PaginatedRadiusProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRadiusProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RadiusProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRadiusProviderListToJSON(json: any): PaginatedRadiusProviderList { + return PaginatedRadiusProviderListToJSONTyped(json, false); +} + +export function PaginatedRadiusProviderListToJSONTyped(value?: PaginatedRadiusProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RadiusProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRadiusProviderPropertyMappingList.ts b/packages/client-ts/src/models/PaginatedRadiusProviderPropertyMappingList.ts new file mode 100644 index 0000000000..332a8aae5a --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRadiusProviderPropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { RadiusProviderPropertyMapping } from './RadiusProviderPropertyMapping'; +import { + RadiusProviderPropertyMappingFromJSON, + RadiusProviderPropertyMappingFromJSONTyped, + RadiusProviderPropertyMappingToJSON, + RadiusProviderPropertyMappingToJSONTyped, +} from './RadiusProviderPropertyMapping'; + +/** + * + * @export + * @interface PaginatedRadiusProviderPropertyMappingList + */ +export interface PaginatedRadiusProviderPropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedRadiusProviderPropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRadiusProviderPropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRadiusProviderPropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRadiusProviderPropertyMappingList interface. + */ +export function instanceOfPaginatedRadiusProviderPropertyMappingList(value: object): value is PaginatedRadiusProviderPropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRadiusProviderPropertyMappingListFromJSON(json: any): PaginatedRadiusProviderPropertyMappingList { + return PaginatedRadiusProviderPropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedRadiusProviderPropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRadiusProviderPropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RadiusProviderPropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRadiusProviderPropertyMappingListToJSON(json: any): PaginatedRadiusProviderPropertyMappingList { + return PaginatedRadiusProviderPropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedRadiusProviderPropertyMappingListToJSONTyped(value?: PaginatedRadiusProviderPropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RadiusProviderPropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRedirectStageList.ts b/packages/client-ts/src/models/PaginatedRedirectStageList.ts new file mode 100644 index 0000000000..ecb481a071 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRedirectStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { RedirectStage } from './RedirectStage'; +import { + RedirectStageFromJSON, + RedirectStageFromJSONTyped, + RedirectStageToJSON, + RedirectStageToJSONTyped, +} from './RedirectStage'; + +/** + * + * @export + * @interface PaginatedRedirectStageList + */ +export interface PaginatedRedirectStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedRedirectStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRedirectStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRedirectStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRedirectStageList interface. + */ +export function instanceOfPaginatedRedirectStageList(value: object): value is PaginatedRedirectStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRedirectStageListFromJSON(json: any): PaginatedRedirectStageList { + return PaginatedRedirectStageListFromJSONTyped(json, false); +} + +export function PaginatedRedirectStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRedirectStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RedirectStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRedirectStageListToJSON(json: any): PaginatedRedirectStageList { + return PaginatedRedirectStageListToJSONTyped(json, false); +} + +export function PaginatedRedirectStageListToJSONTyped(value?: PaginatedRedirectStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RedirectStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedReputationList.ts b/packages/client-ts/src/models/PaginatedReputationList.ts new file mode 100644 index 0000000000..48550e11da --- /dev/null +++ b/packages/client-ts/src/models/PaginatedReputationList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Reputation } from './Reputation'; +import { + ReputationFromJSON, + ReputationFromJSONTyped, + ReputationToJSON, + ReputationToJSONTyped, +} from './Reputation'; + +/** + * + * @export + * @interface PaginatedReputationList + */ +export interface PaginatedReputationList { + /** + * + * @type {Pagination} + * @memberof PaginatedReputationList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedReputationList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedReputationList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedReputationList interface. + */ +export function instanceOfPaginatedReputationList(value: object): value is PaginatedReputationList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedReputationListFromJSON(json: any): PaginatedReputationList { + return PaginatedReputationListFromJSONTyped(json, false); +} + +export function PaginatedReputationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedReputationList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ReputationFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedReputationListToJSON(json: any): PaginatedReputationList { + return PaginatedReputationListToJSONTyped(json, false); +} + +export function PaginatedReputationListToJSONTyped(value?: PaginatedReputationList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ReputationToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedReputationPolicyList.ts b/packages/client-ts/src/models/PaginatedReputationPolicyList.ts new file mode 100644 index 0000000000..daa972f422 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedReputationPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ReputationPolicy } from './ReputationPolicy'; +import { + ReputationPolicyFromJSON, + ReputationPolicyFromJSONTyped, + ReputationPolicyToJSON, + ReputationPolicyToJSONTyped, +} from './ReputationPolicy'; + +/** + * + * @export + * @interface PaginatedReputationPolicyList + */ +export interface PaginatedReputationPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedReputationPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedReputationPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedReputationPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedReputationPolicyList interface. + */ +export function instanceOfPaginatedReputationPolicyList(value: object): value is PaginatedReputationPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedReputationPolicyListFromJSON(json: any): PaginatedReputationPolicyList { + return PaginatedReputationPolicyListFromJSONTyped(json, false); +} + +export function PaginatedReputationPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedReputationPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ReputationPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedReputationPolicyListToJSON(json: any): PaginatedReputationPolicyList { + return PaginatedReputationPolicyListToJSONTyped(json, false); +} + +export function PaginatedReputationPolicyListToJSONTyped(value?: PaginatedReputationPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ReputationPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRoleAssignedObjectPermissionList.ts b/packages/client-ts/src/models/PaginatedRoleAssignedObjectPermissionList.ts new file mode 100644 index 0000000000..bc9593ebaf --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRoleAssignedObjectPermissionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { RoleAssignedObjectPermission } from './RoleAssignedObjectPermission'; +import { + RoleAssignedObjectPermissionFromJSON, + RoleAssignedObjectPermissionFromJSONTyped, + RoleAssignedObjectPermissionToJSON, + RoleAssignedObjectPermissionToJSONTyped, +} from './RoleAssignedObjectPermission'; + +/** + * + * @export + * @interface PaginatedRoleAssignedObjectPermissionList + */ +export interface PaginatedRoleAssignedObjectPermissionList { + /** + * + * @type {Pagination} + * @memberof PaginatedRoleAssignedObjectPermissionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRoleAssignedObjectPermissionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRoleAssignedObjectPermissionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRoleAssignedObjectPermissionList interface. + */ +export function instanceOfPaginatedRoleAssignedObjectPermissionList(value: object): value is PaginatedRoleAssignedObjectPermissionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRoleAssignedObjectPermissionListFromJSON(json: any): PaginatedRoleAssignedObjectPermissionList { + return PaginatedRoleAssignedObjectPermissionListFromJSONTyped(json, false); +} + +export function PaginatedRoleAssignedObjectPermissionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRoleAssignedObjectPermissionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RoleAssignedObjectPermissionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRoleAssignedObjectPermissionListToJSON(json: any): PaginatedRoleAssignedObjectPermissionList { + return PaginatedRoleAssignedObjectPermissionListToJSONTyped(json, false); +} + +export function PaginatedRoleAssignedObjectPermissionListToJSONTyped(value?: PaginatedRoleAssignedObjectPermissionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RoleAssignedObjectPermissionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedRoleList.ts b/packages/client-ts/src/models/PaginatedRoleList.ts new file mode 100644 index 0000000000..f3011f9b54 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedRoleList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Role } from './Role'; +import { + RoleFromJSON, + RoleFromJSONTyped, + RoleToJSON, + RoleToJSONTyped, +} from './Role'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedRoleList + */ +export interface PaginatedRoleList { + /** + * + * @type {Pagination} + * @memberof PaginatedRoleList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedRoleList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedRoleList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedRoleList interface. + */ +export function instanceOfPaginatedRoleList(value: object): value is PaginatedRoleList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedRoleListFromJSON(json: any): PaginatedRoleList { + return PaginatedRoleListFromJSONTyped(json, false); +} + +export function PaginatedRoleListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRoleList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(RoleFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedRoleListToJSON(json: any): PaginatedRoleList { + return PaginatedRoleListToJSONTyped(json, false); +} + +export function PaginatedRoleListToJSONTyped(value?: PaginatedRoleList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(RoleToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSAMLPropertyMappingList.ts b/packages/client-ts/src/models/PaginatedSAMLPropertyMappingList.ts new file mode 100644 index 0000000000..c3c08390e4 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSAMLPropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SAMLPropertyMapping } from './SAMLPropertyMapping'; +import { + SAMLPropertyMappingFromJSON, + SAMLPropertyMappingFromJSONTyped, + SAMLPropertyMappingToJSON, + SAMLPropertyMappingToJSONTyped, +} from './SAMLPropertyMapping'; + +/** + * + * @export + * @interface PaginatedSAMLPropertyMappingList + */ +export interface PaginatedSAMLPropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedSAMLPropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSAMLPropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSAMLPropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSAMLPropertyMappingList interface. + */ +export function instanceOfPaginatedSAMLPropertyMappingList(value: object): value is PaginatedSAMLPropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSAMLPropertyMappingListFromJSON(json: any): PaginatedSAMLPropertyMappingList { + return PaginatedSAMLPropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedSAMLPropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSAMLPropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SAMLPropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSAMLPropertyMappingListToJSON(json: any): PaginatedSAMLPropertyMappingList { + return PaginatedSAMLPropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedSAMLPropertyMappingListToJSONTyped(value?: PaginatedSAMLPropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SAMLPropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSAMLProviderList.ts b/packages/client-ts/src/models/PaginatedSAMLProviderList.ts new file mode 100644 index 0000000000..e949a0c5e5 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSAMLProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SAMLProvider } from './SAMLProvider'; +import { + SAMLProviderFromJSON, + SAMLProviderFromJSONTyped, + SAMLProviderToJSON, + SAMLProviderToJSONTyped, +} from './SAMLProvider'; + +/** + * + * @export + * @interface PaginatedSAMLProviderList + */ +export interface PaginatedSAMLProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedSAMLProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSAMLProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSAMLProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSAMLProviderList interface. + */ +export function instanceOfPaginatedSAMLProviderList(value: object): value is PaginatedSAMLProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSAMLProviderListFromJSON(json: any): PaginatedSAMLProviderList { + return PaginatedSAMLProviderListFromJSONTyped(json, false); +} + +export function PaginatedSAMLProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSAMLProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SAMLProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSAMLProviderListToJSON(json: any): PaginatedSAMLProviderList { + return PaginatedSAMLProviderListToJSONTyped(json, false); +} + +export function PaginatedSAMLProviderListToJSONTyped(value?: PaginatedSAMLProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SAMLProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSAMLSourceList.ts b/packages/client-ts/src/models/PaginatedSAMLSourceList.ts new file mode 100644 index 0000000000..67e421ebfe --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSAMLSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SAMLSource } from './SAMLSource'; +import { + SAMLSourceFromJSON, + SAMLSourceFromJSONTyped, + SAMLSourceToJSON, + SAMLSourceToJSONTyped, +} from './SAMLSource'; + +/** + * + * @export + * @interface PaginatedSAMLSourceList + */ +export interface PaginatedSAMLSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedSAMLSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSAMLSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSAMLSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSAMLSourceList interface. + */ +export function instanceOfPaginatedSAMLSourceList(value: object): value is PaginatedSAMLSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSAMLSourceListFromJSON(json: any): PaginatedSAMLSourceList { + return PaginatedSAMLSourceListFromJSONTyped(json, false); +} + +export function PaginatedSAMLSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSAMLSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SAMLSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSAMLSourceListToJSON(json: any): PaginatedSAMLSourceList { + return PaginatedSAMLSourceListToJSONTyped(json, false); +} + +export function PaginatedSAMLSourceListToJSONTyped(value?: PaginatedSAMLSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SAMLSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSAMLSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedSAMLSourcePropertyMappingList.ts new file mode 100644 index 0000000000..8c1eb281a4 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSAMLSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SAMLSourcePropertyMapping } from './SAMLSourcePropertyMapping'; +import { + SAMLSourcePropertyMappingFromJSON, + SAMLSourcePropertyMappingFromJSONTyped, + SAMLSourcePropertyMappingToJSON, + SAMLSourcePropertyMappingToJSONTyped, +} from './SAMLSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedSAMLSourcePropertyMappingList + */ +export interface PaginatedSAMLSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedSAMLSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSAMLSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSAMLSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSAMLSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedSAMLSourcePropertyMappingList(value: object): value is PaginatedSAMLSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSAMLSourcePropertyMappingListFromJSON(json: any): PaginatedSAMLSourcePropertyMappingList { + return PaginatedSAMLSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedSAMLSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSAMLSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SAMLSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSAMLSourcePropertyMappingListToJSON(json: any): PaginatedSAMLSourcePropertyMappingList { + return PaginatedSAMLSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedSAMLSourcePropertyMappingListToJSONTyped(value?: PaginatedSAMLSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SAMLSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMMappingList.ts b/packages/client-ts/src/models/PaginatedSCIMMappingList.ts new file mode 100644 index 0000000000..e89f61d46e --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMMapping } from './SCIMMapping'; +import { + SCIMMappingFromJSON, + SCIMMappingFromJSONTyped, + SCIMMappingToJSON, + SCIMMappingToJSONTyped, +} from './SCIMMapping'; + +/** + * + * @export + * @interface PaginatedSCIMMappingList + */ +export interface PaginatedSCIMMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMMappingList interface. + */ +export function instanceOfPaginatedSCIMMappingList(value: object): value is PaginatedSCIMMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMMappingListFromJSON(json: any): PaginatedSCIMMappingList { + return PaginatedSCIMMappingListFromJSONTyped(json, false); +} + +export function PaginatedSCIMMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMMappingListToJSON(json: any): PaginatedSCIMMappingList { + return PaginatedSCIMMappingListToJSONTyped(json, false); +} + +export function PaginatedSCIMMappingListToJSONTyped(value?: PaginatedSCIMMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMProviderGroupList.ts b/packages/client-ts/src/models/PaginatedSCIMProviderGroupList.ts new file mode 100644 index 0000000000..d275e34260 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMProviderGroupList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMProviderGroup } from './SCIMProviderGroup'; +import { + SCIMProviderGroupFromJSON, + SCIMProviderGroupFromJSONTyped, + SCIMProviderGroupToJSON, + SCIMProviderGroupToJSONTyped, +} from './SCIMProviderGroup'; + +/** + * + * @export + * @interface PaginatedSCIMProviderGroupList + */ +export interface PaginatedSCIMProviderGroupList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMProviderGroupList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMProviderGroupList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMProviderGroupList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMProviderGroupList interface. + */ +export function instanceOfPaginatedSCIMProviderGroupList(value: object): value is PaginatedSCIMProviderGroupList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMProviderGroupListFromJSON(json: any): PaginatedSCIMProviderGroupList { + return PaginatedSCIMProviderGroupListFromJSONTyped(json, false); +} + +export function PaginatedSCIMProviderGroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMProviderGroupList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMProviderGroupFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMProviderGroupListToJSON(json: any): PaginatedSCIMProviderGroupList { + return PaginatedSCIMProviderGroupListToJSONTyped(json, false); +} + +export function PaginatedSCIMProviderGroupListToJSONTyped(value?: PaginatedSCIMProviderGroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMProviderGroupToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMProviderList.ts b/packages/client-ts/src/models/PaginatedSCIMProviderList.ts new file mode 100644 index 0000000000..a4536abe29 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMProvider } from './SCIMProvider'; +import { + SCIMProviderFromJSON, + SCIMProviderFromJSONTyped, + SCIMProviderToJSON, + SCIMProviderToJSONTyped, +} from './SCIMProvider'; + +/** + * + * @export + * @interface PaginatedSCIMProviderList + */ +export interface PaginatedSCIMProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMProviderList interface. + */ +export function instanceOfPaginatedSCIMProviderList(value: object): value is PaginatedSCIMProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMProviderListFromJSON(json: any): PaginatedSCIMProviderList { + return PaginatedSCIMProviderListFromJSONTyped(json, false); +} + +export function PaginatedSCIMProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMProviderListToJSON(json: any): PaginatedSCIMProviderList { + return PaginatedSCIMProviderListToJSONTyped(json, false); +} + +export function PaginatedSCIMProviderListToJSONTyped(value?: PaginatedSCIMProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMProviderUserList.ts b/packages/client-ts/src/models/PaginatedSCIMProviderUserList.ts new file mode 100644 index 0000000000..ac65137d3a --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMProviderUserList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SCIMProviderUser } from './SCIMProviderUser'; +import { + SCIMProviderUserFromJSON, + SCIMProviderUserFromJSONTyped, + SCIMProviderUserToJSON, + SCIMProviderUserToJSONTyped, +} from './SCIMProviderUser'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedSCIMProviderUserList + */ +export interface PaginatedSCIMProviderUserList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMProviderUserList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMProviderUserList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMProviderUserList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMProviderUserList interface. + */ +export function instanceOfPaginatedSCIMProviderUserList(value: object): value is PaginatedSCIMProviderUserList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMProviderUserListFromJSON(json: any): PaginatedSCIMProviderUserList { + return PaginatedSCIMProviderUserListFromJSONTyped(json, false); +} + +export function PaginatedSCIMProviderUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMProviderUserList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMProviderUserFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMProviderUserListToJSON(json: any): PaginatedSCIMProviderUserList { + return PaginatedSCIMProviderUserListToJSONTyped(json, false); +} + +export function PaginatedSCIMProviderUserListToJSONTyped(value?: PaginatedSCIMProviderUserList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMProviderUserToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMSourceGroupList.ts b/packages/client-ts/src/models/PaginatedSCIMSourceGroupList.ts new file mode 100644 index 0000000000..3f4a55cafa --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMSourceGroupList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMSourceGroup } from './SCIMSourceGroup'; +import { + SCIMSourceGroupFromJSON, + SCIMSourceGroupFromJSONTyped, + SCIMSourceGroupToJSON, + SCIMSourceGroupToJSONTyped, +} from './SCIMSourceGroup'; + +/** + * + * @export + * @interface PaginatedSCIMSourceGroupList + */ +export interface PaginatedSCIMSourceGroupList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMSourceGroupList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMSourceGroupList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMSourceGroupList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMSourceGroupList interface. + */ +export function instanceOfPaginatedSCIMSourceGroupList(value: object): value is PaginatedSCIMSourceGroupList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMSourceGroupListFromJSON(json: any): PaginatedSCIMSourceGroupList { + return PaginatedSCIMSourceGroupListFromJSONTyped(json, false); +} + +export function PaginatedSCIMSourceGroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMSourceGroupList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMSourceGroupFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMSourceGroupListToJSON(json: any): PaginatedSCIMSourceGroupList { + return PaginatedSCIMSourceGroupListToJSONTyped(json, false); +} + +export function PaginatedSCIMSourceGroupListToJSONTyped(value?: PaginatedSCIMSourceGroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMSourceGroupToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMSourceList.ts b/packages/client-ts/src/models/PaginatedSCIMSourceList.ts new file mode 100644 index 0000000000..7d57edf96e --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMSource } from './SCIMSource'; +import { + SCIMSourceFromJSON, + SCIMSourceFromJSONTyped, + SCIMSourceToJSON, + SCIMSourceToJSONTyped, +} from './SCIMSource'; + +/** + * + * @export + * @interface PaginatedSCIMSourceList + */ +export interface PaginatedSCIMSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMSourceList interface. + */ +export function instanceOfPaginatedSCIMSourceList(value: object): value is PaginatedSCIMSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMSourceListFromJSON(json: any): PaginatedSCIMSourceList { + return PaginatedSCIMSourceListFromJSONTyped(json, false); +} + +export function PaginatedSCIMSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMSourceListToJSON(json: any): PaginatedSCIMSourceList { + return PaginatedSCIMSourceListToJSONTyped(json, false); +} + +export function PaginatedSCIMSourceListToJSONTyped(value?: PaginatedSCIMSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedSCIMSourcePropertyMappingList.ts new file mode 100644 index 0000000000..1396aed0c6 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMSourcePropertyMapping } from './SCIMSourcePropertyMapping'; +import { + SCIMSourcePropertyMappingFromJSON, + SCIMSourcePropertyMappingFromJSONTyped, + SCIMSourcePropertyMappingToJSON, + SCIMSourcePropertyMappingToJSONTyped, +} from './SCIMSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedSCIMSourcePropertyMappingList + */ +export interface PaginatedSCIMSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedSCIMSourcePropertyMappingList(value: object): value is PaginatedSCIMSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMSourcePropertyMappingListFromJSON(json: any): PaginatedSCIMSourcePropertyMappingList { + return PaginatedSCIMSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedSCIMSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMSourcePropertyMappingListToJSON(json: any): PaginatedSCIMSourcePropertyMappingList { + return PaginatedSCIMSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedSCIMSourcePropertyMappingListToJSONTyped(value?: PaginatedSCIMSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSCIMSourceUserList.ts b/packages/client-ts/src/models/PaginatedSCIMSourceUserList.ts new file mode 100644 index 0000000000..d4e9dda735 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSCIMSourceUserList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SCIMSourceUser } from './SCIMSourceUser'; +import { + SCIMSourceUserFromJSON, + SCIMSourceUserFromJSONTyped, + SCIMSourceUserToJSON, + SCIMSourceUserToJSONTyped, +} from './SCIMSourceUser'; + +/** + * + * @export + * @interface PaginatedSCIMSourceUserList + */ +export interface PaginatedSCIMSourceUserList { + /** + * + * @type {Pagination} + * @memberof PaginatedSCIMSourceUserList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSCIMSourceUserList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSCIMSourceUserList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSCIMSourceUserList interface. + */ +export function instanceOfPaginatedSCIMSourceUserList(value: object): value is PaginatedSCIMSourceUserList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSCIMSourceUserListFromJSON(json: any): PaginatedSCIMSourceUserList { + return PaginatedSCIMSourceUserListFromJSONTyped(json, false); +} + +export function PaginatedSCIMSourceUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSCIMSourceUserList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SCIMSourceUserFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSCIMSourceUserListToJSON(json: any): PaginatedSCIMSourceUserList { + return PaginatedSCIMSourceUserListToJSONTyped(json, false); +} + +export function PaginatedSCIMSourceUserListToJSONTyped(value?: PaginatedSCIMSourceUserList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SCIMSourceUserToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSMSDeviceList.ts b/packages/client-ts/src/models/PaginatedSMSDeviceList.ts new file mode 100644 index 0000000000..59bc2c0b19 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSMSDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SMSDevice } from './SMSDevice'; +import { + SMSDeviceFromJSON, + SMSDeviceFromJSONTyped, + SMSDeviceToJSON, + SMSDeviceToJSONTyped, +} from './SMSDevice'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedSMSDeviceList + */ +export interface PaginatedSMSDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedSMSDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSMSDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSMSDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSMSDeviceList interface. + */ +export function instanceOfPaginatedSMSDeviceList(value: object): value is PaginatedSMSDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSMSDeviceListFromJSON(json: any): PaginatedSMSDeviceList { + return PaginatedSMSDeviceListFromJSONTyped(json, false); +} + +export function PaginatedSMSDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSMSDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SMSDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSMSDeviceListToJSON(json: any): PaginatedSMSDeviceList { + return PaginatedSMSDeviceListToJSONTyped(json, false); +} + +export function PaginatedSMSDeviceListToJSONTyped(value?: PaginatedSMSDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SMSDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSSFProviderList.ts b/packages/client-ts/src/models/PaginatedSSFProviderList.ts new file mode 100644 index 0000000000..0430bff0b8 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSSFProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SSFProvider } from './SSFProvider'; +import { + SSFProviderFromJSON, + SSFProviderFromJSONTyped, + SSFProviderToJSON, + SSFProviderToJSONTyped, +} from './SSFProvider'; + +/** + * + * @export + * @interface PaginatedSSFProviderList + */ +export interface PaginatedSSFProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedSSFProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSSFProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSSFProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSSFProviderList interface. + */ +export function instanceOfPaginatedSSFProviderList(value: object): value is PaginatedSSFProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSSFProviderListFromJSON(json: any): PaginatedSSFProviderList { + return PaginatedSSFProviderListFromJSONTyped(json, false); +} + +export function PaginatedSSFProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSSFProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SSFProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSSFProviderListToJSON(json: any): PaginatedSSFProviderList { + return PaginatedSSFProviderListToJSONTyped(json, false); +} + +export function PaginatedSSFProviderListToJSONTyped(value?: PaginatedSSFProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SSFProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSSFStreamList.ts b/packages/client-ts/src/models/PaginatedSSFStreamList.ts new file mode 100644 index 0000000000..4e2ab2dbf7 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSSFStreamList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SSFStream } from './SSFStream'; +import { + SSFStreamFromJSON, + SSFStreamFromJSONTyped, + SSFStreamToJSON, + SSFStreamToJSONTyped, +} from './SSFStream'; + +/** + * + * @export + * @interface PaginatedSSFStreamList + */ +export interface PaginatedSSFStreamList { + /** + * + * @type {Pagination} + * @memberof PaginatedSSFStreamList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSSFStreamList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSSFStreamList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSSFStreamList interface. + */ +export function instanceOfPaginatedSSFStreamList(value: object): value is PaginatedSSFStreamList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSSFStreamListFromJSON(json: any): PaginatedSSFStreamList { + return PaginatedSSFStreamListFromJSONTyped(json, false); +} + +export function PaginatedSSFStreamListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSSFStreamList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SSFStreamFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSSFStreamListToJSON(json: any): PaginatedSSFStreamList { + return PaginatedSSFStreamListToJSONTyped(json, false); +} + +export function PaginatedSSFStreamListToJSONTyped(value?: PaginatedSSFStreamList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SSFStreamToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedScheduleList.ts b/packages/client-ts/src/models/PaginatedScheduleList.ts new file mode 100644 index 0000000000..c590bffca3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedScheduleList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Schedule } from './Schedule'; +import { + ScheduleFromJSON, + ScheduleFromJSONTyped, + ScheduleToJSON, + ScheduleToJSONTyped, +} from './Schedule'; + +/** + * + * @export + * @interface PaginatedScheduleList + */ +export interface PaginatedScheduleList { + /** + * + * @type {Pagination} + * @memberof PaginatedScheduleList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedScheduleList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedScheduleList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedScheduleList interface. + */ +export function instanceOfPaginatedScheduleList(value: object): value is PaginatedScheduleList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedScheduleListFromJSON(json: any): PaginatedScheduleList { + return PaginatedScheduleListFromJSONTyped(json, false); +} + +export function PaginatedScheduleListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedScheduleList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ScheduleFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedScheduleListToJSON(json: any): PaginatedScheduleList { + return PaginatedScheduleListToJSONTyped(json, false); +} + +export function PaginatedScheduleListToJSONTyped(value?: PaginatedScheduleList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ScheduleToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedScopeMappingList.ts b/packages/client-ts/src/models/PaginatedScopeMappingList.ts new file mode 100644 index 0000000000..823f9c0ddd --- /dev/null +++ b/packages/client-ts/src/models/PaginatedScopeMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ScopeMapping } from './ScopeMapping'; +import { + ScopeMappingFromJSON, + ScopeMappingFromJSONTyped, + ScopeMappingToJSON, + ScopeMappingToJSONTyped, +} from './ScopeMapping'; + +/** + * + * @export + * @interface PaginatedScopeMappingList + */ +export interface PaginatedScopeMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedScopeMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedScopeMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedScopeMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedScopeMappingList interface. + */ +export function instanceOfPaginatedScopeMappingList(value: object): value is PaginatedScopeMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedScopeMappingListFromJSON(json: any): PaginatedScopeMappingList { + return PaginatedScopeMappingListFromJSONTyped(json, false); +} + +export function PaginatedScopeMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedScopeMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ScopeMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedScopeMappingListToJSON(json: any): PaginatedScopeMappingList { + return PaginatedScopeMappingListToJSONTyped(json, false); +} + +export function PaginatedScopeMappingListToJSONTyped(value?: PaginatedScopeMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ScopeMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedServiceConnectionList.ts b/packages/client-ts/src/models/PaginatedServiceConnectionList.ts new file mode 100644 index 0000000000..fed08cfb80 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedServiceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { ServiceConnection } from './ServiceConnection'; +import { + ServiceConnectionFromJSON, + ServiceConnectionFromJSONTyped, + ServiceConnectionToJSON, + ServiceConnectionToJSONTyped, +} from './ServiceConnection'; + +/** + * + * @export + * @interface PaginatedServiceConnectionList + */ +export interface PaginatedServiceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedServiceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedServiceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedServiceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedServiceConnectionList interface. + */ +export function instanceOfPaginatedServiceConnectionList(value: object): value is PaginatedServiceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedServiceConnectionListFromJSON(json: any): PaginatedServiceConnectionList { + return PaginatedServiceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedServiceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedServiceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(ServiceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedServiceConnectionListToJSON(json: any): PaginatedServiceConnectionList { + return PaginatedServiceConnectionListToJSONTyped(json, false); +} + +export function PaginatedServiceConnectionListToJSONTyped(value?: PaginatedServiceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(ServiceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSourceList.ts b/packages/client-ts/src/models/PaginatedSourceList.ts new file mode 100644 index 0000000000..f1262b1c41 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * + * @export + * @interface PaginatedSourceList + */ +export interface PaginatedSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSourceList interface. + */ +export function instanceOfPaginatedSourceList(value: object): value is PaginatedSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSourceListFromJSON(json: any): PaginatedSourceList { + return PaginatedSourceListFromJSONTyped(json, false); +} + +export function PaginatedSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSourceListToJSON(json: any): PaginatedSourceList { + return PaginatedSourceListToJSONTyped(json, false); +} + +export function PaginatedSourceListToJSONTyped(value?: PaginatedSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedSourceStageList.ts b/packages/client-ts/src/models/PaginatedSourceStageList.ts new file mode 100644 index 0000000000..83d5210c7b --- /dev/null +++ b/packages/client-ts/src/models/PaginatedSourceStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { SourceStage } from './SourceStage'; +import { + SourceStageFromJSON, + SourceStageFromJSONTyped, + SourceStageToJSON, + SourceStageToJSONTyped, +} from './SourceStage'; + +/** + * + * @export + * @interface PaginatedSourceStageList + */ +export interface PaginatedSourceStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedSourceStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedSourceStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedSourceStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedSourceStageList interface. + */ +export function instanceOfPaginatedSourceStageList(value: object): value is PaginatedSourceStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedSourceStageListFromJSON(json: any): PaginatedSourceStageList { + return PaginatedSourceStageListFromJSONTyped(json, false); +} + +export function PaginatedSourceStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSourceStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(SourceStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedSourceStageListToJSON(json: any): PaginatedSourceStageList { + return PaginatedSourceStageListToJSONTyped(json, false); +} + +export function PaginatedSourceStageListToJSONTyped(value?: PaginatedSourceStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(SourceStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedStageList.ts b/packages/client-ts/src/models/PaginatedStageList.ts new file mode 100644 index 0000000000..810babd8dd --- /dev/null +++ b/packages/client-ts/src/models/PaginatedStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Stage } from './Stage'; +import { + StageFromJSON, + StageFromJSONTyped, + StageToJSON, + StageToJSONTyped, +} from './Stage'; + +/** + * + * @export + * @interface PaginatedStageList + */ +export interface PaginatedStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedStageList interface. + */ +export function instanceOfPaginatedStageList(value: object): value is PaginatedStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedStageListFromJSON(json: any): PaginatedStageList { + return PaginatedStageListFromJSONTyped(json, false); +} + +export function PaginatedStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(StageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedStageListToJSON(json: any): PaginatedStageList { + return PaginatedStageListToJSONTyped(json, false); +} + +export function PaginatedStageListToJSONTyped(value?: PaginatedStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(StageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedStaticDeviceList.ts b/packages/client-ts/src/models/PaginatedStaticDeviceList.ts new file mode 100644 index 0000000000..441cf8cb5d --- /dev/null +++ b/packages/client-ts/src/models/PaginatedStaticDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { StaticDevice } from './StaticDevice'; +import { + StaticDeviceFromJSON, + StaticDeviceFromJSONTyped, + StaticDeviceToJSON, + StaticDeviceToJSONTyped, +} from './StaticDevice'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface PaginatedStaticDeviceList + */ +export interface PaginatedStaticDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedStaticDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedStaticDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedStaticDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedStaticDeviceList interface. + */ +export function instanceOfPaginatedStaticDeviceList(value: object): value is PaginatedStaticDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedStaticDeviceListFromJSON(json: any): PaginatedStaticDeviceList { + return PaginatedStaticDeviceListFromJSONTyped(json, false); +} + +export function PaginatedStaticDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStaticDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(StaticDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedStaticDeviceListToJSON(json: any): PaginatedStaticDeviceList { + return PaginatedStaticDeviceListToJSONTyped(json, false); +} + +export function PaginatedStaticDeviceListToJSONTyped(value?: PaginatedStaticDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(StaticDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTOTPDeviceList.ts b/packages/client-ts/src/models/PaginatedTOTPDeviceList.ts new file mode 100644 index 0000000000..8615562697 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTOTPDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { TOTPDevice } from './TOTPDevice'; +import { + TOTPDeviceFromJSON, + TOTPDeviceFromJSONTyped, + TOTPDeviceToJSON, + TOTPDeviceToJSONTyped, +} from './TOTPDevice'; + +/** + * + * @export + * @interface PaginatedTOTPDeviceList + */ +export interface PaginatedTOTPDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedTOTPDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTOTPDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTOTPDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTOTPDeviceList interface. + */ +export function instanceOfPaginatedTOTPDeviceList(value: object): value is PaginatedTOTPDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTOTPDeviceListFromJSON(json: any): PaginatedTOTPDeviceList { + return PaginatedTOTPDeviceListFromJSONTyped(json, false); +} + +export function PaginatedTOTPDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTOTPDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TOTPDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTOTPDeviceListToJSON(json: any): PaginatedTOTPDeviceList { + return PaginatedTOTPDeviceListToJSONTyped(json, false); +} + +export function PaginatedTOTPDeviceListToJSONTyped(value?: PaginatedTOTPDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TOTPDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTaskList.ts b/packages/client-ts/src/models/PaginatedTaskList.ts new file mode 100644 index 0000000000..6590f10be3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTaskList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Task } from './Task'; +import { + TaskFromJSON, + TaskFromJSONTyped, + TaskToJSON, + TaskToJSONTyped, +} from './Task'; + +/** + * + * @export + * @interface PaginatedTaskList + */ +export interface PaginatedTaskList { + /** + * + * @type {Pagination} + * @memberof PaginatedTaskList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTaskList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTaskList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTaskList interface. + */ +export function instanceOfPaginatedTaskList(value: object): value is PaginatedTaskList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTaskListFromJSON(json: any): PaginatedTaskList { + return PaginatedTaskListFromJSONTyped(json, false); +} + +export function PaginatedTaskListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTaskList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TaskFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTaskListToJSON(json: any): PaginatedTaskList { + return PaginatedTaskListToJSONTyped(json, false); +} + +export function PaginatedTaskListToJSONTyped(value?: PaginatedTaskList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TaskToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTelegramSourceList.ts b/packages/client-ts/src/models/PaginatedTelegramSourceList.ts new file mode 100644 index 0000000000..38877f4633 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTelegramSourceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { TelegramSource } from './TelegramSource'; +import { + TelegramSourceFromJSON, + TelegramSourceFromJSONTyped, + TelegramSourceToJSON, + TelegramSourceToJSONTyped, +} from './TelegramSource'; + +/** + * + * @export + * @interface PaginatedTelegramSourceList + */ +export interface PaginatedTelegramSourceList { + /** + * + * @type {Pagination} + * @memberof PaginatedTelegramSourceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTelegramSourceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTelegramSourceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTelegramSourceList interface. + */ +export function instanceOfPaginatedTelegramSourceList(value: object): value is PaginatedTelegramSourceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTelegramSourceListFromJSON(json: any): PaginatedTelegramSourceList { + return PaginatedTelegramSourceListFromJSONTyped(json, false); +} + +export function PaginatedTelegramSourceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTelegramSourceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TelegramSourceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTelegramSourceListToJSON(json: any): PaginatedTelegramSourceList { + return PaginatedTelegramSourceListToJSONTyped(json, false); +} + +export function PaginatedTelegramSourceListToJSONTyped(value?: PaginatedTelegramSourceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TelegramSourceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTelegramSourcePropertyMappingList.ts b/packages/client-ts/src/models/PaginatedTelegramSourcePropertyMappingList.ts new file mode 100644 index 0000000000..9eafff8c72 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTelegramSourcePropertyMappingList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { TelegramSourcePropertyMapping } from './TelegramSourcePropertyMapping'; +import { + TelegramSourcePropertyMappingFromJSON, + TelegramSourcePropertyMappingFromJSONTyped, + TelegramSourcePropertyMappingToJSON, + TelegramSourcePropertyMappingToJSONTyped, +} from './TelegramSourcePropertyMapping'; + +/** + * + * @export + * @interface PaginatedTelegramSourcePropertyMappingList + */ +export interface PaginatedTelegramSourcePropertyMappingList { + /** + * + * @type {Pagination} + * @memberof PaginatedTelegramSourcePropertyMappingList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTelegramSourcePropertyMappingList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTelegramSourcePropertyMappingList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTelegramSourcePropertyMappingList interface. + */ +export function instanceOfPaginatedTelegramSourcePropertyMappingList(value: object): value is PaginatedTelegramSourcePropertyMappingList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTelegramSourcePropertyMappingListFromJSON(json: any): PaginatedTelegramSourcePropertyMappingList { + return PaginatedTelegramSourcePropertyMappingListFromJSONTyped(json, false); +} + +export function PaginatedTelegramSourcePropertyMappingListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTelegramSourcePropertyMappingList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TelegramSourcePropertyMappingFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTelegramSourcePropertyMappingListToJSON(json: any): PaginatedTelegramSourcePropertyMappingList { + return PaginatedTelegramSourcePropertyMappingListToJSONTyped(json, false); +} + +export function PaginatedTelegramSourcePropertyMappingListToJSONTyped(value?: PaginatedTelegramSourcePropertyMappingList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TelegramSourcePropertyMappingToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTenantList.ts b/packages/client-ts/src/models/PaginatedTenantList.ts new file mode 100644 index 0000000000..7c178ce28f --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTenantList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Tenant } from './Tenant'; +import { + TenantFromJSON, + TenantFromJSONTyped, + TenantToJSON, + TenantToJSONTyped, +} from './Tenant'; + +/** + * + * @export + * @interface PaginatedTenantList + */ +export interface PaginatedTenantList { + /** + * + * @type {Pagination} + * @memberof PaginatedTenantList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTenantList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTenantList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTenantList interface. + */ +export function instanceOfPaginatedTenantList(value: object): value is PaginatedTenantList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTenantListFromJSON(json: any): PaginatedTenantList { + return PaginatedTenantListFromJSONTyped(json, false); +} + +export function PaginatedTenantListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTenantList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TenantFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTenantListToJSON(json: any): PaginatedTenantList { + return PaginatedTenantListToJSONTyped(json, false); +} + +export function PaginatedTenantListToJSONTyped(value?: PaginatedTenantList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TenantToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTokenList.ts b/packages/client-ts/src/models/PaginatedTokenList.ts new file mode 100644 index 0000000000..53078f3b71 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTokenList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Token } from './Token'; +import { + TokenFromJSON, + TokenFromJSONTyped, + TokenToJSON, + TokenToJSONTyped, +} from './Token'; + +/** + * + * @export + * @interface PaginatedTokenList + */ +export interface PaginatedTokenList { + /** + * + * @type {Pagination} + * @memberof PaginatedTokenList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTokenList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTokenList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTokenList interface. + */ +export function instanceOfPaginatedTokenList(value: object): value is PaginatedTokenList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTokenListFromJSON(json: any): PaginatedTokenList { + return PaginatedTokenListFromJSONTyped(json, false); +} + +export function PaginatedTokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTokenList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TokenFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTokenListToJSON(json: any): PaginatedTokenList { + return PaginatedTokenListToJSONTyped(json, false); +} + +export function PaginatedTokenListToJSONTyped(value?: PaginatedTokenList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TokenToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedTokenModelList.ts b/packages/client-ts/src/models/PaginatedTokenModelList.ts new file mode 100644 index 0000000000..bca5362ef3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedTokenModelList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { TokenModel } from './TokenModel'; +import { + TokenModelFromJSON, + TokenModelFromJSONTyped, + TokenModelToJSON, + TokenModelToJSONTyped, +} from './TokenModel'; + +/** + * + * @export + * @interface PaginatedTokenModelList + */ +export interface PaginatedTokenModelList { + /** + * + * @type {Pagination} + * @memberof PaginatedTokenModelList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedTokenModelList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedTokenModelList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedTokenModelList interface. + */ +export function instanceOfPaginatedTokenModelList(value: object): value is PaginatedTokenModelList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedTokenModelListFromJSON(json: any): PaginatedTokenModelList { + return PaginatedTokenModelListFromJSONTyped(json, false); +} + +export function PaginatedTokenModelListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTokenModelList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(TokenModelFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedTokenModelListToJSON(json: any): PaginatedTokenModelList { + return PaginatedTokenModelListToJSONTyped(json, false); +} + +export function PaginatedTokenModelListToJSONTyped(value?: PaginatedTokenModelList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(TokenModelToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUniquePasswordPolicyList.ts b/packages/client-ts/src/models/PaginatedUniquePasswordPolicyList.ts new file mode 100644 index 0000000000..07005e2df3 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUniquePasswordPolicyList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UniquePasswordPolicy } from './UniquePasswordPolicy'; +import { + UniquePasswordPolicyFromJSON, + UniquePasswordPolicyFromJSONTyped, + UniquePasswordPolicyToJSON, + UniquePasswordPolicyToJSONTyped, +} from './UniquePasswordPolicy'; + +/** + * + * @export + * @interface PaginatedUniquePasswordPolicyList + */ +export interface PaginatedUniquePasswordPolicyList { + /** + * + * @type {Pagination} + * @memberof PaginatedUniquePasswordPolicyList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUniquePasswordPolicyList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUniquePasswordPolicyList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUniquePasswordPolicyList interface. + */ +export function instanceOfPaginatedUniquePasswordPolicyList(value: object): value is PaginatedUniquePasswordPolicyList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUniquePasswordPolicyListFromJSON(json: any): PaginatedUniquePasswordPolicyList { + return PaginatedUniquePasswordPolicyListFromJSONTyped(json, false); +} + +export function PaginatedUniquePasswordPolicyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUniquePasswordPolicyList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UniquePasswordPolicyFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUniquePasswordPolicyListToJSON(json: any): PaginatedUniquePasswordPolicyList { + return PaginatedUniquePasswordPolicyListToJSONTyped(json, false); +} + +export function PaginatedUniquePasswordPolicyListToJSONTyped(value?: PaginatedUniquePasswordPolicyList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UniquePasswordPolicyToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserConsentList.ts b/packages/client-ts/src/models/PaginatedUserConsentList.ts new file mode 100644 index 0000000000..d76e9a8ad6 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserConsentList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserConsent } from './UserConsent'; +import { + UserConsentFromJSON, + UserConsentFromJSONTyped, + UserConsentToJSON, + UserConsentToJSONTyped, +} from './UserConsent'; + +/** + * + * @export + * @interface PaginatedUserConsentList + */ +export interface PaginatedUserConsentList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserConsentList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserConsentList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserConsentList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserConsentList interface. + */ +export function instanceOfPaginatedUserConsentList(value: object): value is PaginatedUserConsentList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserConsentListFromJSON(json: any): PaginatedUserConsentList { + return PaginatedUserConsentListFromJSONTyped(json, false); +} + +export function PaginatedUserConsentListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserConsentList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserConsentFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserConsentListToJSON(json: any): PaginatedUserConsentList { + return PaginatedUserConsentListToJSONTyped(json, false); +} + +export function PaginatedUserConsentListToJSONTyped(value?: PaginatedUserConsentList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserConsentToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserDeleteStageList.ts b/packages/client-ts/src/models/PaginatedUserDeleteStageList.ts new file mode 100644 index 0000000000..f72063c225 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserDeleteStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserDeleteStage } from './UserDeleteStage'; +import { + UserDeleteStageFromJSON, + UserDeleteStageFromJSONTyped, + UserDeleteStageToJSON, + UserDeleteStageToJSONTyped, +} from './UserDeleteStage'; + +/** + * + * @export + * @interface PaginatedUserDeleteStageList + */ +export interface PaginatedUserDeleteStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserDeleteStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserDeleteStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserDeleteStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserDeleteStageList interface. + */ +export function instanceOfPaginatedUserDeleteStageList(value: object): value is PaginatedUserDeleteStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserDeleteStageListFromJSON(json: any): PaginatedUserDeleteStageList { + return PaginatedUserDeleteStageListFromJSONTyped(json, false); +} + +export function PaginatedUserDeleteStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserDeleteStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserDeleteStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserDeleteStageListToJSON(json: any): PaginatedUserDeleteStageList { + return PaginatedUserDeleteStageListToJSONTyped(json, false); +} + +export function PaginatedUserDeleteStageListToJSONTyped(value?: PaginatedUserDeleteStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserDeleteStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserKerberosSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserKerberosSourceConnectionList.ts new file mode 100644 index 0000000000..3fee1b1f02 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserKerberosSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserKerberosSourceConnection } from './UserKerberosSourceConnection'; +import { + UserKerberosSourceConnectionFromJSON, + UserKerberosSourceConnectionFromJSONTyped, + UserKerberosSourceConnectionToJSON, + UserKerberosSourceConnectionToJSONTyped, +} from './UserKerberosSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserKerberosSourceConnectionList + */ +export interface PaginatedUserKerberosSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserKerberosSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserKerberosSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserKerberosSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserKerberosSourceConnectionList interface. + */ +export function instanceOfPaginatedUserKerberosSourceConnectionList(value: object): value is PaginatedUserKerberosSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserKerberosSourceConnectionListFromJSON(json: any): PaginatedUserKerberosSourceConnectionList { + return PaginatedUserKerberosSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserKerberosSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserKerberosSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserKerberosSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserKerberosSourceConnectionListToJSON(json: any): PaginatedUserKerberosSourceConnectionList { + return PaginatedUserKerberosSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserKerberosSourceConnectionListToJSONTyped(value?: PaginatedUserKerberosSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserKerberosSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserLDAPSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserLDAPSourceConnectionList.ts new file mode 100644 index 0000000000..09959987a5 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserLDAPSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserLDAPSourceConnection } from './UserLDAPSourceConnection'; +import { + UserLDAPSourceConnectionFromJSON, + UserLDAPSourceConnectionFromJSONTyped, + UserLDAPSourceConnectionToJSON, + UserLDAPSourceConnectionToJSONTyped, +} from './UserLDAPSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserLDAPSourceConnectionList + */ +export interface PaginatedUserLDAPSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserLDAPSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserLDAPSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserLDAPSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserLDAPSourceConnectionList interface. + */ +export function instanceOfPaginatedUserLDAPSourceConnectionList(value: object): value is PaginatedUserLDAPSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserLDAPSourceConnectionListFromJSON(json: any): PaginatedUserLDAPSourceConnectionList { + return PaginatedUserLDAPSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserLDAPSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserLDAPSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserLDAPSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserLDAPSourceConnectionListToJSON(json: any): PaginatedUserLDAPSourceConnectionList { + return PaginatedUserLDAPSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserLDAPSourceConnectionListToJSONTyped(value?: PaginatedUserLDAPSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserLDAPSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserList.ts b/packages/client-ts/src/models/PaginatedUserList.ts new file mode 100644 index 0000000000..0e5e7621ad --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, + UserToJSONTyped, +} from './User'; + +/** + * + * @export + * @interface PaginatedUserList + */ +export interface PaginatedUserList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserList interface. + */ +export function instanceOfPaginatedUserList(value: object): value is PaginatedUserList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserListFromJSON(json: any): PaginatedUserList { + return PaginatedUserListFromJSONTyped(json, false); +} + +export function PaginatedUserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserListToJSON(json: any): PaginatedUserList { + return PaginatedUserListToJSONTyped(json, false); +} + +export function PaginatedUserListToJSONTyped(value?: PaginatedUserList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserLoginStageList.ts b/packages/client-ts/src/models/PaginatedUserLoginStageList.ts new file mode 100644 index 0000000000..dcfa31d5e1 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserLoginStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserLoginStage } from './UserLoginStage'; +import { + UserLoginStageFromJSON, + UserLoginStageFromJSONTyped, + UserLoginStageToJSON, + UserLoginStageToJSONTyped, +} from './UserLoginStage'; + +/** + * + * @export + * @interface PaginatedUserLoginStageList + */ +export interface PaginatedUserLoginStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserLoginStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserLoginStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserLoginStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserLoginStageList interface. + */ +export function instanceOfPaginatedUserLoginStageList(value: object): value is PaginatedUserLoginStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserLoginStageListFromJSON(json: any): PaginatedUserLoginStageList { + return PaginatedUserLoginStageListFromJSONTyped(json, false); +} + +export function PaginatedUserLoginStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserLoginStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserLoginStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserLoginStageListToJSON(json: any): PaginatedUserLoginStageList { + return PaginatedUserLoginStageListToJSONTyped(json, false); +} + +export function PaginatedUserLoginStageListToJSONTyped(value?: PaginatedUserLoginStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserLoginStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserLogoutStageList.ts b/packages/client-ts/src/models/PaginatedUserLogoutStageList.ts new file mode 100644 index 0000000000..730bef89df --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserLogoutStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserLogoutStage } from './UserLogoutStage'; +import { + UserLogoutStageFromJSON, + UserLogoutStageFromJSONTyped, + UserLogoutStageToJSON, + UserLogoutStageToJSONTyped, +} from './UserLogoutStage'; + +/** + * + * @export + * @interface PaginatedUserLogoutStageList + */ +export interface PaginatedUserLogoutStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserLogoutStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserLogoutStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserLogoutStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserLogoutStageList interface. + */ +export function instanceOfPaginatedUserLogoutStageList(value: object): value is PaginatedUserLogoutStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserLogoutStageListFromJSON(json: any): PaginatedUserLogoutStageList { + return PaginatedUserLogoutStageListFromJSONTyped(json, false); +} + +export function PaginatedUserLogoutStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserLogoutStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserLogoutStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserLogoutStageListToJSON(json: any): PaginatedUserLogoutStageList { + return PaginatedUserLogoutStageListToJSONTyped(json, false); +} + +export function PaginatedUserLogoutStageListToJSONTyped(value?: PaginatedUserLogoutStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserLogoutStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserOAuthSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserOAuthSourceConnectionList.ts new file mode 100644 index 0000000000..78840632de --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserOAuthSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserOAuthSourceConnection } from './UserOAuthSourceConnection'; +import { + UserOAuthSourceConnectionFromJSON, + UserOAuthSourceConnectionFromJSONTyped, + UserOAuthSourceConnectionToJSON, + UserOAuthSourceConnectionToJSONTyped, +} from './UserOAuthSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserOAuthSourceConnectionList + */ +export interface PaginatedUserOAuthSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserOAuthSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserOAuthSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserOAuthSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserOAuthSourceConnectionList interface. + */ +export function instanceOfPaginatedUserOAuthSourceConnectionList(value: object): value is PaginatedUserOAuthSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserOAuthSourceConnectionListFromJSON(json: any): PaginatedUserOAuthSourceConnectionList { + return PaginatedUserOAuthSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserOAuthSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserOAuthSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserOAuthSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserOAuthSourceConnectionListToJSON(json: any): PaginatedUserOAuthSourceConnectionList { + return PaginatedUserOAuthSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserOAuthSourceConnectionListToJSONTyped(value?: PaginatedUserOAuthSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserOAuthSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserPlexSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserPlexSourceConnectionList.ts new file mode 100644 index 0000000000..78743a7d63 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserPlexSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserPlexSourceConnection } from './UserPlexSourceConnection'; +import { + UserPlexSourceConnectionFromJSON, + UserPlexSourceConnectionFromJSONTyped, + UserPlexSourceConnectionToJSON, + UserPlexSourceConnectionToJSONTyped, +} from './UserPlexSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserPlexSourceConnectionList + */ +export interface PaginatedUserPlexSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserPlexSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserPlexSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserPlexSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserPlexSourceConnectionList interface. + */ +export function instanceOfPaginatedUserPlexSourceConnectionList(value: object): value is PaginatedUserPlexSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserPlexSourceConnectionListFromJSON(json: any): PaginatedUserPlexSourceConnectionList { + return PaginatedUserPlexSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserPlexSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserPlexSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserPlexSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserPlexSourceConnectionListToJSON(json: any): PaginatedUserPlexSourceConnectionList { + return PaginatedUserPlexSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserPlexSourceConnectionListToJSONTyped(value?: PaginatedUserPlexSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserPlexSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserSAMLSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserSAMLSourceConnectionList.ts new file mode 100644 index 0000000000..1a73f4f5bb --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserSAMLSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserSAMLSourceConnection } from './UserSAMLSourceConnection'; +import { + UserSAMLSourceConnectionFromJSON, + UserSAMLSourceConnectionFromJSONTyped, + UserSAMLSourceConnectionToJSON, + UserSAMLSourceConnectionToJSONTyped, +} from './UserSAMLSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserSAMLSourceConnectionList + */ +export interface PaginatedUserSAMLSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserSAMLSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserSAMLSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserSAMLSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserSAMLSourceConnectionList interface. + */ +export function instanceOfPaginatedUserSAMLSourceConnectionList(value: object): value is PaginatedUserSAMLSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserSAMLSourceConnectionListFromJSON(json: any): PaginatedUserSAMLSourceConnectionList { + return PaginatedUserSAMLSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserSAMLSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserSAMLSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserSAMLSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserSAMLSourceConnectionListToJSON(json: any): PaginatedUserSAMLSourceConnectionList { + return PaginatedUserSAMLSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserSAMLSourceConnectionListToJSONTyped(value?: PaginatedUserSAMLSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserSAMLSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserSourceConnectionList.ts new file mode 100644 index 0000000000..36efadae23 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserSourceConnection } from './UserSourceConnection'; +import { + UserSourceConnectionFromJSON, + UserSourceConnectionFromJSONTyped, + UserSourceConnectionToJSON, + UserSourceConnectionToJSONTyped, +} from './UserSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserSourceConnectionList + */ +export interface PaginatedUserSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserSourceConnectionList interface. + */ +export function instanceOfPaginatedUserSourceConnectionList(value: object): value is PaginatedUserSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserSourceConnectionListFromJSON(json: any): PaginatedUserSourceConnectionList { + return PaginatedUserSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserSourceConnectionListToJSON(json: any): PaginatedUserSourceConnectionList { + return PaginatedUserSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserSourceConnectionListToJSONTyped(value?: PaginatedUserSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserTelegramSourceConnectionList.ts b/packages/client-ts/src/models/PaginatedUserTelegramSourceConnectionList.ts new file mode 100644 index 0000000000..a698a224e5 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserTelegramSourceConnectionList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserTelegramSourceConnection } from './UserTelegramSourceConnection'; +import { + UserTelegramSourceConnectionFromJSON, + UserTelegramSourceConnectionFromJSONTyped, + UserTelegramSourceConnectionToJSON, + UserTelegramSourceConnectionToJSONTyped, +} from './UserTelegramSourceConnection'; + +/** + * + * @export + * @interface PaginatedUserTelegramSourceConnectionList + */ +export interface PaginatedUserTelegramSourceConnectionList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserTelegramSourceConnectionList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserTelegramSourceConnectionList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserTelegramSourceConnectionList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserTelegramSourceConnectionList interface. + */ +export function instanceOfPaginatedUserTelegramSourceConnectionList(value: object): value is PaginatedUserTelegramSourceConnectionList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserTelegramSourceConnectionListFromJSON(json: any): PaginatedUserTelegramSourceConnectionList { + return PaginatedUserTelegramSourceConnectionListFromJSONTyped(json, false); +} + +export function PaginatedUserTelegramSourceConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserTelegramSourceConnectionList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserTelegramSourceConnectionFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserTelegramSourceConnectionListToJSON(json: any): PaginatedUserTelegramSourceConnectionList { + return PaginatedUserTelegramSourceConnectionListToJSONTyped(json, false); +} + +export function PaginatedUserTelegramSourceConnectionListToJSONTyped(value?: PaginatedUserTelegramSourceConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserTelegramSourceConnectionToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedUserWriteStageList.ts b/packages/client-ts/src/models/PaginatedUserWriteStageList.ts new file mode 100644 index 0000000000..0d74e44e97 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedUserWriteStageList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { UserWriteStage } from './UserWriteStage'; +import { + UserWriteStageFromJSON, + UserWriteStageFromJSONTyped, + UserWriteStageToJSON, + UserWriteStageToJSONTyped, +} from './UserWriteStage'; + +/** + * + * @export + * @interface PaginatedUserWriteStageList + */ +export interface PaginatedUserWriteStageList { + /** + * + * @type {Pagination} + * @memberof PaginatedUserWriteStageList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedUserWriteStageList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedUserWriteStageList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedUserWriteStageList interface. + */ +export function instanceOfPaginatedUserWriteStageList(value: object): value is PaginatedUserWriteStageList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedUserWriteStageListFromJSON(json: any): PaginatedUserWriteStageList { + return PaginatedUserWriteStageListFromJSONTyped(json, false); +} + +export function PaginatedUserWriteStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserWriteStageList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(UserWriteStageFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedUserWriteStageListToJSON(json: any): PaginatedUserWriteStageList { + return PaginatedUserWriteStageListToJSONTyped(json, false); +} + +export function PaginatedUserWriteStageListToJSONTyped(value?: PaginatedUserWriteStageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(UserWriteStageToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedWSFederationProviderList.ts b/packages/client-ts/src/models/PaginatedWSFederationProviderList.ts new file mode 100644 index 0000000000..ff71a1ce20 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedWSFederationProviderList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { WSFederationProvider } from './WSFederationProvider'; +import { + WSFederationProviderFromJSON, + WSFederationProviderFromJSONTyped, + WSFederationProviderToJSON, + WSFederationProviderToJSONTyped, +} from './WSFederationProvider'; + +/** + * + * @export + * @interface PaginatedWSFederationProviderList + */ +export interface PaginatedWSFederationProviderList { + /** + * + * @type {Pagination} + * @memberof PaginatedWSFederationProviderList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedWSFederationProviderList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedWSFederationProviderList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedWSFederationProviderList interface. + */ +export function instanceOfPaginatedWSFederationProviderList(value: object): value is PaginatedWSFederationProviderList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedWSFederationProviderListFromJSON(json: any): PaginatedWSFederationProviderList { + return PaginatedWSFederationProviderListFromJSONTyped(json, false); +} + +export function PaginatedWSFederationProviderListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedWSFederationProviderList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(WSFederationProviderFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedWSFederationProviderListToJSON(json: any): PaginatedWSFederationProviderList { + return PaginatedWSFederationProviderListToJSONTyped(json, false); +} + +export function PaginatedWSFederationProviderListToJSONTyped(value?: PaginatedWSFederationProviderList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(WSFederationProviderToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedWebAuthnDeviceList.ts b/packages/client-ts/src/models/PaginatedWebAuthnDeviceList.ts new file mode 100644 index 0000000000..d516192e97 --- /dev/null +++ b/packages/client-ts/src/models/PaginatedWebAuthnDeviceList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { WebAuthnDevice } from './WebAuthnDevice'; +import { + WebAuthnDeviceFromJSON, + WebAuthnDeviceFromJSONTyped, + WebAuthnDeviceToJSON, + WebAuthnDeviceToJSONTyped, +} from './WebAuthnDevice'; + +/** + * + * @export + * @interface PaginatedWebAuthnDeviceList + */ +export interface PaginatedWebAuthnDeviceList { + /** + * + * @type {Pagination} + * @memberof PaginatedWebAuthnDeviceList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedWebAuthnDeviceList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedWebAuthnDeviceList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedWebAuthnDeviceList interface. + */ +export function instanceOfPaginatedWebAuthnDeviceList(value: object): value is PaginatedWebAuthnDeviceList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedWebAuthnDeviceListFromJSON(json: any): PaginatedWebAuthnDeviceList { + return PaginatedWebAuthnDeviceListFromJSONTyped(json, false); +} + +export function PaginatedWebAuthnDeviceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedWebAuthnDeviceList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(WebAuthnDeviceFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedWebAuthnDeviceListToJSON(json: any): PaginatedWebAuthnDeviceList { + return PaginatedWebAuthnDeviceListToJSONTyped(json, false); +} + +export function PaginatedWebAuthnDeviceListToJSONTyped(value?: PaginatedWebAuthnDeviceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(WebAuthnDeviceToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/PaginatedWebAuthnDeviceTypeList.ts b/packages/client-ts/src/models/PaginatedWebAuthnDeviceTypeList.ts new file mode 100644 index 0000000000..7c338d8eda --- /dev/null +++ b/packages/client-ts/src/models/PaginatedWebAuthnDeviceTypeList.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { WebAuthnDeviceType } from './WebAuthnDeviceType'; +import { + WebAuthnDeviceTypeFromJSON, + WebAuthnDeviceTypeFromJSONTyped, + WebAuthnDeviceTypeToJSON, + WebAuthnDeviceTypeToJSONTyped, +} from './WebAuthnDeviceType'; + +/** + * + * @export + * @interface PaginatedWebAuthnDeviceTypeList + */ +export interface PaginatedWebAuthnDeviceTypeList { + /** + * + * @type {Pagination} + * @memberof PaginatedWebAuthnDeviceTypeList + */ + pagination: Pagination; + /** + * + * @type {Array} + * @memberof PaginatedWebAuthnDeviceTypeList + */ + results: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PaginatedWebAuthnDeviceTypeList + */ + autocomplete: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PaginatedWebAuthnDeviceTypeList interface. + */ +export function instanceOfPaginatedWebAuthnDeviceTypeList(value: object): value is PaginatedWebAuthnDeviceTypeList { + if (!('pagination' in value) || value['pagination'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + if (!('autocomplete' in value) || value['autocomplete'] === undefined) return false; + return true; +} + +export function PaginatedWebAuthnDeviceTypeListFromJSON(json: any): PaginatedWebAuthnDeviceTypeList { + return PaginatedWebAuthnDeviceTypeListFromJSONTyped(json, false); +} + +export function PaginatedWebAuthnDeviceTypeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedWebAuthnDeviceTypeList { + if (json == null) { + return json; + } + return { + + 'pagination': PaginationFromJSON(json['pagination']), + 'results': ((json['results'] as Array).map(WebAuthnDeviceTypeFromJSON)), + 'autocomplete': json['autocomplete'], + }; +} + +export function PaginatedWebAuthnDeviceTypeListToJSON(json: any): PaginatedWebAuthnDeviceTypeList { + return PaginatedWebAuthnDeviceTypeListToJSONTyped(json, false); +} + +export function PaginatedWebAuthnDeviceTypeListToJSONTyped(value?: PaginatedWebAuthnDeviceTypeList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pagination': PaginationToJSON(value['pagination']), + 'results': ((value['results'] as Array).map(WebAuthnDeviceTypeToJSON)), + 'autocomplete': value['autocomplete'], + }; +} + diff --git a/packages/client-ts/src/models/Pagination.ts b/packages/client-ts/src/models/Pagination.ts new file mode 100644 index 0000000000..f1163ec54c --- /dev/null +++ b/packages/client-ts/src/models/Pagination.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Pagination + */ +export interface Pagination { + /** + * + * @type {number} + * @memberof Pagination + */ + next: number; + /** + * + * @type {number} + * @memberof Pagination + */ + previous: number; + /** + * + * @type {number} + * @memberof Pagination + */ + count: number; + /** + * + * @type {number} + * @memberof Pagination + */ + current: number; + /** + * + * @type {number} + * @memberof Pagination + */ + totalPages: number; + /** + * + * @type {number} + * @memberof Pagination + */ + startIndex: number; + /** + * + * @type {number} + * @memberof Pagination + */ + endIndex: number; +} + +/** + * Check if a given object implements the Pagination interface. + */ +export function instanceOfPagination(value: object): value is Pagination { + if (!('next' in value) || value['next'] === undefined) return false; + if (!('previous' in value) || value['previous'] === undefined) return false; + if (!('count' in value) || value['count'] === undefined) return false; + if (!('current' in value) || value['current'] === undefined) return false; + if (!('totalPages' in value) || value['totalPages'] === undefined) return false; + if (!('startIndex' in value) || value['startIndex'] === undefined) return false; + if (!('endIndex' in value) || value['endIndex'] === undefined) return false; + return true; +} + +export function PaginationFromJSON(json: any): Pagination { + return PaginationFromJSONTyped(json, false); +} + +export function PaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pagination { + if (json == null) { + return json; + } + return { + + 'next': json['next'], + 'previous': json['previous'], + 'count': json['count'], + 'current': json['current'], + 'totalPages': json['total_pages'], + 'startIndex': json['start_index'], + 'endIndex': json['end_index'], + }; +} + +export function PaginationToJSON(json: any): Pagination { + return PaginationToJSONTyped(json, false); +} + +export function PaginationToJSONTyped(value?: Pagination | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'next': value['next'], + 'previous': value['previous'], + 'count': value['count'], + 'current': value['current'], + 'total_pages': value['totalPages'], + 'start_index': value['startIndex'], + 'end_index': value['endIndex'], + }; +} + diff --git a/packages/client-ts/src/models/PartialGroup.ts b/packages/client-ts/src/models/PartialGroup.ts new file mode 100644 index 0000000000..7dcd524076 --- /dev/null +++ b/packages/client-ts/src/models/PartialGroup.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Partial Group Serializer, does not include child relations. + * @export + * @interface PartialGroup + */ +export interface PartialGroup { + /** + * + * @type {string} + * @memberof PartialGroup + */ + readonly pk: string; + /** + * Get a numerical, int32 ID for the group + * @type {number} + * @memberof PartialGroup + */ + readonly numPk: number; + /** + * + * @type {string} + * @memberof PartialGroup + */ + name: string; + /** + * Users added to this group will be superusers. + * @type {boolean} + * @memberof PartialGroup + */ + isSuperuser?: boolean; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PartialGroup + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PartialGroup interface. + */ +export function instanceOfPartialGroup(value: object): value is PartialGroup { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('numPk' in value) || value['numPk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function PartialGroupFromJSON(json: any): PartialGroup { + return PartialGroupFromJSONTyped(json, false); +} + +export function PartialGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartialGroup { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'numPk': json['num_pk'], + 'name': json['name'], + 'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PartialGroupToJSON(json: any): PartialGroup { + return PartialGroupToJSONTyped(json, false); +} + +export function PartialGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'is_superuser': value['isSuperuser'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PartialUser.ts b/packages/client-ts/src/models/PartialUser.ts new file mode 100644 index 0000000000..6d27425416 --- /dev/null +++ b/packages/client-ts/src/models/PartialUser.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Partial User Serializer, does not include child relations. + * @export + * @interface PartialUser + */ +export interface PartialUser { + /** + * + * @type {number} + * @memberof PartialUser + */ + readonly pk: number; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof PartialUser + */ + username: string; + /** + * User's display name. + * @type {string} + * @memberof PartialUser + */ + name: string; + /** + * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + * @type {boolean} + * @memberof PartialUser + */ + isActive?: boolean; + /** + * + * @type {Date} + * @memberof PartialUser + */ + lastLogin?: Date | null; + /** + * + * @type {string} + * @memberof PartialUser + */ + email?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PartialUser + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof PartialUser + */ + readonly uid: string; +} + +/** + * Check if a given object implements the PartialUser interface. + */ +export function instanceOfPartialUser(value: object): value is PartialUser { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('username' in value) || value['username'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('uid' in value) || value['uid'] === undefined) return false; + return true; +} + +export function PartialUserFromJSON(json: any): PartialUser { + return PartialUserFromJSONTyped(json, false); +} + +export function PartialUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartialUser { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'username': json['username'], + 'name': json['name'], + 'isActive': json['is_active'] == null ? undefined : json['is_active'], + 'lastLogin': json['last_login'] == null ? undefined : (new Date(json['last_login'])), + 'email': json['email'] == null ? undefined : json['email'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'uid': json['uid'], + }; +} + +export function PartialUserToJSON(json: any): PartialUser { + return PartialUserToJSONTyped(json, false); +} + +export function PartialUserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'name': value['name'], + 'is_active': value['isActive'], + 'last_login': value['lastLogin'] == null ? value['lastLogin'] : value['lastLogin'].toISOString(), + 'email': value['email'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordChallenge.ts b/packages/client-ts/src/models/PasswordChallenge.ts new file mode 100644 index 0000000000..712d93c5ed --- /dev/null +++ b/packages/client-ts/src/models/PasswordChallenge.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Password challenge UI fields + * @export + * @interface PasswordChallenge + */ +export interface PasswordChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof PasswordChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof PasswordChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof PasswordChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof PasswordChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof PasswordChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof PasswordChallenge + */ + recoveryUrl?: string; + /** + * + * @type {boolean} + * @memberof PasswordChallenge + */ + allowShowPassword?: boolean; +} + +/** + * Check if a given object implements the PasswordChallenge interface. + */ +export function instanceOfPasswordChallenge(value: object): value is PasswordChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + return true; +} + +export function PasswordChallengeFromJSON(json: any): PasswordChallenge { + return PasswordChallengeFromJSONTyped(json, false); +} + +export function PasswordChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'recoveryUrl': json['recovery_url'] == null ? undefined : json['recovery_url'], + 'allowShowPassword': json['allow_show_password'] == null ? undefined : json['allow_show_password'], + }; +} + +export function PasswordChallengeToJSON(json: any): PasswordChallenge { + return PasswordChallengeToJSONTyped(json, false); +} + +export function PasswordChallengeToJSONTyped(value?: PasswordChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'recovery_url': value['recoveryUrl'], + 'allow_show_password': value['allowShowPassword'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordChallengeResponseRequest.ts b/packages/client-ts/src/models/PasswordChallengeResponseRequest.ts new file mode 100644 index 0000000000..74a3637797 --- /dev/null +++ b/packages/client-ts/src/models/PasswordChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password challenge response + * @export + * @interface PasswordChallengeResponseRequest + */ +export interface PasswordChallengeResponseRequest { + /** + * + * @type {string} + * @memberof PasswordChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof PasswordChallengeResponseRequest + */ + password: string; +} + +/** + * Check if a given object implements the PasswordChallengeResponseRequest interface. + */ +export function instanceOfPasswordChallengeResponseRequest(value: object): value is PasswordChallengeResponseRequest { + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function PasswordChallengeResponseRequestFromJSON(json: any): PasswordChallengeResponseRequest { + return PasswordChallengeResponseRequestFromJSONTyped(json, false); +} + +export function PasswordChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'password': json['password'], + }; +} + +export function PasswordChallengeResponseRequestToJSON(json: any): PasswordChallengeResponseRequest { + return PasswordChallengeResponseRequestToJSONTyped(json, false); +} + +export function PasswordChallengeResponseRequestToJSONTyped(value?: PasswordChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'password': value['password'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordExpiryPolicy.ts b/packages/client-ts/src/models/PasswordExpiryPolicy.ts new file mode 100644 index 0000000000..5001737dad --- /dev/null +++ b/packages/client-ts/src/models/PasswordExpiryPolicy.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Expiry Policy Serializer + * @export + * @interface PasswordExpiryPolicy + */ +export interface PasswordExpiryPolicy { + /** + * + * @type {string} + * @memberof PasswordExpiryPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof PasswordExpiryPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PasswordExpiryPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof PasswordExpiryPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PasswordExpiryPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PasswordExpiryPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PasswordExpiryPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof PasswordExpiryPolicy + */ + readonly boundTo: number; + /** + * + * @type {number} + * @memberof PasswordExpiryPolicy + */ + days: number; + /** + * + * @type {boolean} + * @memberof PasswordExpiryPolicy + */ + denyOnly?: boolean; +} + +/** + * Check if a given object implements the PasswordExpiryPolicy interface. + */ +export function instanceOfPasswordExpiryPolicy(value: object): value is PasswordExpiryPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + if (!('days' in value) || value['days'] === undefined) return false; + return true; +} + +export function PasswordExpiryPolicyFromJSON(json: any): PasswordExpiryPolicy { + return PasswordExpiryPolicyFromJSONTyped(json, false); +} + +export function PasswordExpiryPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordExpiryPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'days': json['days'], + 'denyOnly': json['deny_only'] == null ? undefined : json['deny_only'], + }; +} + +export function PasswordExpiryPolicyToJSON(json: any): PasswordExpiryPolicy { + return PasswordExpiryPolicyToJSONTyped(json, false); +} + +export function PasswordExpiryPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'days': value['days'], + 'deny_only': value['denyOnly'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordExpiryPolicyRequest.ts b/packages/client-ts/src/models/PasswordExpiryPolicyRequest.ts new file mode 100644 index 0000000000..c612abd899 --- /dev/null +++ b/packages/client-ts/src/models/PasswordExpiryPolicyRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Expiry Policy Serializer + * @export + * @interface PasswordExpiryPolicyRequest + */ +export interface PasswordExpiryPolicyRequest { + /** + * + * @type {string} + * @memberof PasswordExpiryPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PasswordExpiryPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {number} + * @memberof PasswordExpiryPolicyRequest + */ + days: number; + /** + * + * @type {boolean} + * @memberof PasswordExpiryPolicyRequest + */ + denyOnly?: boolean; +} + +/** + * Check if a given object implements the PasswordExpiryPolicyRequest interface. + */ +export function instanceOfPasswordExpiryPolicyRequest(value: object): value is PasswordExpiryPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('days' in value) || value['days'] === undefined) return false; + return true; +} + +export function PasswordExpiryPolicyRequestFromJSON(json: any): PasswordExpiryPolicyRequest { + return PasswordExpiryPolicyRequestFromJSONTyped(json, false); +} + +export function PasswordExpiryPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordExpiryPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'days': json['days'], + 'denyOnly': json['deny_only'] == null ? undefined : json['deny_only'], + }; +} + +export function PasswordExpiryPolicyRequestToJSON(json: any): PasswordExpiryPolicyRequest { + return PasswordExpiryPolicyRequestToJSONTyped(json, false); +} + +export function PasswordExpiryPolicyRequestToJSONTyped(value?: PasswordExpiryPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'days': value['days'], + 'deny_only': value['denyOnly'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordPolicy.ts b/packages/client-ts/src/models/PasswordPolicy.ts new file mode 100644 index 0000000000..e36f42c3e8 --- /dev/null +++ b/packages/client-ts/src/models/PasswordPolicy.ts @@ -0,0 +1,226 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Policy Serializer + * @export + * @interface PasswordPolicy + */ +export interface PasswordPolicy { + /** + * + * @type {string} + * @memberof PasswordPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof PasswordPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PasswordPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof PasswordPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PasswordPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PasswordPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PasswordPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof PasswordPolicy + */ + readonly boundTo: number; + /** + * Field key to check, field keys defined in Prompt stages are available. + * @type {string} + * @memberof PasswordPolicy + */ + passwordField?: string; + /** + * + * @type {number} + * @memberof PasswordPolicy + */ + amountDigits?: number; + /** + * + * @type {number} + * @memberof PasswordPolicy + */ + amountUppercase?: number; + /** + * + * @type {number} + * @memberof PasswordPolicy + */ + amountLowercase?: number; + /** + * + * @type {number} + * @memberof PasswordPolicy + */ + amountSymbols?: number; + /** + * + * @type {number} + * @memberof PasswordPolicy + */ + lengthMin?: number; + /** + * + * @type {string} + * @memberof PasswordPolicy + */ + symbolCharset?: string; + /** + * + * @type {string} + * @memberof PasswordPolicy + */ + errorMessage?: string; + /** + * + * @type {boolean} + * @memberof PasswordPolicy + */ + checkStaticRules?: boolean; + /** + * + * @type {boolean} + * @memberof PasswordPolicy + */ + checkHaveIBeenPwned?: boolean; + /** + * + * @type {boolean} + * @memberof PasswordPolicy + */ + checkZxcvbn?: boolean; + /** + * How many times the password hash is allowed to be on haveibeenpwned + * @type {number} + * @memberof PasswordPolicy + */ + hibpAllowedCount?: number; + /** + * If the zxcvbn score is equal or less than this value, the policy will fail. + * @type {number} + * @memberof PasswordPolicy + */ + zxcvbnScoreThreshold?: number; +} + +/** + * Check if a given object implements the PasswordPolicy interface. + */ +export function instanceOfPasswordPolicy(value: object): value is PasswordPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + return true; +} + +export function PasswordPolicyFromJSON(json: any): PasswordPolicy { + return PasswordPolicyFromJSONTyped(json, false); +} + +export function PasswordPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'passwordField': json['password_field'] == null ? undefined : json['password_field'], + 'amountDigits': json['amount_digits'] == null ? undefined : json['amount_digits'], + 'amountUppercase': json['amount_uppercase'] == null ? undefined : json['amount_uppercase'], + 'amountLowercase': json['amount_lowercase'] == null ? undefined : json['amount_lowercase'], + 'amountSymbols': json['amount_symbols'] == null ? undefined : json['amount_symbols'], + 'lengthMin': json['length_min'] == null ? undefined : json['length_min'], + 'symbolCharset': json['symbol_charset'] == null ? undefined : json['symbol_charset'], + 'errorMessage': json['error_message'] == null ? undefined : json['error_message'], + 'checkStaticRules': json['check_static_rules'] == null ? undefined : json['check_static_rules'], + 'checkHaveIBeenPwned': json['check_have_i_been_pwned'] == null ? undefined : json['check_have_i_been_pwned'], + 'checkZxcvbn': json['check_zxcvbn'] == null ? undefined : json['check_zxcvbn'], + 'hibpAllowedCount': json['hibp_allowed_count'] == null ? undefined : json['hibp_allowed_count'], + 'zxcvbnScoreThreshold': json['zxcvbn_score_threshold'] == null ? undefined : json['zxcvbn_score_threshold'], + }; +} + +export function PasswordPolicyToJSON(json: any): PasswordPolicy { + return PasswordPolicyToJSONTyped(json, false); +} + +export function PasswordPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'password_field': value['passwordField'], + 'amount_digits': value['amountDigits'], + 'amount_uppercase': value['amountUppercase'], + 'amount_lowercase': value['amountLowercase'], + 'amount_symbols': value['amountSymbols'], + 'length_min': value['lengthMin'], + 'symbol_charset': value['symbolCharset'], + 'error_message': value['errorMessage'], + 'check_static_rules': value['checkStaticRules'], + 'check_have_i_been_pwned': value['checkHaveIBeenPwned'], + 'check_zxcvbn': value['checkZxcvbn'], + 'hibp_allowed_count': value['hibpAllowedCount'], + 'zxcvbn_score_threshold': value['zxcvbnScoreThreshold'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordPolicyRequest.ts b/packages/client-ts/src/models/PasswordPolicyRequest.ts new file mode 100644 index 0000000000..26018797e3 --- /dev/null +++ b/packages/client-ts/src/models/PasswordPolicyRequest.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Policy Serializer + * @export + * @interface PasswordPolicyRequest + */ +export interface PasswordPolicyRequest { + /** + * + * @type {string} + * @memberof PasswordPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PasswordPolicyRequest + */ + executionLogging?: boolean; + /** + * Field key to check, field keys defined in Prompt stages are available. + * @type {string} + * @memberof PasswordPolicyRequest + */ + passwordField?: string; + /** + * + * @type {number} + * @memberof PasswordPolicyRequest + */ + amountDigits?: number; + /** + * + * @type {number} + * @memberof PasswordPolicyRequest + */ + amountUppercase?: number; + /** + * + * @type {number} + * @memberof PasswordPolicyRequest + */ + amountLowercase?: number; + /** + * + * @type {number} + * @memberof PasswordPolicyRequest + */ + amountSymbols?: number; + /** + * + * @type {number} + * @memberof PasswordPolicyRequest + */ + lengthMin?: number; + /** + * + * @type {string} + * @memberof PasswordPolicyRequest + */ + symbolCharset?: string; + /** + * + * @type {string} + * @memberof PasswordPolicyRequest + */ + errorMessage?: string; + /** + * + * @type {boolean} + * @memberof PasswordPolicyRequest + */ + checkStaticRules?: boolean; + /** + * + * @type {boolean} + * @memberof PasswordPolicyRequest + */ + checkHaveIBeenPwned?: boolean; + /** + * + * @type {boolean} + * @memberof PasswordPolicyRequest + */ + checkZxcvbn?: boolean; + /** + * How many times the password hash is allowed to be on haveibeenpwned + * @type {number} + * @memberof PasswordPolicyRequest + */ + hibpAllowedCount?: number; + /** + * If the zxcvbn score is equal or less than this value, the policy will fail. + * @type {number} + * @memberof PasswordPolicyRequest + */ + zxcvbnScoreThreshold?: number; +} + +/** + * Check if a given object implements the PasswordPolicyRequest interface. + */ +export function instanceOfPasswordPolicyRequest(value: object): value is PasswordPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function PasswordPolicyRequestFromJSON(json: any): PasswordPolicyRequest { + return PasswordPolicyRequestFromJSONTyped(json, false); +} + +export function PasswordPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'passwordField': json['password_field'] == null ? undefined : json['password_field'], + 'amountDigits': json['amount_digits'] == null ? undefined : json['amount_digits'], + 'amountUppercase': json['amount_uppercase'] == null ? undefined : json['amount_uppercase'], + 'amountLowercase': json['amount_lowercase'] == null ? undefined : json['amount_lowercase'], + 'amountSymbols': json['amount_symbols'] == null ? undefined : json['amount_symbols'], + 'lengthMin': json['length_min'] == null ? undefined : json['length_min'], + 'symbolCharset': json['symbol_charset'] == null ? undefined : json['symbol_charset'], + 'errorMessage': json['error_message'] == null ? undefined : json['error_message'], + 'checkStaticRules': json['check_static_rules'] == null ? undefined : json['check_static_rules'], + 'checkHaveIBeenPwned': json['check_have_i_been_pwned'] == null ? undefined : json['check_have_i_been_pwned'], + 'checkZxcvbn': json['check_zxcvbn'] == null ? undefined : json['check_zxcvbn'], + 'hibpAllowedCount': json['hibp_allowed_count'] == null ? undefined : json['hibp_allowed_count'], + 'zxcvbnScoreThreshold': json['zxcvbn_score_threshold'] == null ? undefined : json['zxcvbn_score_threshold'], + }; +} + +export function PasswordPolicyRequestToJSON(json: any): PasswordPolicyRequest { + return PasswordPolicyRequestToJSONTyped(json, false); +} + +export function PasswordPolicyRequestToJSONTyped(value?: PasswordPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'password_field': value['passwordField'], + 'amount_digits': value['amountDigits'], + 'amount_uppercase': value['amountUppercase'], + 'amount_lowercase': value['amountLowercase'], + 'amount_symbols': value['amountSymbols'], + 'length_min': value['lengthMin'], + 'symbol_charset': value['symbolCharset'], + 'error_message': value['errorMessage'], + 'check_static_rules': value['checkStaticRules'], + 'check_have_i_been_pwned': value['checkHaveIBeenPwned'], + 'check_zxcvbn': value['checkZxcvbn'], + 'hibp_allowed_count': value['hibpAllowedCount'], + 'zxcvbn_score_threshold': value['zxcvbnScoreThreshold'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordStage.ts b/packages/client-ts/src/models/PasswordStage.ts new file mode 100644 index 0000000000..064a81284e --- /dev/null +++ b/packages/client-ts/src/models/PasswordStage.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { BackendsEnum } from './BackendsEnum'; +import { + BackendsEnumFromJSON, + BackendsEnumFromJSONTyped, + BackendsEnumToJSON, + BackendsEnumToJSONTyped, +} from './BackendsEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * PasswordStage Serializer + * @export + * @interface PasswordStage + */ +export interface PasswordStage { + /** + * + * @type {string} + * @memberof PasswordStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof PasswordStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof PasswordStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PasswordStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PasswordStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PasswordStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof PasswordStage + */ + readonly flowSet: Array; + /** + * Selection of backends to test the password against. + * @type {Array} + * @memberof PasswordStage + */ + backends: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PasswordStage + */ + configureFlow?: string | null; + /** + * 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. + * @type {number} + * @memberof PasswordStage + */ + failedAttemptsBeforeCancel?: number; + /** + * When enabled, provides a 'show password' button with the password input field. + * @type {boolean} + * @memberof PasswordStage + */ + allowShowPassword?: boolean; +} + +/** + * Check if a given object implements the PasswordStage interface. + */ +export function instanceOfPasswordStage(value: object): value is PasswordStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('backends' in value) || value['backends'] === undefined) return false; + return true; +} + +export function PasswordStageFromJSON(json: any): PasswordStage { + return PasswordStageFromJSONTyped(json, false); +} + +export function PasswordStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'backends': ((json['backends'] as Array).map(BackendsEnumFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'failedAttemptsBeforeCancel': json['failed_attempts_before_cancel'] == null ? undefined : json['failed_attempts_before_cancel'], + 'allowShowPassword': json['allow_show_password'] == null ? undefined : json['allow_show_password'], + }; +} + +export function PasswordStageToJSON(json: any): PasswordStage { + return PasswordStageToJSONTyped(json, false); +} + +export function PasswordStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'backends': ((value['backends'] as Array).map(BackendsEnumToJSON)), + 'configure_flow': value['configureFlow'], + 'failed_attempts_before_cancel': value['failedAttemptsBeforeCancel'], + 'allow_show_password': value['allowShowPassword'], + }; +} + diff --git a/packages/client-ts/src/models/PasswordStageRequest.ts b/packages/client-ts/src/models/PasswordStageRequest.ts new file mode 100644 index 0000000000..7672d2c816 --- /dev/null +++ b/packages/client-ts/src/models/PasswordStageRequest.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { BackendsEnum } from './BackendsEnum'; +import { + BackendsEnumFromJSON, + BackendsEnumFromJSONTyped, + BackendsEnumToJSON, + BackendsEnumToJSONTyped, +} from './BackendsEnum'; + +/** + * PasswordStage Serializer + * @export + * @interface PasswordStageRequest + */ +export interface PasswordStageRequest { + /** + * + * @type {string} + * @memberof PasswordStageRequest + */ + name: string; + /** + * Selection of backends to test the password against. + * @type {Array} + * @memberof PasswordStageRequest + */ + backends: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PasswordStageRequest + */ + configureFlow?: string | null; + /** + * 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. + * @type {number} + * @memberof PasswordStageRequest + */ + failedAttemptsBeforeCancel?: number; + /** + * When enabled, provides a 'show password' button with the password input field. + * @type {boolean} + * @memberof PasswordStageRequest + */ + allowShowPassword?: boolean; +} + +/** + * Check if a given object implements the PasswordStageRequest interface. + */ +export function instanceOfPasswordStageRequest(value: object): value is PasswordStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('backends' in value) || value['backends'] === undefined) return false; + return true; +} + +export function PasswordStageRequestFromJSON(json: any): PasswordStageRequest { + return PasswordStageRequestFromJSONTyped(json, false); +} + +export function PasswordStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'backends': ((json['backends'] as Array).map(BackendsEnumFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'failedAttemptsBeforeCancel': json['failed_attempts_before_cancel'] == null ? undefined : json['failed_attempts_before_cancel'], + 'allowShowPassword': json['allow_show_password'] == null ? undefined : json['allow_show_password'], + }; +} + +export function PasswordStageRequestToJSON(json: any): PasswordStageRequest { + return PasswordStageRequestToJSONTyped(json, false); +} + +export function PasswordStageRequestToJSONTyped(value?: PasswordStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'backends': ((value['backends'] as Array).map(BackendsEnumToJSON)), + 'configure_flow': value['configureFlow'], + 'failed_attempts_before_cancel': value['failedAttemptsBeforeCancel'], + 'allow_show_password': value['allowShowPassword'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAgentConnectorRequest.ts b/packages/client-ts/src/models/PatchedAgentConnectorRequest.ts new file mode 100644 index 0000000000..1fef5eeeac --- /dev/null +++ b/packages/client-ts/src/models/PatchedAgentConnectorRequest.ts @@ -0,0 +1,169 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PatchedAgentConnectorRequest + */ +export interface PatchedAgentConnectorRequest { + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedAgentConnectorRequest + */ + enabled?: boolean; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + snapshotExpiry?: string; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + authSessionDuration?: string; + /** + * + * @type {boolean} + * @memberof PatchedAgentConnectorRequest + */ + authTerminateSessionOnExpiry?: boolean; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + refreshInterval?: string; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + authorizationFlow?: string | null; + /** + * + * @type {number} + * @memberof PatchedAgentConnectorRequest + */ + nssUidOffset?: number; + /** + * + * @type {number} + * @memberof PatchedAgentConnectorRequest + */ + nssGidOffset?: number; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + challengeKey?: string | null; + /** + * + * @type {string} + * @memberof PatchedAgentConnectorRequest + */ + challengeIdleTimeout?: string; + /** + * + * @type {boolean} + * @memberof PatchedAgentConnectorRequest + */ + challengeTriggerCheckIn?: boolean; + /** + * + * @type {Array} + * @memberof PatchedAgentConnectorRequest + */ + jwtFederationProviders?: Array; +} + +/** + * Check if a given object implements the PatchedAgentConnectorRequest interface. + */ +export function instanceOfPatchedAgentConnectorRequest(value: object): value is PatchedAgentConnectorRequest { + return true; +} + +export function PatchedAgentConnectorRequestFromJSON(json: any): PatchedAgentConnectorRequest { + return PatchedAgentConnectorRequestFromJSONTyped(json, false); +} + +export function PatchedAgentConnectorRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAgentConnectorRequest { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'] == null ? undefined : json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'snapshotExpiry': json['snapshot_expiry'] == null ? undefined : json['snapshot_expiry'], + 'authSessionDuration': json['auth_session_duration'] == null ? undefined : json['auth_session_duration'], + 'authTerminateSessionOnExpiry': json['auth_terminate_session_on_expiry'] == null ? undefined : json['auth_terminate_session_on_expiry'], + 'refreshInterval': json['refresh_interval'] == null ? undefined : json['refresh_interval'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'nssUidOffset': json['nss_uid_offset'] == null ? undefined : json['nss_uid_offset'], + 'nssGidOffset': json['nss_gid_offset'] == null ? undefined : json['nss_gid_offset'], + 'challengeKey': json['challenge_key'] == null ? undefined : json['challenge_key'], + 'challengeIdleTimeout': json['challenge_idle_timeout'] == null ? undefined : json['challenge_idle_timeout'], + 'challengeTriggerCheckIn': json['challenge_trigger_check_in'] == null ? undefined : json['challenge_trigger_check_in'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + }; +} + +export function PatchedAgentConnectorRequestToJSON(json: any): PatchedAgentConnectorRequest { + return PatchedAgentConnectorRequestToJSONTyped(json, false); +} + +export function PatchedAgentConnectorRequestToJSONTyped(value?: PatchedAgentConnectorRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'snapshot_expiry': value['snapshotExpiry'], + 'auth_session_duration': value['authSessionDuration'], + 'auth_terminate_session_on_expiry': value['authTerminateSessionOnExpiry'], + 'refresh_interval': value['refreshInterval'], + 'authorization_flow': value['authorizationFlow'], + 'nss_uid_offset': value['nssUidOffset'], + 'nss_gid_offset': value['nssGidOffset'], + 'challenge_key': value['challengeKey'], + 'challenge_idle_timeout': value['challengeIdleTimeout'], + 'challenge_trigger_check_in': value['challengeTriggerCheckIn'], + 'jwt_federation_providers': value['jwtFederationProviders'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedApplicationEntitlementRequest.ts b/packages/client-ts/src/models/PatchedApplicationEntitlementRequest.ts new file mode 100644 index 0000000000..a0124ca39e --- /dev/null +++ b/packages/client-ts/src/models/PatchedApplicationEntitlementRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ApplicationEntitlement Serializer + * @export + * @interface PatchedApplicationEntitlementRequest + */ +export interface PatchedApplicationEntitlementRequest { + /** + * + * @type {string} + * @memberof PatchedApplicationEntitlementRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedApplicationEntitlementRequest + */ + app?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedApplicationEntitlementRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedApplicationEntitlementRequest interface. + */ +export function instanceOfPatchedApplicationEntitlementRequest(value: object): value is PatchedApplicationEntitlementRequest { + return true; +} + +export function PatchedApplicationEntitlementRequestFromJSON(json: any): PatchedApplicationEntitlementRequest { + return PatchedApplicationEntitlementRequestFromJSONTyped(json, false); +} + +export function PatchedApplicationEntitlementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedApplicationEntitlementRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'app': json['app'] == null ? undefined : json['app'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PatchedApplicationEntitlementRequestToJSON(json: any): PatchedApplicationEntitlementRequest { + return PatchedApplicationEntitlementRequestToJSONTyped(json, false); +} + +export function PatchedApplicationEntitlementRequestToJSONTyped(value?: PatchedApplicationEntitlementRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'app': value['app'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedApplicationRequest.ts b/packages/client-ts/src/models/PatchedApplicationRequest.ts new file mode 100644 index 0000000000..c7bb237fc0 --- /dev/null +++ b/packages/client-ts/src/models/PatchedApplicationRequest.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; + +/** + * Application Serializer + * @export + * @interface PatchedApplicationRequest + */ +export interface PatchedApplicationRequest { + /** + * Application's display Name. + * @type {string} + * @memberof PatchedApplicationRequest + */ + name?: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof PatchedApplicationRequest + */ + slug?: string; + /** + * + * @type {number} + * @memberof PatchedApplicationRequest + */ + provider?: number | null; + /** + * + * @type {Array} + * @memberof PatchedApplicationRequest + */ + backchannelProviders?: Array; + /** + * Open launch URL in a new browser tab or window. + * @type {boolean} + * @memberof PatchedApplicationRequest + */ + openInNewTab?: boolean; + /** + * + * @type {string} + * @memberof PatchedApplicationRequest + */ + metaLaunchUrl?: string; + /** + * + * @type {string} + * @memberof PatchedApplicationRequest + */ + metaIcon?: string; + /** + * + * @type {string} + * @memberof PatchedApplicationRequest + */ + metaDescription?: string; + /** + * + * @type {string} + * @memberof PatchedApplicationRequest + */ + metaPublisher?: string; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedApplicationRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * + * @type {string} + * @memberof PatchedApplicationRequest + */ + group?: string; +} + + + +/** + * Check if a given object implements the PatchedApplicationRequest interface. + */ +export function instanceOfPatchedApplicationRequest(value: object): value is PatchedApplicationRequest { + return true; +} + +export function PatchedApplicationRequestFromJSON(json: any): PatchedApplicationRequest { + return PatchedApplicationRequestFromJSONTyped(json, false); +} + +export function PatchedApplicationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedApplicationRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'provider': json['provider'] == null ? undefined : json['provider'], + 'backchannelProviders': json['backchannel_providers'] == null ? undefined : json['backchannel_providers'], + 'openInNewTab': json['open_in_new_tab'] == null ? undefined : json['open_in_new_tab'], + 'metaLaunchUrl': json['meta_launch_url'] == null ? undefined : json['meta_launch_url'], + 'metaIcon': json['meta_icon'] == null ? undefined : json['meta_icon'], + 'metaDescription': json['meta_description'] == null ? undefined : json['meta_description'], + 'metaPublisher': json['meta_publisher'] == null ? undefined : json['meta_publisher'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'group': json['group'] == null ? undefined : json['group'], + }; +} + +export function PatchedApplicationRequestToJSON(json: any): PatchedApplicationRequest { + return PatchedApplicationRequestToJSONTyped(json, false); +} + +export function PatchedApplicationRequestToJSONTyped(value?: PatchedApplicationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'provider': value['provider'], + 'backchannel_providers': value['backchannelProviders'], + 'open_in_new_tab': value['openInNewTab'], + 'meta_launch_url': value['metaLaunchUrl'], + 'meta_icon': value['metaIcon'], + 'meta_description': value['metaDescription'], + 'meta_publisher': value['metaPublisher'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'group': value['group'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorDuoStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorDuoStageRequest.ts new file mode 100644 index 0000000000..a47763cdc0 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorDuoStageRequest.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorDuoStage Serializer + * @export + * @interface PatchedAuthenticatorDuoStageRequest + */ +export interface PatchedAuthenticatorDuoStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + friendlyName?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + clientId?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + clientSecret?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + apiHostname?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + adminIntegrationKey?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorDuoStageRequest + */ + adminSecretKey?: string; +} + +/** + * Check if a given object implements the PatchedAuthenticatorDuoStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorDuoStageRequest(value: object): value is PatchedAuthenticatorDuoStageRequest { + return true; +} + +export function PatchedAuthenticatorDuoStageRequestFromJSON(json: any): PatchedAuthenticatorDuoStageRequest { + return PatchedAuthenticatorDuoStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorDuoStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorDuoStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'], + 'apiHostname': json['api_hostname'] == null ? undefined : json['api_hostname'], + 'adminIntegrationKey': json['admin_integration_key'] == null ? undefined : json['admin_integration_key'], + 'adminSecretKey': json['admin_secret_key'] == null ? undefined : json['admin_secret_key'], + }; +} + +export function PatchedAuthenticatorDuoStageRequestToJSON(json: any): PatchedAuthenticatorDuoStageRequest { + return PatchedAuthenticatorDuoStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorDuoStageRequestToJSONTyped(value?: PatchedAuthenticatorDuoStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'api_hostname': value['apiHostname'], + 'admin_integration_key': value['adminIntegrationKey'], + 'admin_secret_key': value['adminSecretKey'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorEmailStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorEmailStageRequest.ts new file mode 100644 index 0000000000..62146d73a1 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorEmailStageRequest.ts @@ -0,0 +1,177 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorEmailStage Serializer + * @export + * @interface PatchedAuthenticatorEmailStageRequest + */ +export interface PatchedAuthenticatorEmailStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + friendlyName?: string; + /** + * When enabled, global Email connection settings will be used and connection settings below will be ignored. + * @type {boolean} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + useGlobalSettings?: boolean; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + host?: string; + /** + * + * @type {number} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + port?: number; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + password?: string; + /** + * + * @type {boolean} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + useTls?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + useSsl?: boolean; + /** + * + * @type {number} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + timeout?: number; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + fromAddress?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + subject?: string; + /** + * Time the token sent is valid (Format: hours=3,minutes=17,seconds=300). + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + tokenExpiry?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEmailStageRequest + */ + template?: string; +} + +/** + * Check if a given object implements the PatchedAuthenticatorEmailStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorEmailStageRequest(value: object): value is PatchedAuthenticatorEmailStageRequest { + return true; +} + +export function PatchedAuthenticatorEmailStageRequestFromJSON(json: any): PatchedAuthenticatorEmailStageRequest { + return PatchedAuthenticatorEmailStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorEmailStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorEmailStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'useGlobalSettings': json['use_global_settings'] == null ? undefined : json['use_global_settings'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'username': json['username'] == null ? undefined : json['username'], + 'password': json['password'] == null ? undefined : json['password'], + 'useTls': json['use_tls'] == null ? undefined : json['use_tls'], + 'useSsl': json['use_ssl'] == null ? undefined : json['use_ssl'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'fromAddress': json['from_address'] == null ? undefined : json['from_address'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'tokenExpiry': json['token_expiry'] == null ? undefined : json['token_expiry'], + 'template': json['template'] == null ? undefined : json['template'], + }; +} + +export function PatchedAuthenticatorEmailStageRequestToJSON(json: any): PatchedAuthenticatorEmailStageRequest { + return PatchedAuthenticatorEmailStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorEmailStageRequestToJSONTyped(value?: PatchedAuthenticatorEmailStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'use_global_settings': value['useGlobalSettings'], + 'host': value['host'], + 'port': value['port'], + 'username': value['username'], + 'password': value['password'], + 'use_tls': value['useTls'], + 'use_ssl': value['useSsl'], + 'timeout': value['timeout'], + 'from_address': value['fromAddress'], + 'subject': value['subject'], + 'token_expiry': value['tokenExpiry'], + 'template': value['template'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorEndpointGDTCStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorEndpointGDTCStageRequest.ts new file mode 100644 index 0000000000..0d6c6173cc --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorEndpointGDTCStageRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorEndpointGDTCStage Serializer + * @export + * @interface PatchedAuthenticatorEndpointGDTCStageRequest + */ +export interface PatchedAuthenticatorEndpointGDTCStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEndpointGDTCStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorEndpointGDTCStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorEndpointGDTCStageRequest + */ + friendlyName?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedAuthenticatorEndpointGDTCStageRequest + */ + credentials?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedAuthenticatorEndpointGDTCStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorEndpointGDTCStageRequest(value: object): value is PatchedAuthenticatorEndpointGDTCStageRequest { + return true; +} + +export function PatchedAuthenticatorEndpointGDTCStageRequestFromJSON(json: any): PatchedAuthenticatorEndpointGDTCStageRequest { + return PatchedAuthenticatorEndpointGDTCStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorEndpointGDTCStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorEndpointGDTCStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'credentials': json['credentials'] == null ? undefined : json['credentials'], + }; +} + +export function PatchedAuthenticatorEndpointGDTCStageRequestToJSON(json: any): PatchedAuthenticatorEndpointGDTCStageRequest { + return PatchedAuthenticatorEndpointGDTCStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorEndpointGDTCStageRequestToJSONTyped(value?: PatchedAuthenticatorEndpointGDTCStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'credentials': value['credentials'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorSMSStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorSMSStageRequest.ts new file mode 100644 index 0000000000..6986186d50 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorSMSStageRequest.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ProviderEnum } from './ProviderEnum'; +import { + ProviderEnumFromJSON, + ProviderEnumFromJSONTyped, + ProviderEnumToJSON, + ProviderEnumToJSONTyped, +} from './ProviderEnum'; +import type { AuthTypeEnum } from './AuthTypeEnum'; +import { + AuthTypeEnumFromJSON, + AuthTypeEnumFromJSONTyped, + AuthTypeEnumToJSON, + AuthTypeEnumToJSONTyped, +} from './AuthTypeEnum'; + +/** + * AuthenticatorSMSStage Serializer + * @export + * @interface PatchedAuthenticatorSMSStageRequest + */ +export interface PatchedAuthenticatorSMSStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + friendlyName?: string; + /** + * + * @type {ProviderEnum} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + provider?: ProviderEnum; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + fromNumber?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + accountSid?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + auth?: string; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + authPassword?: string; + /** + * + * @type {AuthTypeEnum} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + 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. + * @type {boolean} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + verifyOnly?: boolean; + /** + * Optionally modify the payload being sent to custom providers. + * @type {string} + * @memberof PatchedAuthenticatorSMSStageRequest + */ + mapping?: string | null; +} + + + +/** + * Check if a given object implements the PatchedAuthenticatorSMSStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorSMSStageRequest(value: object): value is PatchedAuthenticatorSMSStageRequest { + return true; +} + +export function PatchedAuthenticatorSMSStageRequestFromJSON(json: any): PatchedAuthenticatorSMSStageRequest { + return PatchedAuthenticatorSMSStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorSMSStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorSMSStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'provider': json['provider'] == null ? undefined : ProviderEnumFromJSON(json['provider']), + 'fromNumber': json['from_number'] == null ? undefined : json['from_number'], + 'accountSid': json['account_sid'] == null ? undefined : json['account_sid'], + 'auth': json['auth'] == null ? undefined : json['auth'], + 'authPassword': json['auth_password'] == null ? undefined : json['auth_password'], + 'authType': json['auth_type'] == null ? undefined : AuthTypeEnumFromJSON(json['auth_type']), + 'verifyOnly': json['verify_only'] == null ? undefined : json['verify_only'], + 'mapping': json['mapping'] == null ? undefined : json['mapping'], + }; +} + +export function PatchedAuthenticatorSMSStageRequestToJSON(json: any): PatchedAuthenticatorSMSStageRequest { + return PatchedAuthenticatorSMSStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorSMSStageRequestToJSONTyped(value?: PatchedAuthenticatorSMSStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'provider': ProviderEnumToJSON(value['provider']), + 'from_number': value['fromNumber'], + 'account_sid': value['accountSid'], + 'auth': value['auth'], + 'auth_password': value['authPassword'], + 'auth_type': AuthTypeEnumToJSON(value['authType']), + 'verify_only': value['verifyOnly'], + 'mapping': value['mapping'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorStaticStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorStaticStageRequest.ts new file mode 100644 index 0000000000..4a024295f7 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorStaticStageRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * AuthenticatorStaticStage Serializer + * @export + * @interface PatchedAuthenticatorStaticStageRequest + */ +export interface PatchedAuthenticatorStaticStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorStaticStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorStaticStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorStaticStageRequest + */ + friendlyName?: string; + /** + * + * @type {number} + * @memberof PatchedAuthenticatorStaticStageRequest + */ + tokenCount?: number; + /** + * + * @type {number} + * @memberof PatchedAuthenticatorStaticStageRequest + */ + tokenLength?: number; +} + +/** + * Check if a given object implements the PatchedAuthenticatorStaticStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorStaticStageRequest(value: object): value is PatchedAuthenticatorStaticStageRequest { + return true; +} + +export function PatchedAuthenticatorStaticStageRequestFromJSON(json: any): PatchedAuthenticatorStaticStageRequest { + return PatchedAuthenticatorStaticStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorStaticStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorStaticStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'tokenCount': json['token_count'] == null ? undefined : json['token_count'], + 'tokenLength': json['token_length'] == null ? undefined : json['token_length'], + }; +} + +export function PatchedAuthenticatorStaticStageRequestToJSON(json: any): PatchedAuthenticatorStaticStageRequest { + return PatchedAuthenticatorStaticStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorStaticStageRequestToJSONTyped(value?: PatchedAuthenticatorStaticStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'token_count': value['tokenCount'], + 'token_length': value['tokenLength'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorTOTPStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorTOTPStageRequest.ts new file mode 100644 index 0000000000..b134036c54 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorTOTPStageRequest.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigitsEnum } from './DigitsEnum'; +import { + DigitsEnumFromJSON, + DigitsEnumFromJSONTyped, + DigitsEnumToJSON, + DigitsEnumToJSONTyped, +} from './DigitsEnum'; + +/** + * AuthenticatorTOTPStage Serializer + * @export + * @interface PatchedAuthenticatorTOTPStageRequest + */ +export interface PatchedAuthenticatorTOTPStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorTOTPStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorTOTPStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorTOTPStageRequest + */ + friendlyName?: string; + /** + * + * @type {DigitsEnum} + * @memberof PatchedAuthenticatorTOTPStageRequest + */ + digits?: DigitsEnum; +} + + + +/** + * Check if a given object implements the PatchedAuthenticatorTOTPStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorTOTPStageRequest(value: object): value is PatchedAuthenticatorTOTPStageRequest { + return true; +} + +export function PatchedAuthenticatorTOTPStageRequestFromJSON(json: any): PatchedAuthenticatorTOTPStageRequest { + return PatchedAuthenticatorTOTPStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorTOTPStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorTOTPStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'digits': json['digits'] == null ? undefined : DigitsEnumFromJSON(json['digits']), + }; +} + +export function PatchedAuthenticatorTOTPStageRequestToJSON(json: any): PatchedAuthenticatorTOTPStageRequest { + return PatchedAuthenticatorTOTPStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorTOTPStageRequestToJSONTyped(value?: PatchedAuthenticatorTOTPStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'digits': DigitsEnumToJSON(value['digits']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorValidateStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorValidateStageRequest.ts new file mode 100644 index 0000000000..8663af8781 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorValidateStageRequest.ts @@ -0,0 +1,152 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WebAuthnHintEnum } from './WebAuthnHintEnum'; +import { + WebAuthnHintEnumFromJSON, + WebAuthnHintEnumFromJSONTyped, + WebAuthnHintEnumToJSON, + WebAuthnHintEnumToJSONTyped, +} from './WebAuthnHintEnum'; +import type { UserVerificationEnum } from './UserVerificationEnum'; +import { + UserVerificationEnumFromJSON, + UserVerificationEnumFromJSONTyped, + UserVerificationEnumToJSON, + UserVerificationEnumToJSONTyped, +} from './UserVerificationEnum'; +import type { NotConfiguredActionEnum } from './NotConfiguredActionEnum'; +import { + NotConfiguredActionEnumFromJSON, + NotConfiguredActionEnumFromJSONTyped, + NotConfiguredActionEnumToJSON, + NotConfiguredActionEnumToJSONTyped, +} from './NotConfiguredActionEnum'; +import type { DeviceClassesEnum } from './DeviceClassesEnum'; +import { + DeviceClassesEnumFromJSON, + DeviceClassesEnumFromJSONTyped, + DeviceClassesEnumToJSON, + DeviceClassesEnumToJSONTyped, +} from './DeviceClassesEnum'; + +/** + * AuthenticatorValidateStage Serializer + * @export + * @interface PatchedAuthenticatorValidateStageRequest + */ +export interface PatchedAuthenticatorValidateStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + name?: string; + /** + * + * @type {NotConfiguredActionEnum} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + notConfiguredAction?: NotConfiguredActionEnum; + /** + * Device classes which can be used to authenticate + * @type {Array} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + deviceClasses?: Array; + /** + * Stages used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again. + * @type {Array} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + configurationStages?: Array; + /** + * If any of the user's device has been used within this threshold, this stage will be skipped + * @type {string} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + lastAuthThreshold?: string; + /** + * Enforce user verification for WebAuthn devices. + * @type {UserVerificationEnum} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + webauthnUserVerification?: UserVerificationEnum; + /** + * + * @type {Array} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + webauthnHints?: Array; + /** + * + * @type {Array} + * @memberof PatchedAuthenticatorValidateStageRequest + */ + webauthnAllowedDeviceTypes?: Array; +} + + + +/** + * Check if a given object implements the PatchedAuthenticatorValidateStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorValidateStageRequest(value: object): value is PatchedAuthenticatorValidateStageRequest { + return true; +} + +export function PatchedAuthenticatorValidateStageRequestFromJSON(json: any): PatchedAuthenticatorValidateStageRequest { + return PatchedAuthenticatorValidateStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorValidateStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorValidateStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'notConfiguredAction': json['not_configured_action'] == null ? undefined : NotConfiguredActionEnumFromJSON(json['not_configured_action']), + 'deviceClasses': json['device_classes'] == null ? undefined : ((json['device_classes'] as Array).map(DeviceClassesEnumFromJSON)), + 'configurationStages': json['configuration_stages'] == null ? undefined : json['configuration_stages'], + 'lastAuthThreshold': json['last_auth_threshold'] == null ? undefined : json['last_auth_threshold'], + 'webauthnUserVerification': json['webauthn_user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['webauthn_user_verification']), + 'webauthnHints': json['webauthn_hints'] == null ? undefined : ((json['webauthn_hints'] as Array).map(WebAuthnHintEnumFromJSON)), + 'webauthnAllowedDeviceTypes': json['webauthn_allowed_device_types'] == null ? undefined : json['webauthn_allowed_device_types'], + }; +} + +export function PatchedAuthenticatorValidateStageRequestToJSON(json: any): PatchedAuthenticatorValidateStageRequest { + return PatchedAuthenticatorValidateStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorValidateStageRequestToJSONTyped(value?: PatchedAuthenticatorValidateStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'not_configured_action': NotConfiguredActionEnumToJSON(value['notConfiguredAction']), + 'device_classes': value['deviceClasses'] == null ? undefined : ((value['deviceClasses'] as Array).map(DeviceClassesEnumToJSON)), + 'configuration_stages': value['configurationStages'], + 'last_auth_threshold': value['lastAuthThreshold'], + 'webauthn_user_verification': UserVerificationEnumToJSON(value['webauthnUserVerification']), + 'webauthn_hints': value['webauthnHints'] == null ? undefined : ((value['webauthnHints'] as Array).map(WebAuthnHintEnumToJSON)), + 'webauthn_allowed_device_types': value['webauthnAllowedDeviceTypes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedAuthenticatorWebAuthnStageRequest.ts b/packages/client-ts/src/models/PatchedAuthenticatorWebAuthnStageRequest.ts new file mode 100644 index 0000000000..5e0ba99528 --- /dev/null +++ b/packages/client-ts/src/models/PatchedAuthenticatorWebAuthnStageRequest.ts @@ -0,0 +1,153 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WebAuthnHintEnum } from './WebAuthnHintEnum'; +import { + WebAuthnHintEnumFromJSON, + WebAuthnHintEnumFromJSONTyped, + WebAuthnHintEnumToJSON, + WebAuthnHintEnumToJSONTyped, +} from './WebAuthnHintEnum'; +import type { UserVerificationEnum } from './UserVerificationEnum'; +import { + UserVerificationEnumFromJSON, + UserVerificationEnumFromJSONTyped, + UserVerificationEnumToJSON, + UserVerificationEnumToJSONTyped, +} from './UserVerificationEnum'; +import type { AuthenticatorAttachmentEnum } from './AuthenticatorAttachmentEnum'; +import { + AuthenticatorAttachmentEnumFromJSON, + AuthenticatorAttachmentEnumFromJSONTyped, + AuthenticatorAttachmentEnumToJSON, + AuthenticatorAttachmentEnumToJSONTyped, +} from './AuthenticatorAttachmentEnum'; + +/** + * AuthenticatorWebAuthnStage Serializer + * @export + * @interface PatchedAuthenticatorWebAuthnStageRequest + */ +export interface PatchedAuthenticatorWebAuthnStageRequest { + /** + * + * @type {string} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + name?: string; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + configureFlow?: string | null; + /** + * + * @type {string} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + friendlyName?: string; + /** + * + * @type {UserVerificationEnum} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + userVerification?: UserVerificationEnum; + /** + * + * @type {AuthenticatorAttachmentEnum} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + authenticatorAttachment?: AuthenticatorAttachmentEnum | null; + /** + * + * @type {UserVerificationEnum} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + residentKeyRequirement?: UserVerificationEnum; + /** + * + * @type {Array} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + hints?: Array; + /** + * + * @type {Array} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + deviceTypeRestrictions?: Array; + /** + * + * @type {number} + * @memberof PatchedAuthenticatorWebAuthnStageRequest + */ + maxAttempts?: number; +} + + + +/** + * Check if a given object implements the PatchedAuthenticatorWebAuthnStageRequest interface. + */ +export function instanceOfPatchedAuthenticatorWebAuthnStageRequest(value: object): value is PatchedAuthenticatorWebAuthnStageRequest { + return true; +} + +export function PatchedAuthenticatorWebAuthnStageRequestFromJSON(json: any): PatchedAuthenticatorWebAuthnStageRequest { + return PatchedAuthenticatorWebAuthnStageRequestFromJSONTyped(json, false); +} + +export function PatchedAuthenticatorWebAuthnStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAuthenticatorWebAuthnStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + 'userVerification': json['user_verification'] == null ? undefined : UserVerificationEnumFromJSON(json['user_verification']), + 'authenticatorAttachment': json['authenticator_attachment'] == null ? undefined : AuthenticatorAttachmentEnumFromJSON(json['authenticator_attachment']), + 'residentKeyRequirement': json['resident_key_requirement'] == null ? undefined : UserVerificationEnumFromJSON(json['resident_key_requirement']), + 'hints': json['hints'] == null ? undefined : ((json['hints'] as Array).map(WebAuthnHintEnumFromJSON)), + 'deviceTypeRestrictions': json['device_type_restrictions'] == null ? undefined : json['device_type_restrictions'], + 'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'], + }; +} + +export function PatchedAuthenticatorWebAuthnStageRequestToJSON(json: any): PatchedAuthenticatorWebAuthnStageRequest { + return PatchedAuthenticatorWebAuthnStageRequestToJSONTyped(json, false); +} + +export function PatchedAuthenticatorWebAuthnStageRequestToJSONTyped(value?: PatchedAuthenticatorWebAuthnStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'configure_flow': value['configureFlow'], + 'friendly_name': value['friendlyName'], + 'user_verification': UserVerificationEnumToJSON(value['userVerification']), + 'authenticator_attachment': AuthenticatorAttachmentEnumToJSON(value['authenticatorAttachment']), + 'resident_key_requirement': UserVerificationEnumToJSON(value['residentKeyRequirement']), + 'hints': value['hints'] == null ? undefined : ((value['hints'] as Array).map(WebAuthnHintEnumToJSON)), + 'device_type_restrictions': value['deviceTypeRestrictions'], + 'max_attempts': value['maxAttempts'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedBlueprintInstanceRequest.ts b/packages/client-ts/src/models/PatchedBlueprintInstanceRequest.ts new file mode 100644 index 0000000000..f9fd577c87 --- /dev/null +++ b/packages/client-ts/src/models/PatchedBlueprintInstanceRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Info about a single blueprint instance file + * @export + * @interface PatchedBlueprintInstanceRequest + */ +export interface PatchedBlueprintInstanceRequest { + /** + * + * @type {string} + * @memberof PatchedBlueprintInstanceRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedBlueprintInstanceRequest + */ + path?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedBlueprintInstanceRequest + */ + context?: { [key: string]: any; }; + /** + * + * @type {boolean} + * @memberof PatchedBlueprintInstanceRequest + */ + enabled?: boolean; + /** + * + * @type {string} + * @memberof PatchedBlueprintInstanceRequest + */ + content?: string; +} + +/** + * Check if a given object implements the PatchedBlueprintInstanceRequest interface. + */ +export function instanceOfPatchedBlueprintInstanceRequest(value: object): value is PatchedBlueprintInstanceRequest { + return true; +} + +export function PatchedBlueprintInstanceRequestFromJSON(json: any): PatchedBlueprintInstanceRequest { + return PatchedBlueprintInstanceRequestFromJSONTyped(json, false); +} + +export function PatchedBlueprintInstanceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedBlueprintInstanceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'path': json['path'] == null ? undefined : json['path'], + 'context': json['context'] == null ? undefined : json['context'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'content': json['content'] == null ? undefined : json['content'], + }; +} + +export function PatchedBlueprintInstanceRequestToJSON(json: any): PatchedBlueprintInstanceRequest { + return PatchedBlueprintInstanceRequestToJSONTyped(json, false); +} + +export function PatchedBlueprintInstanceRequestToJSONTyped(value?: PatchedBlueprintInstanceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'path': value['path'], + 'context': value['context'], + 'enabled': value['enabled'], + 'content': value['content'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedBrandRequest.ts b/packages/client-ts/src/models/PatchedBrandRequest.ts new file mode 100644 index 0000000000..bd22a93d3d --- /dev/null +++ b/packages/client-ts/src/models/PatchedBrandRequest.ts @@ -0,0 +1,193 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Brand Serializer + * @export + * @interface PatchedBrandRequest + */ +export interface PatchedBrandRequest { + /** + * Domain that activates this brand. Can be a superset, i.e. `a.b` for `aa.b` and `ba.b` + * @type {string} + * @memberof PatchedBrandRequest + */ + domain?: string; + /** + * + * @type {boolean} + * @memberof PatchedBrandRequest + */ + _default?: boolean; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + brandingTitle?: string; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + brandingLogo?: string; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + brandingFavicon?: string; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + brandingCustomCss?: string; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + brandingDefaultFlowBackground?: string; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + flowAuthentication?: string | null; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + flowInvalidation?: string | null; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + flowRecovery?: string | null; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + flowUnenrollment?: string | null; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + flowUserSettings?: string | null; + /** + * + * @type {string} + * @memberof PatchedBrandRequest + */ + flowDeviceCode?: string | null; + /** + * When set, external users will be redirected to this application after authenticating. + * @type {string} + * @memberof PatchedBrandRequest + */ + defaultApplication?: string | null; + /** + * Web Certificate used by the authentik Core webserver. + * @type {string} + * @memberof PatchedBrandRequest + */ + webCertificate?: string | null; + /** + * Certificates used for client authentication. + * @type {Array} + * @memberof PatchedBrandRequest + */ + clientCertificates?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedBrandRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedBrandRequest interface. + */ +export function instanceOfPatchedBrandRequest(value: object): value is PatchedBrandRequest { + return true; +} + +export function PatchedBrandRequestFromJSON(json: any): PatchedBrandRequest { + return PatchedBrandRequestFromJSONTyped(json, false); +} + +export function PatchedBrandRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedBrandRequest { + if (json == null) { + return json; + } + return { + + 'domain': json['domain'] == null ? undefined : json['domain'], + '_default': json['default'] == null ? undefined : json['default'], + 'brandingTitle': json['branding_title'] == null ? undefined : json['branding_title'], + 'brandingLogo': json['branding_logo'] == null ? undefined : json['branding_logo'], + 'brandingFavicon': json['branding_favicon'] == null ? undefined : json['branding_favicon'], + 'brandingCustomCss': json['branding_custom_css'] == null ? undefined : json['branding_custom_css'], + 'brandingDefaultFlowBackground': json['branding_default_flow_background'] == null ? undefined : json['branding_default_flow_background'], + 'flowAuthentication': json['flow_authentication'] == null ? undefined : json['flow_authentication'], + 'flowInvalidation': json['flow_invalidation'] == null ? undefined : json['flow_invalidation'], + 'flowRecovery': json['flow_recovery'] == null ? undefined : json['flow_recovery'], + 'flowUnenrollment': json['flow_unenrollment'] == null ? undefined : json['flow_unenrollment'], + 'flowUserSettings': json['flow_user_settings'] == null ? undefined : json['flow_user_settings'], + 'flowDeviceCode': json['flow_device_code'] == null ? undefined : json['flow_device_code'], + 'defaultApplication': json['default_application'] == null ? undefined : json['default_application'], + 'webCertificate': json['web_certificate'] == null ? undefined : json['web_certificate'], + 'clientCertificates': json['client_certificates'] == null ? undefined : json['client_certificates'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PatchedBrandRequestToJSON(json: any): PatchedBrandRequest { + return PatchedBrandRequestToJSONTyped(json, false); +} + +export function PatchedBrandRequestToJSONTyped(value?: PatchedBrandRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'domain': value['domain'], + 'default': value['_default'], + 'branding_title': value['brandingTitle'], + 'branding_logo': value['brandingLogo'], + 'branding_favicon': value['brandingFavicon'], + 'branding_custom_css': value['brandingCustomCss'], + 'branding_default_flow_background': value['brandingDefaultFlowBackground'], + 'flow_authentication': value['flowAuthentication'], + 'flow_invalidation': value['flowInvalidation'], + 'flow_recovery': value['flowRecovery'], + 'flow_unenrollment': value['flowUnenrollment'], + 'flow_user_settings': value['flowUserSettings'], + 'flow_device_code': value['flowDeviceCode'], + 'default_application': value['defaultApplication'], + 'web_certificate': value['webCertificate'], + 'client_certificates': value['clientCertificates'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedCaptchaStageRequest.ts b/packages/client-ts/src/models/PatchedCaptchaStageRequest.ts new file mode 100644 index 0000000000..ec40658da9 --- /dev/null +++ b/packages/client-ts/src/models/PatchedCaptchaStageRequest.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * CaptchaStage Serializer + * @export + * @interface PatchedCaptchaStageRequest + */ +export interface PatchedCaptchaStageRequest { + /** + * + * @type {string} + * @memberof PatchedCaptchaStageRequest + */ + name?: string; + /** + * Public key, acquired your captcha Provider. + * @type {string} + * @memberof PatchedCaptchaStageRequest + */ + publicKey?: string; + /** + * Private key, acquired your captcha Provider. + * @type {string} + * @memberof PatchedCaptchaStageRequest + */ + privateKey?: string; + /** + * + * @type {string} + * @memberof PatchedCaptchaStageRequest + */ + jsUrl?: string; + /** + * + * @type {string} + * @memberof PatchedCaptchaStageRequest + */ + apiUrl?: string; + /** + * + * @type {boolean} + * @memberof PatchedCaptchaStageRequest + */ + interactive?: boolean; + /** + * + * @type {number} + * @memberof PatchedCaptchaStageRequest + */ + scoreMinThreshold?: number; + /** + * + * @type {number} + * @memberof PatchedCaptchaStageRequest + */ + scoreMaxThreshold?: number; + /** + * When enabled and the received captcha score is outside of the given threshold, the stage will show an error message. When not enabled, the flow will continue, but the data from the captcha will be available in the context for policy decisions + * @type {boolean} + * @memberof PatchedCaptchaStageRequest + */ + errorOnInvalidScore?: boolean; +} + +/** + * Check if a given object implements the PatchedCaptchaStageRequest interface. + */ +export function instanceOfPatchedCaptchaStageRequest(value: object): value is PatchedCaptchaStageRequest { + return true; +} + +export function PatchedCaptchaStageRequestFromJSON(json: any): PatchedCaptchaStageRequest { + return PatchedCaptchaStageRequestFromJSONTyped(json, false); +} + +export function PatchedCaptchaStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCaptchaStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'publicKey': json['public_key'] == null ? undefined : json['public_key'], + 'privateKey': json['private_key'] == null ? undefined : json['private_key'], + 'jsUrl': json['js_url'] == null ? undefined : json['js_url'], + 'apiUrl': json['api_url'] == null ? undefined : json['api_url'], + 'interactive': json['interactive'] == null ? undefined : json['interactive'], + 'scoreMinThreshold': json['score_min_threshold'] == null ? undefined : json['score_min_threshold'], + 'scoreMaxThreshold': json['score_max_threshold'] == null ? undefined : json['score_max_threshold'], + 'errorOnInvalidScore': json['error_on_invalid_score'] == null ? undefined : json['error_on_invalid_score'], + }; +} + +export function PatchedCaptchaStageRequestToJSON(json: any): PatchedCaptchaStageRequest { + return PatchedCaptchaStageRequestToJSONTyped(json, false); +} + +export function PatchedCaptchaStageRequestToJSONTyped(value?: PatchedCaptchaStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'public_key': value['publicKey'], + 'private_key': value['privateKey'], + 'js_url': value['jsUrl'], + 'api_url': value['apiUrl'], + 'interactive': value['interactive'], + 'score_min_threshold': value['scoreMinThreshold'], + 'score_max_threshold': value['scoreMaxThreshold'], + 'error_on_invalid_score': value['errorOnInvalidScore'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedCertificateKeyPairRequest.ts b/packages/client-ts/src/models/PatchedCertificateKeyPairRequest.ts new file mode 100644 index 0000000000..cffd1ae076 --- /dev/null +++ b/packages/client-ts/src/models/PatchedCertificateKeyPairRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * CertificateKeyPair Serializer + * @export + * @interface PatchedCertificateKeyPairRequest + */ +export interface PatchedCertificateKeyPairRequest { + /** + * + * @type {string} + * @memberof PatchedCertificateKeyPairRequest + */ + name?: string; + /** + * PEM-encoded Certificate data + * @type {string} + * @memberof PatchedCertificateKeyPairRequest + */ + certificateData?: string; + /** + * Optional Private Key. If this is set, you can use this keypair for encryption. + * @type {string} + * @memberof PatchedCertificateKeyPairRequest + */ + keyData?: string; +} + +/** + * Check if a given object implements the PatchedCertificateKeyPairRequest interface. + */ +export function instanceOfPatchedCertificateKeyPairRequest(value: object): value is PatchedCertificateKeyPairRequest { + return true; +} + +export function PatchedCertificateKeyPairRequestFromJSON(json: any): PatchedCertificateKeyPairRequest { + return PatchedCertificateKeyPairRequestFromJSONTyped(json, false); +} + +export function PatchedCertificateKeyPairRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCertificateKeyPairRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'certificateData': json['certificate_data'] == null ? undefined : json['certificate_data'], + 'keyData': json['key_data'] == null ? undefined : json['key_data'], + }; +} + +export function PatchedCertificateKeyPairRequestToJSON(json: any): PatchedCertificateKeyPairRequest { + return PatchedCertificateKeyPairRequestToJSONTyped(json, false); +} + +export function PatchedCertificateKeyPairRequestToJSONTyped(value?: PatchedCertificateKeyPairRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'certificate_data': value['certificateData'], + 'key_data': value['keyData'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedConnectionTokenRequest.ts b/packages/client-ts/src/models/PatchedConnectionTokenRequest.ts new file mode 100644 index 0000000000..47cea533a9 --- /dev/null +++ b/packages/client-ts/src/models/PatchedConnectionTokenRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ConnectionToken Serializer + * @export + * @interface PatchedConnectionTokenRequest + */ +export interface PatchedConnectionTokenRequest { + /** + * + * @type {string} + * @memberof PatchedConnectionTokenRequest + */ + pk?: string; + /** + * + * @type {number} + * @memberof PatchedConnectionTokenRequest + */ + provider?: number; + /** + * + * @type {string} + * @memberof PatchedConnectionTokenRequest + */ + endpoint?: string; +} + +/** + * Check if a given object implements the PatchedConnectionTokenRequest interface. + */ +export function instanceOfPatchedConnectionTokenRequest(value: object): value is PatchedConnectionTokenRequest { + return true; +} + +export function PatchedConnectionTokenRequestFromJSON(json: any): PatchedConnectionTokenRequest { + return PatchedConnectionTokenRequestFromJSONTyped(json, false); +} + +export function PatchedConnectionTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConnectionTokenRequest { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'provider': json['provider'] == null ? undefined : json['provider'], + 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], + }; +} + +export function PatchedConnectionTokenRequestToJSON(json: any): PatchedConnectionTokenRequest { + return PatchedConnectionTokenRequestToJSONTyped(json, false); +} + +export function PatchedConnectionTokenRequestToJSONTyped(value?: PatchedConnectionTokenRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'provider': value['provider'], + 'endpoint': value['endpoint'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedConsentStageRequest.ts b/packages/client-ts/src/models/PatchedConsentStageRequest.ts new file mode 100644 index 0000000000..b4c49680b2 --- /dev/null +++ b/packages/client-ts/src/models/PatchedConsentStageRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ConsentStageModeEnum } from './ConsentStageModeEnum'; +import { + ConsentStageModeEnumFromJSON, + ConsentStageModeEnumFromJSONTyped, + ConsentStageModeEnumToJSON, + ConsentStageModeEnumToJSONTyped, +} from './ConsentStageModeEnum'; + +/** + * ConsentStage Serializer + * @export + * @interface PatchedConsentStageRequest + */ +export interface PatchedConsentStageRequest { + /** + * + * @type {string} + * @memberof PatchedConsentStageRequest + */ + name?: string; + /** + * + * @type {ConsentStageModeEnum} + * @memberof PatchedConsentStageRequest + */ + mode?: ConsentStageModeEnum; + /** + * Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedConsentStageRequest + */ + consentExpireIn?: string; +} + + + +/** + * Check if a given object implements the PatchedConsentStageRequest interface. + */ +export function instanceOfPatchedConsentStageRequest(value: object): value is PatchedConsentStageRequest { + return true; +} + +export function PatchedConsentStageRequestFromJSON(json: any): PatchedConsentStageRequest { + return PatchedConsentStageRequestFromJSONTyped(json, false); +} + +export function PatchedConsentStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConsentStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'mode': json['mode'] == null ? undefined : ConsentStageModeEnumFromJSON(json['mode']), + 'consentExpireIn': json['consent_expire_in'] == null ? undefined : json['consent_expire_in'], + }; +} + +export function PatchedConsentStageRequestToJSON(json: any): PatchedConsentStageRequest { + return PatchedConsentStageRequestToJSONTyped(json, false); +} + +export function PatchedConsentStageRequestToJSONTyped(value?: PatchedConsentStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': ConsentStageModeEnumToJSON(value['mode']), + 'consent_expire_in': value['consentExpireIn'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDenyStageRequest.ts b/packages/client-ts/src/models/PatchedDenyStageRequest.ts new file mode 100644 index 0000000000..0bc708913c --- /dev/null +++ b/packages/client-ts/src/models/PatchedDenyStageRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DenyStage Serializer + * @export + * @interface PatchedDenyStageRequest + */ +export interface PatchedDenyStageRequest { + /** + * + * @type {string} + * @memberof PatchedDenyStageRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedDenyStageRequest + */ + denyMessage?: string; +} + +/** + * Check if a given object implements the PatchedDenyStageRequest interface. + */ +export function instanceOfPatchedDenyStageRequest(value: object): value is PatchedDenyStageRequest { + return true; +} + +export function PatchedDenyStageRequestFromJSON(json: any): PatchedDenyStageRequest { + return PatchedDenyStageRequestFromJSONTyped(json, false); +} + +export function PatchedDenyStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDenyStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'denyMessage': json['deny_message'] == null ? undefined : json['deny_message'], + }; +} + +export function PatchedDenyStageRequestToJSON(json: any): PatchedDenyStageRequest { + return PatchedDenyStageRequestToJSONTyped(json, false); +} + +export function PatchedDenyStageRequestToJSONTyped(value?: PatchedDenyStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'deny_message': value['denyMessage'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDeviceAccessGroupRequest.ts b/packages/client-ts/src/models/PatchedDeviceAccessGroupRequest.ts new file mode 100644 index 0000000000..a10e572ce4 --- /dev/null +++ b/packages/client-ts/src/models/PatchedDeviceAccessGroupRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PatchedDeviceAccessGroupRequest + */ +export interface PatchedDeviceAccessGroupRequest { + /** + * + * @type {string} + * @memberof PatchedDeviceAccessGroupRequest + */ + name?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedDeviceAccessGroupRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedDeviceAccessGroupRequest interface. + */ +export function instanceOfPatchedDeviceAccessGroupRequest(value: object): value is PatchedDeviceAccessGroupRequest { + return true; +} + +export function PatchedDeviceAccessGroupRequestFromJSON(json: any): PatchedDeviceAccessGroupRequest { + return PatchedDeviceAccessGroupRequestFromJSONTyped(json, false); +} + +export function PatchedDeviceAccessGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDeviceAccessGroupRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PatchedDeviceAccessGroupRequestToJSON(json: any): PatchedDeviceAccessGroupRequest { + return PatchedDeviceAccessGroupRequestToJSONTyped(json, false); +} + +export function PatchedDeviceAccessGroupRequestToJSONTyped(value?: PatchedDeviceAccessGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDeviceUserBindingRequest.ts b/packages/client-ts/src/models/PatchedDeviceUserBindingRequest.ts new file mode 100644 index 0000000000..4cca63a602 --- /dev/null +++ b/packages/client-ts/src/models/PatchedDeviceUserBindingRequest.ts @@ -0,0 +1,137 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PolicyBinding Serializer + * @export + * @interface PatchedDeviceUserBindingRequest + */ +export interface PatchedDeviceUserBindingRequest { + /** + * + * @type {string} + * @memberof PatchedDeviceUserBindingRequest + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof PatchedDeviceUserBindingRequest + */ + group?: string | null; + /** + * + * @type {number} + * @memberof PatchedDeviceUserBindingRequest + */ + user?: number | null; + /** + * + * @type {string} + * @memberof PatchedDeviceUserBindingRequest + */ + target?: string; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof PatchedDeviceUserBindingRequest + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedDeviceUserBindingRequest + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof PatchedDeviceUserBindingRequest + */ + order?: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof PatchedDeviceUserBindingRequest + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof PatchedDeviceUserBindingRequest + */ + failureResult?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedDeviceUserBindingRequest + */ + isPrimary?: boolean; +} + +/** + * Check if a given object implements the PatchedDeviceUserBindingRequest interface. + */ +export function instanceOfPatchedDeviceUserBindingRequest(value: object): value is PatchedDeviceUserBindingRequest { + return true; +} + +export function PatchedDeviceUserBindingRequestFromJSON(json: any): PatchedDeviceUserBindingRequest { + return PatchedDeviceUserBindingRequestFromJSONTyped(json, false); +} + +export function PatchedDeviceUserBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDeviceUserBindingRequest { + if (json == null) { + return json; + } + return { + + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'target': json['target'] == null ? undefined : json['target'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'] == null ? undefined : json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + }; +} + +export function PatchedDeviceUserBindingRequestToJSON(json: any): PatchedDeviceUserBindingRequest { + return PatchedDeviceUserBindingRequestToJSONTyped(json, false); +} + +export function PatchedDeviceUserBindingRequestToJSONTyped(value?: PatchedDeviceUserBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'target': value['target'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + 'is_primary': value['isPrimary'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDockerServiceConnectionRequest.ts b/packages/client-ts/src/models/PatchedDockerServiceConnectionRequest.ts new file mode 100644 index 0000000000..e347aa2506 --- /dev/null +++ b/packages/client-ts/src/models/PatchedDockerServiceConnectionRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DockerServiceConnection Serializer + * @export + * @interface PatchedDockerServiceConnectionRequest + */ +export interface PatchedDockerServiceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedDockerServiceConnectionRequest + */ + name?: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof PatchedDockerServiceConnectionRequest + */ + local?: boolean; + /** + * Can be in the format of 'unix://' when connecting to a local docker daemon, or 'https://:2376' when connecting to a remote system. + * @type {string} + * @memberof PatchedDockerServiceConnectionRequest + */ + url?: string; + /** + * CA which the endpoint's Certificate is verified against. Can be left empty for no validation. + * @type {string} + * @memberof PatchedDockerServiceConnectionRequest + */ + tlsVerification?: string | null; + /** + * Certificate/Key used for authentication. Can be left empty for no authentication. + * @type {string} + * @memberof PatchedDockerServiceConnectionRequest + */ + tlsAuthentication?: string | null; +} + +/** + * Check if a given object implements the PatchedDockerServiceConnectionRequest interface. + */ +export function instanceOfPatchedDockerServiceConnectionRequest(value: object): value is PatchedDockerServiceConnectionRequest { + return true; +} + +export function PatchedDockerServiceConnectionRequestFromJSON(json: any): PatchedDockerServiceConnectionRequest { + return PatchedDockerServiceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedDockerServiceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDockerServiceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'url': json['url'] == null ? undefined : json['url'], + 'tlsVerification': json['tls_verification'] == null ? undefined : json['tls_verification'], + 'tlsAuthentication': json['tls_authentication'] == null ? undefined : json['tls_authentication'], + }; +} + +export function PatchedDockerServiceConnectionRequestToJSON(json: any): PatchedDockerServiceConnectionRequest { + return PatchedDockerServiceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedDockerServiceConnectionRequestToJSONTyped(value?: PatchedDockerServiceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + 'url': value['url'], + 'tls_verification': value['tlsVerification'], + 'tls_authentication': value['tlsAuthentication'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDomainRequest.ts b/packages/client-ts/src/models/PatchedDomainRequest.ts new file mode 100644 index 0000000000..30f574759c --- /dev/null +++ b/packages/client-ts/src/models/PatchedDomainRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Domain Serializer + * @export + * @interface PatchedDomainRequest + */ +export interface PatchedDomainRequest { + /** + * + * @type {string} + * @memberof PatchedDomainRequest + */ + domain?: string; + /** + * + * @type {boolean} + * @memberof PatchedDomainRequest + */ + isPrimary?: boolean; + /** + * + * @type {string} + * @memberof PatchedDomainRequest + */ + tenant?: string; +} + +/** + * Check if a given object implements the PatchedDomainRequest interface. + */ +export function instanceOfPatchedDomainRequest(value: object): value is PatchedDomainRequest { + return true; +} + +export function PatchedDomainRequestFromJSON(json: any): PatchedDomainRequest { + return PatchedDomainRequestFromJSONTyped(json, false); +} + +export function PatchedDomainRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDomainRequest { + if (json == null) { + return json; + } + return { + + 'domain': json['domain'] == null ? undefined : json['domain'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + 'tenant': json['tenant'] == null ? undefined : json['tenant'], + }; +} + +export function PatchedDomainRequestToJSON(json: any): PatchedDomainRequest { + return PatchedDomainRequestToJSONTyped(json, false); +} + +export function PatchedDomainRequestToJSONTyped(value?: PatchedDomainRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'domain': value['domain'], + 'is_primary': value['isPrimary'], + 'tenant': value['tenant'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDummyPolicyRequest.ts b/packages/client-ts/src/models/PatchedDummyPolicyRequest.ts new file mode 100644 index 0000000000..91ca087ab4 --- /dev/null +++ b/packages/client-ts/src/models/PatchedDummyPolicyRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Dummy Policy Serializer + * @export + * @interface PatchedDummyPolicyRequest + */ +export interface PatchedDummyPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedDummyPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedDummyPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedDummyPolicyRequest + */ + result?: boolean; + /** + * + * @type {number} + * @memberof PatchedDummyPolicyRequest + */ + waitMin?: number; + /** + * + * @type {number} + * @memberof PatchedDummyPolicyRequest + */ + waitMax?: number; +} + +/** + * Check if a given object implements the PatchedDummyPolicyRequest interface. + */ +export function instanceOfPatchedDummyPolicyRequest(value: object): value is PatchedDummyPolicyRequest { + return true; +} + +export function PatchedDummyPolicyRequestFromJSON(json: any): PatchedDummyPolicyRequest { + return PatchedDummyPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedDummyPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDummyPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'result': json['result'] == null ? undefined : json['result'], + 'waitMin': json['wait_min'] == null ? undefined : json['wait_min'], + 'waitMax': json['wait_max'] == null ? undefined : json['wait_max'], + }; +} + +export function PatchedDummyPolicyRequestToJSON(json: any): PatchedDummyPolicyRequest { + return PatchedDummyPolicyRequestToJSONTyped(json, false); +} + +export function PatchedDummyPolicyRequestToJSONTyped(value?: PatchedDummyPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'result': value['result'], + 'wait_min': value['waitMin'], + 'wait_max': value['waitMax'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDummyStageRequest.ts b/packages/client-ts/src/models/PatchedDummyStageRequest.ts new file mode 100644 index 0000000000..ed6a368eb2 --- /dev/null +++ b/packages/client-ts/src/models/PatchedDummyStageRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * DummyStage Serializer + * @export + * @interface PatchedDummyStageRequest + */ +export interface PatchedDummyStageRequest { + /** + * + * @type {string} + * @memberof PatchedDummyStageRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedDummyStageRequest + */ + throwError?: boolean; +} + +/** + * Check if a given object implements the PatchedDummyStageRequest interface. + */ +export function instanceOfPatchedDummyStageRequest(value: object): value is PatchedDummyStageRequest { + return true; +} + +export function PatchedDummyStageRequestFromJSON(json: any): PatchedDummyStageRequest { + return PatchedDummyStageRequestFromJSONTyped(json, false); +} + +export function PatchedDummyStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDummyStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'throwError': json['throw_error'] == null ? undefined : json['throw_error'], + }; +} + +export function PatchedDummyStageRequestToJSON(json: any): PatchedDummyStageRequest { + return PatchedDummyStageRequestToJSONTyped(json, false); +} + +export function PatchedDummyStageRequestToJSONTyped(value?: PatchedDummyStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'throw_error': value['throwError'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedDuoDeviceRequest.ts b/packages/client-ts/src/models/PatchedDuoDeviceRequest.ts new file mode 100644 index 0000000000..e994da147c --- /dev/null +++ b/packages/client-ts/src/models/PatchedDuoDeviceRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for Duo authenticator devices + * @export + * @interface PatchedDuoDeviceRequest + */ +export interface PatchedDuoDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof PatchedDuoDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedDuoDeviceRequest interface. + */ +export function instanceOfPatchedDuoDeviceRequest(value: object): value is PatchedDuoDeviceRequest { + return true; +} + +export function PatchedDuoDeviceRequestFromJSON(json: any): PatchedDuoDeviceRequest { + return PatchedDuoDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedDuoDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDuoDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedDuoDeviceRequestToJSON(json: any): PatchedDuoDeviceRequest { + return PatchedDuoDeviceRequestToJSONTyped(json, false); +} + +export function PatchedDuoDeviceRequestToJSONTyped(value?: PatchedDuoDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedEmailDeviceRequest.ts b/packages/client-ts/src/models/PatchedEmailDeviceRequest.ts new file mode 100644 index 0000000000..df93814539 --- /dev/null +++ b/packages/client-ts/src/models/PatchedEmailDeviceRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for email authenticator devices + * @export + * @interface PatchedEmailDeviceRequest + */ +export interface PatchedEmailDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof PatchedEmailDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedEmailDeviceRequest interface. + */ +export function instanceOfPatchedEmailDeviceRequest(value: object): value is PatchedEmailDeviceRequest { + return true; +} + +export function PatchedEmailDeviceRequestFromJSON(json: any): PatchedEmailDeviceRequest { + return PatchedEmailDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedEmailDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEmailDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedEmailDeviceRequestToJSON(json: any): PatchedEmailDeviceRequest { + return PatchedEmailDeviceRequestToJSONTyped(json, false); +} + +export function PatchedEmailDeviceRequestToJSONTyped(value?: PatchedEmailDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedEmailStageRequest.ts b/packages/client-ts/src/models/PatchedEmailStageRequest.ts new file mode 100644 index 0000000000..f3a88a71b6 --- /dev/null +++ b/packages/client-ts/src/models/PatchedEmailStageRequest.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * EmailStage Serializer + * @export + * @interface PatchedEmailStageRequest + */ +export interface PatchedEmailStageRequest { + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + name?: string; + /** + * When enabled, global Email connection settings will be used and connection settings below will be ignored. + * @type {boolean} + * @memberof PatchedEmailStageRequest + */ + useGlobalSettings?: boolean; + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + host?: string; + /** + * + * @type {number} + * @memberof PatchedEmailStageRequest + */ + port?: number; + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + password?: string; + /** + * + * @type {boolean} + * @memberof PatchedEmailStageRequest + */ + useTls?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedEmailStageRequest + */ + useSsl?: boolean; + /** + * + * @type {number} + * @memberof PatchedEmailStageRequest + */ + timeout?: number; + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + fromAddress?: string; + /** + * Time the token sent is valid (Format: hours=3,minutes=17,seconds=300). + * @type {string} + * @memberof PatchedEmailStageRequest + */ + tokenExpiry?: string; + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + subject?: string; + /** + * + * @type {string} + * @memberof PatchedEmailStageRequest + */ + template?: string; + /** + * Activate users upon completion of stage. + * @type {boolean} + * @memberof PatchedEmailStageRequest + */ + activateUserOnSuccess?: boolean; + /** + * + * @type {number} + * @memberof PatchedEmailStageRequest + */ + recoveryMaxAttempts?: number; + /** + * The time window used to count recent account recovery attempts. If the number of attempts exceed recovery_max_attempts within this period, further attempts will be rate-limited. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedEmailStageRequest + */ + recoveryCacheTimeout?: string; +} + +/** + * Check if a given object implements the PatchedEmailStageRequest interface. + */ +export function instanceOfPatchedEmailStageRequest(value: object): value is PatchedEmailStageRequest { + return true; +} + +export function PatchedEmailStageRequestFromJSON(json: any): PatchedEmailStageRequest { + return PatchedEmailStageRequestFromJSONTyped(json, false); +} + +export function PatchedEmailStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEmailStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'useGlobalSettings': json['use_global_settings'] == null ? undefined : json['use_global_settings'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'username': json['username'] == null ? undefined : json['username'], + 'password': json['password'] == null ? undefined : json['password'], + 'useTls': json['use_tls'] == null ? undefined : json['use_tls'], + 'useSsl': json['use_ssl'] == null ? undefined : json['use_ssl'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'fromAddress': json['from_address'] == null ? undefined : json['from_address'], + 'tokenExpiry': json['token_expiry'] == null ? undefined : json['token_expiry'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'template': json['template'] == null ? undefined : json['template'], + 'activateUserOnSuccess': json['activate_user_on_success'] == null ? undefined : json['activate_user_on_success'], + 'recoveryMaxAttempts': json['recovery_max_attempts'] == null ? undefined : json['recovery_max_attempts'], + 'recoveryCacheTimeout': json['recovery_cache_timeout'] == null ? undefined : json['recovery_cache_timeout'], + }; +} + +export function PatchedEmailStageRequestToJSON(json: any): PatchedEmailStageRequest { + return PatchedEmailStageRequestToJSONTyped(json, false); +} + +export function PatchedEmailStageRequestToJSONTyped(value?: PatchedEmailStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'use_global_settings': value['useGlobalSettings'], + 'host': value['host'], + 'port': value['port'], + 'username': value['username'], + 'password': value['password'], + 'use_tls': value['useTls'], + 'use_ssl': value['useSsl'], + 'timeout': value['timeout'], + 'from_address': value['fromAddress'], + 'token_expiry': value['tokenExpiry'], + 'subject': value['subject'], + 'template': value['template'], + 'activate_user_on_success': value['activateUserOnSuccess'], + 'recovery_max_attempts': value['recoveryMaxAttempts'], + 'recovery_cache_timeout': value['recoveryCacheTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedEndpointDeviceRequest.ts b/packages/client-ts/src/models/PatchedEndpointDeviceRequest.ts new file mode 100644 index 0000000000..19cc35dcb3 --- /dev/null +++ b/packages/client-ts/src/models/PatchedEndpointDeviceRequest.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeviceAccessGroupRequest } from './DeviceAccessGroupRequest'; +import { + DeviceAccessGroupRequestFromJSON, + DeviceAccessGroupRequestFromJSONTyped, + DeviceAccessGroupRequestToJSON, + DeviceAccessGroupRequestToJSONTyped, +} from './DeviceAccessGroupRequest'; + +/** + * + * @export + * @interface PatchedEndpointDeviceRequest + */ +export interface PatchedEndpointDeviceRequest { + /** + * + * @type {string} + * @memberof PatchedEndpointDeviceRequest + */ + deviceUuid?: string; + /** + * + * @type {string} + * @memberof PatchedEndpointDeviceRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedEndpointDeviceRequest + */ + accessGroup?: string | null; + /** + * + * @type {DeviceAccessGroupRequest} + * @memberof PatchedEndpointDeviceRequest + */ + accessGroupObj?: DeviceAccessGroupRequest; + /** + * + * @type {boolean} + * @memberof PatchedEndpointDeviceRequest + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof PatchedEndpointDeviceRequest + */ + expires?: Date | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedEndpointDeviceRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedEndpointDeviceRequest interface. + */ +export function instanceOfPatchedEndpointDeviceRequest(value: object): value is PatchedEndpointDeviceRequest { + return true; +} + +export function PatchedEndpointDeviceRequestFromJSON(json: any): PatchedEndpointDeviceRequest { + return PatchedEndpointDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedEndpointDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEndpointDeviceRequest { + if (json == null) { + return json; + } + return { + + 'deviceUuid': json['device_uuid'] == null ? undefined : json['device_uuid'], + 'name': json['name'] == null ? undefined : json['name'], + 'accessGroup': json['access_group'] == null ? undefined : json['access_group'], + 'accessGroupObj': json['access_group_obj'] == null ? undefined : DeviceAccessGroupRequestFromJSON(json['access_group_obj']), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PatchedEndpointDeviceRequestToJSON(json: any): PatchedEndpointDeviceRequest { + return PatchedEndpointDeviceRequestToJSONTyped(json, false); +} + +export function PatchedEndpointDeviceRequestToJSONTyped(value?: PatchedEndpointDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_uuid': value['deviceUuid'], + 'name': value['name'], + 'access_group': value['accessGroup'], + 'access_group_obj': DeviceAccessGroupRequestToJSON(value['accessGroupObj']), + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedEndpointRequest.ts b/packages/client-ts/src/models/PatchedEndpointRequest.ts new file mode 100644 index 0000000000..a325b6a1e4 --- /dev/null +++ b/packages/client-ts/src/models/PatchedEndpointRequest.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EndpointAuthModeEnum } from './EndpointAuthModeEnum'; +import { + EndpointAuthModeEnumFromJSON, + EndpointAuthModeEnumFromJSONTyped, + EndpointAuthModeEnumToJSON, + EndpointAuthModeEnumToJSONTyped, +} from './EndpointAuthModeEnum'; +import type { ProtocolEnum } from './ProtocolEnum'; +import { + ProtocolEnumFromJSON, + ProtocolEnumFromJSONTyped, + ProtocolEnumToJSON, + ProtocolEnumToJSONTyped, +} from './ProtocolEnum'; + +/** + * Endpoint Serializer + * @export + * @interface PatchedEndpointRequest + */ +export interface PatchedEndpointRequest { + /** + * + * @type {string} + * @memberof PatchedEndpointRequest + */ + name?: string; + /** + * + * @type {number} + * @memberof PatchedEndpointRequest + */ + provider?: number; + /** + * + * @type {ProtocolEnum} + * @memberof PatchedEndpointRequest + */ + protocol?: ProtocolEnum; + /** + * + * @type {string} + * @memberof PatchedEndpointRequest + */ + host?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedEndpointRequest + */ + settings?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof PatchedEndpointRequest + */ + propertyMappings?: Array; + /** + * + * @type {EndpointAuthModeEnum} + * @memberof PatchedEndpointRequest + */ + authMode?: EndpointAuthModeEnum; + /** + * + * @type {number} + * @memberof PatchedEndpointRequest + */ + maximumConnections?: number; +} + + + +/** + * Check if a given object implements the PatchedEndpointRequest interface. + */ +export function instanceOfPatchedEndpointRequest(value: object): value is PatchedEndpointRequest { + return true; +} + +export function PatchedEndpointRequestFromJSON(json: any): PatchedEndpointRequest { + return PatchedEndpointRequestFromJSONTyped(json, false); +} + +export function PatchedEndpointRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEndpointRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'provider': json['provider'] == null ? undefined : json['provider'], + 'protocol': json['protocol'] == null ? undefined : ProtocolEnumFromJSON(json['protocol']), + 'host': json['host'] == null ? undefined : json['host'], + 'settings': json['settings'] == null ? undefined : json['settings'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'authMode': json['auth_mode'] == null ? undefined : EndpointAuthModeEnumFromJSON(json['auth_mode']), + 'maximumConnections': json['maximum_connections'] == null ? undefined : json['maximum_connections'], + }; +} + +export function PatchedEndpointRequestToJSON(json: any): PatchedEndpointRequest { + return PatchedEndpointRequestToJSONTyped(json, false); +} + +export function PatchedEndpointRequestToJSONTyped(value?: PatchedEndpointRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'provider': value['provider'], + 'protocol': ProtocolEnumToJSON(value['protocol']), + 'host': value['host'], + 'settings': value['settings'], + 'property_mappings': value['propertyMappings'], + 'auth_mode': EndpointAuthModeEnumToJSON(value['authMode']), + 'maximum_connections': value['maximumConnections'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedEndpointStageRequest.ts b/packages/client-ts/src/models/PatchedEndpointStageRequest.ts new file mode 100644 index 0000000000..61f557f5fc --- /dev/null +++ b/packages/client-ts/src/models/PatchedEndpointStageRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { StageModeEnum } from './StageModeEnum'; +import { + StageModeEnumFromJSON, + StageModeEnumFromJSONTyped, + StageModeEnumToJSON, + StageModeEnumToJSONTyped, +} from './StageModeEnum'; + +/** + * EndpointStage Serializer + * @export + * @interface PatchedEndpointStageRequest + */ +export interface PatchedEndpointStageRequest { + /** + * + * @type {string} + * @memberof PatchedEndpointStageRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedEndpointStageRequest + */ + connector?: string; + /** + * + * @type {StageModeEnum} + * @memberof PatchedEndpointStageRequest + */ + mode?: StageModeEnum; +} + + + +/** + * Check if a given object implements the PatchedEndpointStageRequest interface. + */ +export function instanceOfPatchedEndpointStageRequest(value: object): value is PatchedEndpointStageRequest { + return true; +} + +export function PatchedEndpointStageRequestFromJSON(json: any): PatchedEndpointStageRequest { + return PatchedEndpointStageRequestFromJSONTyped(json, false); +} + +export function PatchedEndpointStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEndpointStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'connector': json['connector'] == null ? undefined : json['connector'], + 'mode': json['mode'] == null ? undefined : StageModeEnumFromJSON(json['mode']), + }; +} + +export function PatchedEndpointStageRequestToJSON(json: any): PatchedEndpointStageRequest { + return PatchedEndpointStageRequestToJSONTyped(json, false); +} + +export function PatchedEndpointStageRequestToJSONTyped(value?: PatchedEndpointStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'connector': value['connector'], + 'mode': StageModeEnumToJSON(value['mode']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedEnrollmentTokenRequest.ts b/packages/client-ts/src/models/PatchedEnrollmentTokenRequest.ts new file mode 100644 index 0000000000..8cd7406bd9 --- /dev/null +++ b/packages/client-ts/src/models/PatchedEnrollmentTokenRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PatchedEnrollmentTokenRequest + */ +export interface PatchedEnrollmentTokenRequest { + /** + * + * @type {string} + * @memberof PatchedEnrollmentTokenRequest + */ + deviceGroup?: string | null; + /** + * + * @type {string} + * @memberof PatchedEnrollmentTokenRequest + */ + connector?: string; + /** + * + * @type {string} + * @memberof PatchedEnrollmentTokenRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedEnrollmentTokenRequest + */ + expiring?: boolean; + /** + * + * @type {Date} + * @memberof PatchedEnrollmentTokenRequest + */ + expires?: Date | null; +} + +/** + * Check if a given object implements the PatchedEnrollmentTokenRequest interface. + */ +export function instanceOfPatchedEnrollmentTokenRequest(value: object): value is PatchedEnrollmentTokenRequest { + return true; +} + +export function PatchedEnrollmentTokenRequestFromJSON(json: any): PatchedEnrollmentTokenRequest { + return PatchedEnrollmentTokenRequestFromJSONTyped(json, false); +} + +export function PatchedEnrollmentTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnrollmentTokenRequest { + if (json == null) { + return json; + } + return { + + 'deviceGroup': json['device_group'] == null ? undefined : json['device_group'], + 'connector': json['connector'] == null ? undefined : json['connector'], + 'name': json['name'] == null ? undefined : json['name'], + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function PatchedEnrollmentTokenRequestToJSON(json: any): PatchedEnrollmentTokenRequest { + return PatchedEnrollmentTokenRequestToJSONTyped(json, false); +} + +export function PatchedEnrollmentTokenRequestToJSONTyped(value?: PatchedEnrollmentTokenRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'device_group': value['deviceGroup'], + 'connector': value['connector'], + 'name': value['name'], + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/PatchedEventMatcherPolicyRequest.ts b/packages/client-ts/src/models/PatchedEventMatcherPolicyRequest.ts new file mode 100644 index 0000000000..d7740bbecd --- /dev/null +++ b/packages/client-ts/src/models/PatchedEventMatcherPolicyRequest.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ModelEnum } from './ModelEnum'; +import { + ModelEnumFromJSON, + ModelEnumFromJSONTyped, + ModelEnumToJSON, + ModelEnumToJSONTyped, +} from './ModelEnum'; +import type { AppEnum } from './AppEnum'; +import { + AppEnumFromJSON, + AppEnumFromJSONTyped, + AppEnumToJSON, + AppEnumToJSONTyped, +} from './AppEnum'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Event Matcher Policy Serializer + * @export + * @interface PatchedEventMatcherPolicyRequest + */ +export interface PatchedEventMatcherPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedEventMatcherPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedEventMatcherPolicyRequest + */ + executionLogging?: boolean; + /** + * Match created events with this action type. When left empty, all action types will be matched. + * @type {EventActions} + * @memberof PatchedEventMatcherPolicyRequest + */ + action?: EventActions | null; + /** + * Matches Event's Client IP (strict matching, for network matching use an Expression Policy) + * @type {string} + * @memberof PatchedEventMatcherPolicyRequest + */ + clientIp?: string | null; + /** + * Match events created by selected application. When left empty, all applications are matched. + * @type {AppEnum} + * @memberof PatchedEventMatcherPolicyRequest + */ + app?: AppEnum | null; + /** + * 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. + * @type {ModelEnum} + * @memberof PatchedEventMatcherPolicyRequest + */ + model?: ModelEnum | null; +} + + + +/** + * Check if a given object implements the PatchedEventMatcherPolicyRequest interface. + */ +export function instanceOfPatchedEventMatcherPolicyRequest(value: object): value is PatchedEventMatcherPolicyRequest { + return true; +} + +export function PatchedEventMatcherPolicyRequestFromJSON(json: any): PatchedEventMatcherPolicyRequest { + return PatchedEventMatcherPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedEventMatcherPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEventMatcherPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'action': json['action'] == null ? undefined : EventActionsFromJSON(json['action']), + 'clientIp': json['client_ip'] == null ? undefined : json['client_ip'], + 'app': json['app'] == null ? undefined : AppEnumFromJSON(json['app']), + 'model': json['model'] == null ? undefined : ModelEnumFromJSON(json['model']), + }; +} + +export function PatchedEventMatcherPolicyRequestToJSON(json: any): PatchedEventMatcherPolicyRequest { + return PatchedEventMatcherPolicyRequestToJSONTyped(json, false); +} + +export function PatchedEventMatcherPolicyRequestToJSONTyped(value?: PatchedEventMatcherPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'action': EventActionsToJSON(value['action']), + 'client_ip': value['clientIp'], + 'app': AppEnumToJSON(value['app']), + 'model': ModelEnumToJSON(value['model']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedEventRequest.ts b/packages/client-ts/src/models/PatchedEventRequest.ts new file mode 100644 index 0000000000..a443deb0f4 --- /dev/null +++ b/packages/client-ts/src/models/PatchedEventRequest.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EventActions } from './EventActions'; +import { + EventActionsFromJSON, + EventActionsFromJSONTyped, + EventActionsToJSON, + EventActionsToJSONTyped, +} from './EventActions'; + +/** + * Event Serializer + * @export + * @interface PatchedEventRequest + */ +export interface PatchedEventRequest { + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedEventRequest + */ + user?: { [key: string]: any; }; + /** + * + * @type {EventActions} + * @memberof PatchedEventRequest + */ + action?: EventActions; + /** + * + * @type {string} + * @memberof PatchedEventRequest + */ + app?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedEventRequest + */ + context?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof PatchedEventRequest + */ + clientIp?: string | null; + /** + * + * @type {Date} + * @memberof PatchedEventRequest + */ + expires?: Date; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedEventRequest + */ + brand?: { [key: string]: any; }; +} + + + +/** + * Check if a given object implements the PatchedEventRequest interface. + */ +export function instanceOfPatchedEventRequest(value: object): value is PatchedEventRequest { + return true; +} + +export function PatchedEventRequestFromJSON(json: any): PatchedEventRequest { + return PatchedEventRequestFromJSONTyped(json, false); +} + +export function PatchedEventRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEventRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'action': json['action'] == null ? undefined : EventActionsFromJSON(json['action']), + 'app': json['app'] == null ? undefined : json['app'], + 'context': json['context'] == null ? undefined : json['context'], + 'clientIp': json['client_ip'] == null ? undefined : json['client_ip'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'brand': json['brand'] == null ? undefined : json['brand'], + }; +} + +export function PatchedEventRequestToJSON(json: any): PatchedEventRequest { + return PatchedEventRequestToJSONTyped(json, false); +} + +export function PatchedEventRequestToJSONTyped(value?: PatchedEventRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'action': EventActionsToJSON(value['action']), + 'app': value['app'], + 'context': value['context'], + 'client_ip': value['clientIp'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'brand': value['brand'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedExpressionPolicyRequest.ts b/packages/client-ts/src/models/PatchedExpressionPolicyRequest.ts new file mode 100644 index 0000000000..c3bfbb841d --- /dev/null +++ b/packages/client-ts/src/models/PatchedExpressionPolicyRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Membership Policy Serializer + * @export + * @interface PatchedExpressionPolicyRequest + */ +export interface PatchedExpressionPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedExpressionPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedExpressionPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {string} + * @memberof PatchedExpressionPolicyRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedExpressionPolicyRequest interface. + */ +export function instanceOfPatchedExpressionPolicyRequest(value: object): value is PatchedExpressionPolicyRequest { + return true; +} + +export function PatchedExpressionPolicyRequestFromJSON(json: any): PatchedExpressionPolicyRequest { + return PatchedExpressionPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedExpressionPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedExpressionPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedExpressionPolicyRequestToJSON(json: any): PatchedExpressionPolicyRequest { + return PatchedExpressionPolicyRequestToJSONTyped(json, false); +} + +export function PatchedExpressionPolicyRequestToJSONTyped(value?: PatchedExpressionPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedFleetConnectorRequest.ts b/packages/client-ts/src/models/PatchedFleetConnectorRequest.ts new file mode 100644 index 0000000000..72187e1eda --- /dev/null +++ b/packages/client-ts/src/models/PatchedFleetConnectorRequest.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * FleetConnector Serializer + * @export + * @interface PatchedFleetConnectorRequest + */ +export interface PatchedFleetConnectorRequest { + /** + * + * @type {string} + * @memberof PatchedFleetConnectorRequest + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof PatchedFleetConnectorRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedFleetConnectorRequest + */ + enabled?: boolean; + /** + * + * @type {string} + * @memberof PatchedFleetConnectorRequest + */ + url?: string; + /** + * + * @type {string} + * @memberof PatchedFleetConnectorRequest + */ + token?: string; + /** + * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs + * @type {string} + * @memberof PatchedFleetConnectorRequest + */ + headersMapping?: string | null; + /** + * + * @type {boolean} + * @memberof PatchedFleetConnectorRequest + */ + mapUsers?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedFleetConnectorRequest + */ + mapTeamsAccessGroup?: boolean; +} + +/** + * Check if a given object implements the PatchedFleetConnectorRequest interface. + */ +export function instanceOfPatchedFleetConnectorRequest(value: object): value is PatchedFleetConnectorRequest { + return true; +} + +export function PatchedFleetConnectorRequestFromJSON(json: any): PatchedFleetConnectorRequest { + return PatchedFleetConnectorRequestFromJSONTyped(json, false); +} + +export function PatchedFleetConnectorRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFleetConnectorRequest { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'] == null ? undefined : json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'url': json['url'] == null ? undefined : json['url'], + 'token': json['token'] == null ? undefined : json['token'], + 'headersMapping': json['headers_mapping'] == null ? undefined : json['headers_mapping'], + 'mapUsers': json['map_users'] == null ? undefined : json['map_users'], + 'mapTeamsAccessGroup': json['map_teams_access_group'] == null ? undefined : json['map_teams_access_group'], + }; +} + +export function PatchedFleetConnectorRequestToJSON(json: any): PatchedFleetConnectorRequest { + return PatchedFleetConnectorRequestToJSONTyped(json, false); +} + +export function PatchedFleetConnectorRequestToJSONTyped(value?: PatchedFleetConnectorRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'url': value['url'], + 'token': value['token'], + 'headers_mapping': value['headersMapping'], + 'map_users': value['mapUsers'], + 'map_teams_access_group': value['mapTeamsAccessGroup'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedFlowRequest.ts b/packages/client-ts/src/models/PatchedFlowRequest.ts new file mode 100644 index 0000000000..cd0958ce6c --- /dev/null +++ b/packages/client-ts/src/models/PatchedFlowRequest.ts @@ -0,0 +1,175 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeniedActionEnum } from './DeniedActionEnum'; +import { + DeniedActionEnumFromJSON, + DeniedActionEnumFromJSONTyped, + DeniedActionEnumToJSON, + DeniedActionEnumToJSONTyped, +} from './DeniedActionEnum'; +import type { FlowLayoutEnum } from './FlowLayoutEnum'; +import { + FlowLayoutEnumFromJSON, + FlowLayoutEnumFromJSONTyped, + FlowLayoutEnumToJSON, + FlowLayoutEnumToJSONTyped, +} from './FlowLayoutEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { FlowDesignationEnum } from './FlowDesignationEnum'; +import { + FlowDesignationEnumFromJSON, + FlowDesignationEnumFromJSONTyped, + FlowDesignationEnumToJSON, + FlowDesignationEnumToJSONTyped, +} from './FlowDesignationEnum'; +import type { AuthenticationEnum } from './AuthenticationEnum'; +import { + AuthenticationEnumFromJSON, + AuthenticationEnumFromJSONTyped, + AuthenticationEnumToJSON, + AuthenticationEnumToJSONTyped, +} from './AuthenticationEnum'; + +/** + * Flow Serializer + * @export + * @interface PatchedFlowRequest + */ +export interface PatchedFlowRequest { + /** + * + * @type {string} + * @memberof PatchedFlowRequest + */ + name?: string; + /** + * Visible in the URL. + * @type {string} + * @memberof PatchedFlowRequest + */ + slug?: string; + /** + * Shown as the Title in Flow pages. + * @type {string} + * @memberof PatchedFlowRequest + */ + title?: string; + /** + * Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik. + * @type {FlowDesignationEnum} + * @memberof PatchedFlowRequest + */ + designation?: FlowDesignationEnum; + /** + * Background shown during execution + * @type {string} + * @memberof PatchedFlowRequest + */ + background?: string; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedFlowRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * Enable compatibility mode, increases compatibility with password managers on mobile devices. + * @type {boolean} + * @memberof PatchedFlowRequest + */ + compatibilityMode?: boolean; + /** + * + * @type {FlowLayoutEnum} + * @memberof PatchedFlowRequest + */ + layout?: FlowLayoutEnum; + /** + * Configure what should happen when a flow denies access to a user. + * @type {DeniedActionEnum} + * @memberof PatchedFlowRequest + */ + deniedAction?: DeniedActionEnum; + /** + * Required level of authentication and authorization to access a flow. + * @type {AuthenticationEnum} + * @memberof PatchedFlowRequest + */ + authentication?: AuthenticationEnum; +} + + + +/** + * Check if a given object implements the PatchedFlowRequest interface. + */ +export function instanceOfPatchedFlowRequest(value: object): value is PatchedFlowRequest { + return true; +} + +export function PatchedFlowRequestFromJSON(json: any): PatchedFlowRequest { + return PatchedFlowRequestFromJSONTyped(json, false); +} + +export function PatchedFlowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFlowRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'title': json['title'] == null ? undefined : json['title'], + 'designation': json['designation'] == null ? undefined : FlowDesignationEnumFromJSON(json['designation']), + 'background': json['background'] == null ? undefined : json['background'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : json['compatibility_mode'], + 'layout': json['layout'] == null ? undefined : FlowLayoutEnumFromJSON(json['layout']), + 'deniedAction': json['denied_action'] == null ? undefined : DeniedActionEnumFromJSON(json['denied_action']), + 'authentication': json['authentication'] == null ? undefined : AuthenticationEnumFromJSON(json['authentication']), + }; +} + +export function PatchedFlowRequestToJSON(json: any): PatchedFlowRequest { + return PatchedFlowRequestToJSONTyped(json, false); +} + +export function PatchedFlowRequestToJSONTyped(value?: PatchedFlowRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'title': value['title'], + 'designation': FlowDesignationEnumToJSON(value['designation']), + 'background': value['background'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'compatibility_mode': value['compatibilityMode'], + 'layout': FlowLayoutEnumToJSON(value['layout']), + 'denied_action': DeniedActionEnumToJSON(value['deniedAction']), + 'authentication': AuthenticationEnumToJSON(value['authentication']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedFlowStageBindingRequest.ts b/packages/client-ts/src/models/PatchedFlowStageBindingRequest.ts new file mode 100644 index 0000000000..a0b71db899 --- /dev/null +++ b/packages/client-ts/src/models/PatchedFlowStageBindingRequest.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { InvalidResponseActionEnum } from './InvalidResponseActionEnum'; +import { + InvalidResponseActionEnumFromJSON, + InvalidResponseActionEnumFromJSONTyped, + InvalidResponseActionEnumToJSON, + InvalidResponseActionEnumToJSONTyped, +} from './InvalidResponseActionEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; + +/** + * FlowStageBinding Serializer + * @export + * @interface PatchedFlowStageBindingRequest + */ +export interface PatchedFlowStageBindingRequest { + /** + * + * @type {string} + * @memberof PatchedFlowStageBindingRequest + */ + target?: string; + /** + * + * @type {string} + * @memberof PatchedFlowStageBindingRequest + */ + stage?: string; + /** + * Evaluate policies during the Flow planning process. + * @type {boolean} + * @memberof PatchedFlowStageBindingRequest + */ + evaluateOnPlan?: boolean; + /** + * Evaluate policies when the Stage is presented to the user. + * @type {boolean} + * @memberof PatchedFlowStageBindingRequest + */ + reEvaluatePolicies?: boolean; + /** + * + * @type {number} + * @memberof PatchedFlowStageBindingRequest + */ + order?: number; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedFlowStageBindingRequest + */ + 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. + * @type {InvalidResponseActionEnum} + * @memberof PatchedFlowStageBindingRequest + */ + invalidResponseAction?: InvalidResponseActionEnum; +} + + + +/** + * Check if a given object implements the PatchedFlowStageBindingRequest interface. + */ +export function instanceOfPatchedFlowStageBindingRequest(value: object): value is PatchedFlowStageBindingRequest { + return true; +} + +export function PatchedFlowStageBindingRequestFromJSON(json: any): PatchedFlowStageBindingRequest { + return PatchedFlowStageBindingRequestFromJSONTyped(json, false); +} + +export function PatchedFlowStageBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFlowStageBindingRequest { + if (json == null) { + return json; + } + return { + + 'target': json['target'] == null ? undefined : json['target'], + 'stage': json['stage'] == null ? undefined : json['stage'], + 'evaluateOnPlan': json['evaluate_on_plan'] == null ? undefined : json['evaluate_on_plan'], + 'reEvaluatePolicies': json['re_evaluate_policies'] == null ? undefined : json['re_evaluate_policies'], + 'order': json['order'] == null ? undefined : json['order'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'invalidResponseAction': json['invalid_response_action'] == null ? undefined : InvalidResponseActionEnumFromJSON(json['invalid_response_action']), + }; +} + +export function PatchedFlowStageBindingRequestToJSON(json: any): PatchedFlowStageBindingRequest { + return PatchedFlowStageBindingRequestToJSONTyped(json, false); +} + +export function PatchedFlowStageBindingRequestToJSONTyped(value?: PatchedFlowStageBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'target': value['target'], + 'stage': value['stage'], + 'evaluate_on_plan': value['evaluateOnPlan'], + 're_evaluate_policies': value['reEvaluatePolicies'], + 'order': value['order'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'invalid_response_action': InvalidResponseActionEnumToJSON(value['invalidResponseAction']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedGeoIPPolicyRequest.ts b/packages/client-ts/src/models/PatchedGeoIPPolicyRequest.ts new file mode 100644 index 0000000000..35f510759b --- /dev/null +++ b/packages/client-ts/src/models/PatchedGeoIPPolicyRequest.ts @@ -0,0 +1,145 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CountryCodeEnum } from './CountryCodeEnum'; +import { + CountryCodeEnumFromJSON, + CountryCodeEnumFromJSONTyped, + CountryCodeEnumToJSON, + CountryCodeEnumToJSONTyped, +} from './CountryCodeEnum'; + +/** + * GeoIP Policy Serializer + * @export + * @interface PatchedGeoIPPolicyRequest + */ +export interface PatchedGeoIPPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedGeoIPPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedGeoIPPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {Array} + * @memberof PatchedGeoIPPolicyRequest + */ + asns?: Array; + /** + * + * @type {Array} + * @memberof PatchedGeoIPPolicyRequest + */ + countries?: Array; + /** + * + * @type {boolean} + * @memberof PatchedGeoIPPolicyRequest + */ + checkHistoryDistance?: boolean; + /** + * + * @type {number} + * @memberof PatchedGeoIPPolicyRequest + */ + historyMaxDistanceKm?: number; + /** + * + * @type {number} + * @memberof PatchedGeoIPPolicyRequest + */ + distanceToleranceKm?: number; + /** + * + * @type {number} + * @memberof PatchedGeoIPPolicyRequest + */ + historyLoginCount?: number; + /** + * + * @type {boolean} + * @memberof PatchedGeoIPPolicyRequest + */ + checkImpossibleTravel?: boolean; + /** + * + * @type {number} + * @memberof PatchedGeoIPPolicyRequest + */ + impossibleToleranceKm?: number; +} + +/** + * Check if a given object implements the PatchedGeoIPPolicyRequest interface. + */ +export function instanceOfPatchedGeoIPPolicyRequest(value: object): value is PatchedGeoIPPolicyRequest { + return true; +} + +export function PatchedGeoIPPolicyRequestFromJSON(json: any): PatchedGeoIPPolicyRequest { + return PatchedGeoIPPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedGeoIPPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGeoIPPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'asns': json['asns'] == null ? undefined : json['asns'], + 'countries': json['countries'] == null ? undefined : ((json['countries'] as Array).map(CountryCodeEnumFromJSON)), + 'checkHistoryDistance': json['check_history_distance'] == null ? undefined : json['check_history_distance'], + 'historyMaxDistanceKm': json['history_max_distance_km'] == null ? undefined : json['history_max_distance_km'], + 'distanceToleranceKm': json['distance_tolerance_km'] == null ? undefined : json['distance_tolerance_km'], + 'historyLoginCount': json['history_login_count'] == null ? undefined : json['history_login_count'], + 'checkImpossibleTravel': json['check_impossible_travel'] == null ? undefined : json['check_impossible_travel'], + 'impossibleToleranceKm': json['impossible_tolerance_km'] == null ? undefined : json['impossible_tolerance_km'], + }; +} + +export function PatchedGeoIPPolicyRequestToJSON(json: any): PatchedGeoIPPolicyRequest { + return PatchedGeoIPPolicyRequestToJSONTyped(json, false); +} + +export function PatchedGeoIPPolicyRequestToJSONTyped(value?: PatchedGeoIPPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'asns': value['asns'], + 'countries': value['countries'] == null ? undefined : ((value['countries'] as Array).map(CountryCodeEnumToJSON)), + 'check_history_distance': value['checkHistoryDistance'], + 'history_max_distance_km': value['historyMaxDistanceKm'], + 'distance_tolerance_km': value['distanceToleranceKm'], + 'history_login_count': value['historyLoginCount'], + 'check_impossible_travel': value['checkImpossibleTravel'], + 'impossible_tolerance_km': value['impossibleToleranceKm'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGoogleChromeConnectorRequest.ts b/packages/client-ts/src/models/PatchedGoogleChromeConnectorRequest.ts new file mode 100644 index 0000000000..2f1a6aaa27 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGoogleChromeConnectorRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleChromeConnector Serializer + * @export + * @interface PatchedGoogleChromeConnectorRequest + */ +export interface PatchedGoogleChromeConnectorRequest { + /** + * + * @type {string} + * @memberof PatchedGoogleChromeConnectorRequest + */ + connectorUuid?: string; + /** + * + * @type {string} + * @memberof PatchedGoogleChromeConnectorRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedGoogleChromeConnectorRequest + */ + enabled?: boolean; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedGoogleChromeConnectorRequest + */ + credentials?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedGoogleChromeConnectorRequest interface. + */ +export function instanceOfPatchedGoogleChromeConnectorRequest(value: object): value is PatchedGoogleChromeConnectorRequest { + return true; +} + +export function PatchedGoogleChromeConnectorRequestFromJSON(json: any): PatchedGoogleChromeConnectorRequest { + return PatchedGoogleChromeConnectorRequestFromJSONTyped(json, false); +} + +export function PatchedGoogleChromeConnectorRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGoogleChromeConnectorRequest { + if (json == null) { + return json; + } + return { + + 'connectorUuid': json['connector_uuid'] == null ? undefined : json['connector_uuid'], + 'name': json['name'] == null ? undefined : json['name'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'credentials': json['credentials'] == null ? undefined : json['credentials'], + }; +} + +export function PatchedGoogleChromeConnectorRequestToJSON(json: any): PatchedGoogleChromeConnectorRequest { + return PatchedGoogleChromeConnectorRequestToJSONTyped(json, false); +} + +export function PatchedGoogleChromeConnectorRequestToJSONTyped(value?: PatchedGoogleChromeConnectorRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connector_uuid': value['connectorUuid'], + 'name': value['name'], + 'enabled': value['enabled'], + 'credentials': value['credentials'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGoogleEndpointDeviceRequest.ts b/packages/client-ts/src/models/PatchedGoogleEndpointDeviceRequest.ts new file mode 100644 index 0000000000..25d8e6acda --- /dev/null +++ b/packages/client-ts/src/models/PatchedGoogleEndpointDeviceRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for Endpoint authenticator devices + * @export + * @interface PatchedGoogleEndpointDeviceRequest + */ +export interface PatchedGoogleEndpointDeviceRequest { + /** + * + * @type {string} + * @memberof PatchedGoogleEndpointDeviceRequest + */ + pk?: string; + /** + * The human-readable name of this device. + * @type {string} + * @memberof PatchedGoogleEndpointDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedGoogleEndpointDeviceRequest interface. + */ +export function instanceOfPatchedGoogleEndpointDeviceRequest(value: object): value is PatchedGoogleEndpointDeviceRequest { + return true; +} + +export function PatchedGoogleEndpointDeviceRequestFromJSON(json: any): PatchedGoogleEndpointDeviceRequest { + return PatchedGoogleEndpointDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedGoogleEndpointDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGoogleEndpointDeviceRequest { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedGoogleEndpointDeviceRequestToJSON(json: any): PatchedGoogleEndpointDeviceRequest { + return PatchedGoogleEndpointDeviceRequestToJSONTyped(json, false); +} + +export function PatchedGoogleEndpointDeviceRequestToJSONTyped(value?: PatchedGoogleEndpointDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGoogleWorkspaceProviderMappingRequest.ts b/packages/client-ts/src/models/PatchedGoogleWorkspaceProviderMappingRequest.ts new file mode 100644 index 0000000000..11fe16d339 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGoogleWorkspaceProviderMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * GoogleWorkspaceProviderMapping Serializer + * @export + * @interface PatchedGoogleWorkspaceProviderMappingRequest + */ +export interface PatchedGoogleWorkspaceProviderMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedGoogleWorkspaceProviderMappingRequest interface. + */ +export function instanceOfPatchedGoogleWorkspaceProviderMappingRequest(value: object): value is PatchedGoogleWorkspaceProviderMappingRequest { + return true; +} + +export function PatchedGoogleWorkspaceProviderMappingRequestFromJSON(json: any): PatchedGoogleWorkspaceProviderMappingRequest { + return PatchedGoogleWorkspaceProviderMappingRequestFromJSONTyped(json, false); +} + +export function PatchedGoogleWorkspaceProviderMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGoogleWorkspaceProviderMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedGoogleWorkspaceProviderMappingRequestToJSON(json: any): PatchedGoogleWorkspaceProviderMappingRequest { + return PatchedGoogleWorkspaceProviderMappingRequestToJSONTyped(json, false); +} + +export function PatchedGoogleWorkspaceProviderMappingRequestToJSONTyped(value?: PatchedGoogleWorkspaceProviderMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGoogleWorkspaceProviderRequest.ts b/packages/client-ts/src/models/PatchedGoogleWorkspaceProviderRequest.ts new file mode 100644 index 0000000000..50cd5bdf87 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGoogleWorkspaceProviderRequest.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction'; +import { + OutgoingSyncDeleteActionFromJSON, + OutgoingSyncDeleteActionFromJSONTyped, + OutgoingSyncDeleteActionToJSON, + OutgoingSyncDeleteActionToJSONTyped, +} from './OutgoingSyncDeleteAction'; + +/** + * GoogleWorkspaceProvider Serializer + * @export + * @interface PatchedGoogleWorkspaceProviderRequest + */ +export interface PatchedGoogleWorkspaceProviderRequest { + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + name?: string; + /** + * + * @type {Array} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + propertyMappingsGroup?: Array; + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + delegatedSubject?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + credentials?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + scopes?: string; + /** + * + * @type {boolean} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + excludeUsersServiceAccount?: boolean; + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + filterGroup?: string | null; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + userDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + groupDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + defaultGroupEmailDomain?: string; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + syncPageTimeout?: string; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof PatchedGoogleWorkspaceProviderRequest + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the PatchedGoogleWorkspaceProviderRequest interface. + */ +export function instanceOfPatchedGoogleWorkspaceProviderRequest(value: object): value is PatchedGoogleWorkspaceProviderRequest { + return true; +} + +export function PatchedGoogleWorkspaceProviderRequestFromJSON(json: any): PatchedGoogleWorkspaceProviderRequest { + return PatchedGoogleWorkspaceProviderRequestFromJSONTyped(json, false); +} + +export function PatchedGoogleWorkspaceProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGoogleWorkspaceProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'delegatedSubject': json['delegated_subject'] == null ? undefined : json['delegated_subject'], + 'credentials': json['credentials'] == null ? undefined : json['credentials'], + 'scopes': json['scopes'] == null ? undefined : json['scopes'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'], + 'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']), + 'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']), + 'defaultGroupEmailDomain': json['default_group_email_domain'] == null ? undefined : json['default_group_email_domain'], + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function PatchedGoogleWorkspaceProviderRequestToJSON(json: any): PatchedGoogleWorkspaceProviderRequest { + return PatchedGoogleWorkspaceProviderRequestToJSONTyped(json, false); +} + +export function PatchedGoogleWorkspaceProviderRequestToJSONTyped(value?: PatchedGoogleWorkspaceProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'delegated_subject': value['delegatedSubject'], + 'credentials': value['credentials'], + 'scopes': value['scopes'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'filter_group': value['filterGroup'], + 'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']), + 'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']), + 'default_group_email_domain': value['defaultGroupEmailDomain'], + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupKerberosSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupKerberosSourceConnectionRequest.ts new file mode 100644 index 0000000000..371613e077 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupKerberosSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupKerberosSourceConnectionRequest + */ +export interface PatchedGroupKerberosSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupKerberosSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupKerberosSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupKerberosSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupKerberosSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupKerberosSourceConnectionRequest(value: object): value is PatchedGroupKerberosSourceConnectionRequest { + return true; +} + +export function PatchedGroupKerberosSourceConnectionRequestFromJSON(json: any): PatchedGroupKerberosSourceConnectionRequest { + return PatchedGroupKerberosSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupKerberosSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupKerberosSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupKerberosSourceConnectionRequestToJSON(json: any): PatchedGroupKerberosSourceConnectionRequest { + return PatchedGroupKerberosSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupKerberosSourceConnectionRequestToJSONTyped(value?: PatchedGroupKerberosSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupLDAPSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupLDAPSourceConnectionRequest.ts new file mode 100644 index 0000000000..718cee69e7 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupLDAPSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupLDAPSourceConnectionRequest + */ +export interface PatchedGroupLDAPSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupLDAPSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupLDAPSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupLDAPSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupLDAPSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupLDAPSourceConnectionRequest(value: object): value is PatchedGroupLDAPSourceConnectionRequest { + return true; +} + +export function PatchedGroupLDAPSourceConnectionRequestFromJSON(json: any): PatchedGroupLDAPSourceConnectionRequest { + return PatchedGroupLDAPSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupLDAPSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupLDAPSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupLDAPSourceConnectionRequestToJSON(json: any): PatchedGroupLDAPSourceConnectionRequest { + return PatchedGroupLDAPSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupLDAPSourceConnectionRequestToJSONTyped(value?: PatchedGroupLDAPSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupOAuthSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupOAuthSourceConnectionRequest.ts new file mode 100644 index 0000000000..c4c0fd0c83 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupOAuthSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupOAuthSourceConnectionRequest + */ +export interface PatchedGroupOAuthSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupOAuthSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupOAuthSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupOAuthSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupOAuthSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupOAuthSourceConnectionRequest(value: object): value is PatchedGroupOAuthSourceConnectionRequest { + return true; +} + +export function PatchedGroupOAuthSourceConnectionRequestFromJSON(json: any): PatchedGroupOAuthSourceConnectionRequest { + return PatchedGroupOAuthSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupOAuthSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupOAuthSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupOAuthSourceConnectionRequestToJSON(json: any): PatchedGroupOAuthSourceConnectionRequest { + return PatchedGroupOAuthSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupOAuthSourceConnectionRequestToJSONTyped(value?: PatchedGroupOAuthSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupPlexSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupPlexSourceConnectionRequest.ts new file mode 100644 index 0000000000..87262491f3 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupPlexSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupPlexSourceConnectionRequest + */ +export interface PatchedGroupPlexSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupPlexSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupPlexSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupPlexSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupPlexSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupPlexSourceConnectionRequest(value: object): value is PatchedGroupPlexSourceConnectionRequest { + return true; +} + +export function PatchedGroupPlexSourceConnectionRequestFromJSON(json: any): PatchedGroupPlexSourceConnectionRequest { + return PatchedGroupPlexSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupPlexSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupPlexSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupPlexSourceConnectionRequestToJSON(json: any): PatchedGroupPlexSourceConnectionRequest { + return PatchedGroupPlexSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupPlexSourceConnectionRequestToJSONTyped(value?: PatchedGroupPlexSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupRequest.ts b/packages/client-ts/src/models/PatchedGroupRequest.ts new file mode 100644 index 0000000000..a029755697 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupRequest.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Serializer + * @export + * @interface PatchedGroupRequest + */ +export interface PatchedGroupRequest { + /** + * + * @type {string} + * @memberof PatchedGroupRequest + */ + name?: string; + /** + * Users added to this group will be superusers. + * @type {boolean} + * @memberof PatchedGroupRequest + */ + isSuperuser?: boolean; + /** + * + * @type {Array} + * @memberof PatchedGroupRequest + */ + parents?: Array; + /** + * + * @type {Array} + * @memberof PatchedGroupRequest + */ + users?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedGroupRequest + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof PatchedGroupRequest + */ + roles?: Array; +} + +/** + * Check if a given object implements the PatchedGroupRequest interface. + */ +export function instanceOfPatchedGroupRequest(value: object): value is PatchedGroupRequest { + return true; +} + +export function PatchedGroupRequestFromJSON(json: any): PatchedGroupRequest { + return PatchedGroupRequestFromJSONTyped(json, false); +} + +export function PatchedGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'], + 'parents': json['parents'] == null ? undefined : json['parents'], + 'users': json['users'] == null ? undefined : json['users'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'roles': json['roles'] == null ? undefined : json['roles'], + }; +} + +export function PatchedGroupRequestToJSON(json: any): PatchedGroupRequest { + return PatchedGroupRequestToJSONTyped(json, false); +} + +export function PatchedGroupRequestToJSONTyped(value?: PatchedGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'is_superuser': value['isSuperuser'], + 'parents': value['parents'], + 'users': value['users'], + 'attributes': value['attributes'], + 'roles': value['roles'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupSAMLSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupSAMLSourceConnectionRequest.ts new file mode 100644 index 0000000000..dff38fbdc0 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupSAMLSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupSAMLSourceConnectionRequest + */ +export interface PatchedGroupSAMLSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupSAMLSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupSAMLSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupSAMLSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupSAMLSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupSAMLSourceConnectionRequest(value: object): value is PatchedGroupSAMLSourceConnectionRequest { + return true; +} + +export function PatchedGroupSAMLSourceConnectionRequestFromJSON(json: any): PatchedGroupSAMLSourceConnectionRequest { + return PatchedGroupSAMLSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupSAMLSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupSAMLSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupSAMLSourceConnectionRequestToJSON(json: any): PatchedGroupSAMLSourceConnectionRequest { + return PatchedGroupSAMLSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupSAMLSourceConnectionRequestToJSONTyped(value?: PatchedGroupSAMLSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupSourceConnectionRequest.ts new file mode 100644 index 0000000000..584c3b0ea2 --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupSourceConnectionRequest + */ +export interface PatchedGroupSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupSourceConnectionRequest(value: object): value is PatchedGroupSourceConnectionRequest { + return true; +} + +export function PatchedGroupSourceConnectionRequestFromJSON(json: any): PatchedGroupSourceConnectionRequest { + return PatchedGroupSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupSourceConnectionRequestToJSON(json: any): PatchedGroupSourceConnectionRequest { + return PatchedGroupSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupSourceConnectionRequestToJSONTyped(value?: PatchedGroupSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedGroupTelegramSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedGroupTelegramSourceConnectionRequest.ts new file mode 100644 index 0000000000..9fafada26a --- /dev/null +++ b/packages/client-ts/src/models/PatchedGroupTelegramSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Group Source Connection + * @export + * @interface PatchedGroupTelegramSourceConnectionRequest + */ +export interface PatchedGroupTelegramSourceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedGroupTelegramSourceConnectionRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedGroupTelegramSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedGroupTelegramSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedGroupTelegramSourceConnectionRequest interface. + */ +export function instanceOfPatchedGroupTelegramSourceConnectionRequest(value: object): value is PatchedGroupTelegramSourceConnectionRequest { + return true; +} + +export function PatchedGroupTelegramSourceConnectionRequestFromJSON(json: any): PatchedGroupTelegramSourceConnectionRequest { + return PatchedGroupTelegramSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedGroupTelegramSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGroupTelegramSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedGroupTelegramSourceConnectionRequestToJSON(json: any): PatchedGroupTelegramSourceConnectionRequest { + return PatchedGroupTelegramSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedGroupTelegramSourceConnectionRequestToJSONTyped(value?: PatchedGroupTelegramSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'group': value['group'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedIdentificationStageRequest.ts b/packages/client-ts/src/models/PatchedIdentificationStageRequest.ts new file mode 100644 index 0000000000..c48d7d5c1b --- /dev/null +++ b/packages/client-ts/src/models/PatchedIdentificationStageRequest.ts @@ -0,0 +1,177 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserFieldsEnum } from './UserFieldsEnum'; +import { + UserFieldsEnumFromJSON, + UserFieldsEnumFromJSONTyped, + UserFieldsEnumToJSON, + UserFieldsEnumToJSONTyped, +} from './UserFieldsEnum'; + +/** + * IdentificationStage Serializer + * @export + * @interface PatchedIdentificationStageRequest + */ +export interface PatchedIdentificationStageRequest { + /** + * + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + name?: string; + /** + * Fields of the user object to match against. (Hold shift to select multiple options) + * @type {Array} + * @memberof PatchedIdentificationStageRequest + */ + userFields?: Array; + /** + * When set, shows a password field, instead of showing the password field as separate step. + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + passwordStage?: string | null; + /** + * When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage. + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + captchaStage?: string | null; + /** + * When enabled, user fields are matched regardless of their casing. + * @type {boolean} + * @memberof PatchedIdentificationStageRequest + */ + caseInsensitiveMatching?: boolean; + /** + * 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 + * @type {boolean} + * @memberof PatchedIdentificationStageRequest + */ + showMatchedUser?: boolean; + /** + * Optional enrollment flow, which is linked at the bottom of the page. + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + enrollmentFlow?: string | null; + /** + * Optional recovery flow, which is linked at the bottom of the page. + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + recoveryFlow?: string | null; + /** + * Optional passwordless flow, which is linked at the bottom of the page. + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + passwordlessFlow?: string | null; + /** + * Specify which sources should be shown. + * @type {Array} + * @memberof PatchedIdentificationStageRequest + */ + sources?: Array; + /** + * + * @type {boolean} + * @memberof PatchedIdentificationStageRequest + */ + showSourceLabels?: boolean; + /** + * When enabled, the stage will succeed and continue even when incorrect user info is entered. + * @type {boolean} + * @memberof PatchedIdentificationStageRequest + */ + pretendUserExists?: boolean; + /** + * Show the user the 'Remember me on this device' toggle, allowing repeat users to skip straight to entering their password. + * @type {boolean} + * @memberof PatchedIdentificationStageRequest + */ + enableRememberMe?: boolean; + /** + * When set, and conditional WebAuthn is available, allow the user to use their passkey as a first factor. + * @type {string} + * @memberof PatchedIdentificationStageRequest + */ + webauthnStage?: string | null; +} + +/** + * Check if a given object implements the PatchedIdentificationStageRequest interface. + */ +export function instanceOfPatchedIdentificationStageRequest(value: object): value is PatchedIdentificationStageRequest { + return true; +} + +export function PatchedIdentificationStageRequestFromJSON(json: any): PatchedIdentificationStageRequest { + return PatchedIdentificationStageRequestFromJSONTyped(json, false); +} + +export function PatchedIdentificationStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedIdentificationStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'userFields': json['user_fields'] == null ? undefined : ((json['user_fields'] as Array).map(UserFieldsEnumFromJSON)), + 'passwordStage': json['password_stage'] == null ? undefined : json['password_stage'], + 'captchaStage': json['captcha_stage'] == null ? undefined : json['captcha_stage'], + 'caseInsensitiveMatching': json['case_insensitive_matching'] == null ? undefined : json['case_insensitive_matching'], + 'showMatchedUser': json['show_matched_user'] == null ? undefined : json['show_matched_user'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'recoveryFlow': json['recovery_flow'] == null ? undefined : json['recovery_flow'], + 'passwordlessFlow': json['passwordless_flow'] == null ? undefined : json['passwordless_flow'], + 'sources': json['sources'] == null ? undefined : json['sources'], + 'showSourceLabels': json['show_source_labels'] == null ? undefined : json['show_source_labels'], + 'pretendUserExists': json['pretend_user_exists'] == null ? undefined : json['pretend_user_exists'], + 'enableRememberMe': json['enable_remember_me'] == null ? undefined : json['enable_remember_me'], + 'webauthnStage': json['webauthn_stage'] == null ? undefined : json['webauthn_stage'], + }; +} + +export function PatchedIdentificationStageRequestToJSON(json: any): PatchedIdentificationStageRequest { + return PatchedIdentificationStageRequestToJSONTyped(json, false); +} + +export function PatchedIdentificationStageRequestToJSONTyped(value?: PatchedIdentificationStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'user_fields': value['userFields'] == null ? undefined : ((value['userFields'] as Array).map(UserFieldsEnumToJSON)), + 'password_stage': value['passwordStage'], + 'captcha_stage': value['captchaStage'], + 'case_insensitive_matching': value['caseInsensitiveMatching'], + 'show_matched_user': value['showMatchedUser'], + 'enrollment_flow': value['enrollmentFlow'], + 'recovery_flow': value['recoveryFlow'], + 'passwordless_flow': value['passwordlessFlow'], + 'sources': value['sources'], + 'show_source_labels': value['showSourceLabels'], + 'pretend_user_exists': value['pretendUserExists'], + 'enable_remember_me': value['enableRememberMe'], + 'webauthn_stage': value['webauthnStage'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedInitialPermissionsRequest.ts b/packages/client-ts/src/models/PatchedInitialPermissionsRequest.ts new file mode 100644 index 0000000000..8f118835fc --- /dev/null +++ b/packages/client-ts/src/models/PatchedInitialPermissionsRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * InitialPermissions serializer + * @export + * @interface PatchedInitialPermissionsRequest + */ +export interface PatchedInitialPermissionsRequest { + /** + * + * @type {string} + * @memberof PatchedInitialPermissionsRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedInitialPermissionsRequest + */ + role?: string; + /** + * + * @type {Array} + * @memberof PatchedInitialPermissionsRequest + */ + permissions?: Array; +} + +/** + * Check if a given object implements the PatchedInitialPermissionsRequest interface. + */ +export function instanceOfPatchedInitialPermissionsRequest(value: object): value is PatchedInitialPermissionsRequest { + return true; +} + +export function PatchedInitialPermissionsRequestFromJSON(json: any): PatchedInitialPermissionsRequest { + return PatchedInitialPermissionsRequestFromJSONTyped(json, false); +} + +export function PatchedInitialPermissionsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInitialPermissionsRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'role': json['role'] == null ? undefined : json['role'], + 'permissions': json['permissions'] == null ? undefined : json['permissions'], + }; +} + +export function PatchedInitialPermissionsRequestToJSON(json: any): PatchedInitialPermissionsRequest { + return PatchedInitialPermissionsRequestToJSONTyped(json, false); +} + +export function PatchedInitialPermissionsRequestToJSONTyped(value?: PatchedInitialPermissionsRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'role': value['role'], + 'permissions': value['permissions'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedInvitationRequest.ts b/packages/client-ts/src/models/PatchedInvitationRequest.ts new file mode 100644 index 0000000000..63256db0ec --- /dev/null +++ b/packages/client-ts/src/models/PatchedInvitationRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Invitation Serializer + * @export + * @interface PatchedInvitationRequest + */ +export interface PatchedInvitationRequest { + /** + * + * @type {string} + * @memberof PatchedInvitationRequest + */ + name?: string; + /** + * + * @type {Date} + * @memberof PatchedInvitationRequest + */ + expires?: Date | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedInvitationRequest + */ + fixedData?: { [key: string]: any; }; + /** + * When enabled, the invitation will be deleted after usage. + * @type {boolean} + * @memberof PatchedInvitationRequest + */ + singleUse?: boolean; + /** + * When set, only the configured flow can use this invitation. + * @type {string} + * @memberof PatchedInvitationRequest + */ + flow?: string | null; +} + +/** + * Check if a given object implements the PatchedInvitationRequest interface. + */ +export function instanceOfPatchedInvitationRequest(value: object): value is PatchedInvitationRequest { + return true; +} + +export function PatchedInvitationRequestFromJSON(json: any): PatchedInvitationRequest { + return PatchedInvitationRequestFromJSONTyped(json, false); +} + +export function PatchedInvitationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInvitationRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'fixedData': json['fixed_data'] == null ? undefined : json['fixed_data'], + 'singleUse': json['single_use'] == null ? undefined : json['single_use'], + 'flow': json['flow'] == null ? undefined : json['flow'], + }; +} + +export function PatchedInvitationRequestToJSON(json: any): PatchedInvitationRequest { + return PatchedInvitationRequestToJSONTyped(json, false); +} + +export function PatchedInvitationRequestToJSONTyped(value?: PatchedInvitationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'fixed_data': value['fixedData'], + 'single_use': value['singleUse'], + 'flow': value['flow'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedInvitationStageRequest.ts b/packages/client-ts/src/models/PatchedInvitationStageRequest.ts new file mode 100644 index 0000000000..80b4064614 --- /dev/null +++ b/packages/client-ts/src/models/PatchedInvitationStageRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * InvitationStage Serializer + * @export + * @interface PatchedInvitationStageRequest + */ +export interface PatchedInvitationStageRequest { + /** + * + * @type {string} + * @memberof PatchedInvitationStageRequest + */ + name?: string; + /** + * 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. + * @type {boolean} + * @memberof PatchedInvitationStageRequest + */ + continueFlowWithoutInvitation?: boolean; +} + +/** + * Check if a given object implements the PatchedInvitationStageRequest interface. + */ +export function instanceOfPatchedInvitationStageRequest(value: object): value is PatchedInvitationStageRequest { + return true; +} + +export function PatchedInvitationStageRequestFromJSON(json: any): PatchedInvitationStageRequest { + return PatchedInvitationStageRequestFromJSONTyped(json, false); +} + +export function PatchedInvitationStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInvitationStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'continueFlowWithoutInvitation': json['continue_flow_without_invitation'] == null ? undefined : json['continue_flow_without_invitation'], + }; +} + +export function PatchedInvitationStageRequestToJSON(json: any): PatchedInvitationStageRequest { + return PatchedInvitationStageRequestToJSONTyped(json, false); +} + +export function PatchedInvitationStageRequestToJSONTyped(value?: PatchedInvitationStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'continue_flow_without_invitation': value['continueFlowWithoutInvitation'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedKerberosSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedKerberosSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..4f51aa6a71 --- /dev/null +++ b/packages/client-ts/src/models/PatchedKerberosSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Kerberos PropertyMapping Serializer + * @export + * @interface PatchedKerberosSourcePropertyMappingRequest + */ +export interface PatchedKerberosSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedKerberosSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedKerberosSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedKerberosSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedKerberosSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedKerberosSourcePropertyMappingRequest(value: object): value is PatchedKerberosSourcePropertyMappingRequest { + return true; +} + +export function PatchedKerberosSourcePropertyMappingRequestFromJSON(json: any): PatchedKerberosSourcePropertyMappingRequest { + return PatchedKerberosSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedKerberosSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKerberosSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedKerberosSourcePropertyMappingRequestToJSON(json: any): PatchedKerberosSourcePropertyMappingRequest { + return PatchedKerberosSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedKerberosSourcePropertyMappingRequestToJSONTyped(value?: PatchedKerberosSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedKerberosSourceRequest.ts b/packages/client-ts/src/models/PatchedKerberosSourceRequest.ts new file mode 100644 index 0000000000..2cef7739da --- /dev/null +++ b/packages/client-ts/src/models/PatchedKerberosSourceRequest.ts @@ -0,0 +1,311 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { KadminTypeEnum } from './KadminTypeEnum'; +import { + KadminTypeEnumFromJSON, + KadminTypeEnumFromJSONTyped, + KadminTypeEnumToJSON, + KadminTypeEnumToJSONTyped, +} from './KadminTypeEnum'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SyncOutgoingTriggerModeEnum } from './SyncOutgoingTriggerModeEnum'; +import { + SyncOutgoingTriggerModeEnumFromJSON, + SyncOutgoingTriggerModeEnumFromJSONTyped, + SyncOutgoingTriggerModeEnumToJSON, + SyncOutgoingTriggerModeEnumToJSONTyped, +} from './SyncOutgoingTriggerModeEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * Kerberos Source Serializer + * @export + * @interface PatchedKerberosSourceRequest + */ +export interface PatchedKerberosSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedKerberosSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PatchedKerberosSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PatchedKerberosSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedKerberosSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedKerberosSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PatchedKerberosSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof PatchedKerberosSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Kerberos realm + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + realm?: string; + /** + * Custom krb5.conf to use. Uses the system one by default + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + krb5Conf?: string; + /** + * KAdmin server type + * @type {KadminTypeEnum} + * @memberof PatchedKerberosSourceRequest + */ + kadminType?: KadminTypeEnum; + /** + * Sync users from Kerberos into authentik + * @type {boolean} + * @memberof PatchedKerberosSourceRequest + */ + syncUsers?: boolean; + /** + * When a user changes their password, sync it back to Kerberos + * @type {boolean} + * @memberof PatchedKerberosSourceRequest + */ + syncUsersPassword?: boolean; + /** + * Principal to authenticate to kadmin for sync. + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + syncPrincipal?: string; + /** + * Password to authenticate to kadmin for sync + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + syncPassword?: string; + /** + * Keytab to authenticate to kadmin for sync. Must be base64-encoded or in the form TYPE:residual + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + syncKeytab?: string; + /** + * Credentials cache to authenticate to kadmin for sync. Must be in the form TYPE:residual + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + syncCcache?: string; + /** + * Force the use of a specific server name for SPNEGO. Must be in the form HTTP@hostname + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + spnegoServerName?: string; + /** + * SPNEGO keytab base64-encoded or path to keytab in the form FILE:path + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + spnegoKeytab?: string; + /** + * Credential cache to use for SPNEGO in form type:residual + * @type {string} + * @memberof PatchedKerberosSourceRequest + */ + spnegoCcache?: string; + /** + * If enabled, the authentik-stored password will be updated upon login with the Kerberos password backend + * @type {boolean} + * @memberof PatchedKerberosSourceRequest + */ + passwordLoginUpdateInternalPassword?: boolean; + /** + * When to trigger sync for outgoing providers + * @type {SyncOutgoingTriggerModeEnum} + * @memberof PatchedKerberosSourceRequest + */ + syncOutgoingTriggerMode?: SyncOutgoingTriggerModeEnum; +} + + + +/** + * Check if a given object implements the PatchedKerberosSourceRequest interface. + */ +export function instanceOfPatchedKerberosSourceRequest(value: object): value is PatchedKerberosSourceRequest { + return true; +} + +export function PatchedKerberosSourceRequestFromJSON(json: any): PatchedKerberosSourceRequest { + return PatchedKerberosSourceRequestFromJSONTyped(json, false); +} + +export function PatchedKerberosSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKerberosSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'realm': json['realm'] == null ? undefined : json['realm'], + 'krb5Conf': json['krb5_conf'] == null ? undefined : json['krb5_conf'], + 'kadminType': json['kadmin_type'] == null ? undefined : KadminTypeEnumFromJSON(json['kadmin_type']), + 'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'], + 'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'], + 'syncPrincipal': json['sync_principal'] == null ? undefined : json['sync_principal'], + 'syncPassword': json['sync_password'] == null ? undefined : json['sync_password'], + 'syncKeytab': json['sync_keytab'] == null ? undefined : json['sync_keytab'], + 'syncCcache': json['sync_ccache'] == null ? undefined : json['sync_ccache'], + 'spnegoServerName': json['spnego_server_name'] == null ? undefined : json['spnego_server_name'], + 'spnegoKeytab': json['spnego_keytab'] == null ? undefined : json['spnego_keytab'], + 'spnegoCcache': json['spnego_ccache'] == null ? undefined : json['spnego_ccache'], + 'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'], + 'syncOutgoingTriggerMode': json['sync_outgoing_trigger_mode'] == null ? undefined : SyncOutgoingTriggerModeEnumFromJSON(json['sync_outgoing_trigger_mode']), + }; +} + +export function PatchedKerberosSourceRequestToJSON(json: any): PatchedKerberosSourceRequest { + return PatchedKerberosSourceRequestToJSONTyped(json, false); +} + +export function PatchedKerberosSourceRequestToJSONTyped(value?: PatchedKerberosSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'realm': value['realm'], + 'krb5_conf': value['krb5Conf'], + 'kadmin_type': KadminTypeEnumToJSON(value['kadminType']), + 'sync_users': value['syncUsers'], + 'sync_users_password': value['syncUsersPassword'], + 'sync_principal': value['syncPrincipal'], + 'sync_password': value['syncPassword'], + 'sync_keytab': value['syncKeytab'], + 'sync_ccache': value['syncCcache'], + 'spnego_server_name': value['spnegoServerName'], + 'spnego_keytab': value['spnegoKeytab'], + 'spnego_ccache': value['spnegoCcache'], + 'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'], + 'sync_outgoing_trigger_mode': SyncOutgoingTriggerModeEnumToJSON(value['syncOutgoingTriggerMode']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedKubernetesServiceConnectionRequest.ts b/packages/client-ts/src/models/PatchedKubernetesServiceConnectionRequest.ts new file mode 100644 index 0000000000..f737b965af --- /dev/null +++ b/packages/client-ts/src/models/PatchedKubernetesServiceConnectionRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * KubernetesServiceConnection Serializer + * @export + * @interface PatchedKubernetesServiceConnectionRequest + */ +export interface PatchedKubernetesServiceConnectionRequest { + /** + * + * @type {string} + * @memberof PatchedKubernetesServiceConnectionRequest + */ + name?: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof PatchedKubernetesServiceConnectionRequest + */ + local?: boolean; + /** + * Paste your kubeconfig here. authentik will automatically use the currently selected context. + * @type {{ [key: string]: any; }} + * @memberof PatchedKubernetesServiceConnectionRequest + */ + kubeconfig?: { [key: string]: any; }; + /** + * Verify SSL Certificates of the Kubernetes API endpoint + * @type {boolean} + * @memberof PatchedKubernetesServiceConnectionRequest + */ + verifySsl?: boolean; +} + +/** + * Check if a given object implements the PatchedKubernetesServiceConnectionRequest interface. + */ +export function instanceOfPatchedKubernetesServiceConnectionRequest(value: object): value is PatchedKubernetesServiceConnectionRequest { + return true; +} + +export function PatchedKubernetesServiceConnectionRequestFromJSON(json: any): PatchedKubernetesServiceConnectionRequest { + return PatchedKubernetesServiceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedKubernetesServiceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKubernetesServiceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'kubeconfig': json['kubeconfig'] == null ? undefined : json['kubeconfig'], + 'verifySsl': json['verify_ssl'] == null ? undefined : json['verify_ssl'], + }; +} + +export function PatchedKubernetesServiceConnectionRequestToJSON(json: any): PatchedKubernetesServiceConnectionRequest { + return PatchedKubernetesServiceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedKubernetesServiceConnectionRequestToJSONTyped(value?: PatchedKubernetesServiceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + 'kubeconfig': value['kubeconfig'], + 'verify_ssl': value['verifySsl'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedLDAPProviderRequest.ts b/packages/client-ts/src/models/PatchedLDAPProviderRequest.ts new file mode 100644 index 0000000000..9efd529202 --- /dev/null +++ b/packages/client-ts/src/models/PatchedLDAPProviderRequest.ts @@ -0,0 +1,171 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LDAPAPIAccessMode } from './LDAPAPIAccessMode'; +import { + LDAPAPIAccessModeFromJSON, + LDAPAPIAccessModeFromJSONTyped, + LDAPAPIAccessModeToJSON, + LDAPAPIAccessModeToJSONTyped, +} from './LDAPAPIAccessMode'; + +/** + * LDAPProvider Serializer + * @export + * @interface PatchedLDAPProviderRequest + */ +export interface PatchedLDAPProviderRequest { + /** + * + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + authorizationFlow?: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + invalidationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedLDAPProviderRequest + */ + propertyMappings?: Array; + /** + * DN under which objects are accessible. + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + baseDn?: string; + /** + * + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + certificate?: string | null; + /** + * + * @type {string} + * @memberof PatchedLDAPProviderRequest + */ + 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 + * @type {number} + * @memberof PatchedLDAPProviderRequest + */ + uidStartNumber?: number; + /** + * 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 + * @type {number} + * @memberof PatchedLDAPProviderRequest + */ + gidStartNumber?: number; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof PatchedLDAPProviderRequest + */ + searchMode?: LDAPAPIAccessMode; + /** + * + * @type {LDAPAPIAccessMode} + * @memberof PatchedLDAPProviderRequest + */ + 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. + * @type {boolean} + * @memberof PatchedLDAPProviderRequest + */ + mfaSupport?: boolean; +} + + + +/** + * Check if a given object implements the PatchedLDAPProviderRequest interface. + */ +export function instanceOfPatchedLDAPProviderRequest(value: object): value is PatchedLDAPProviderRequest { + return true; +} + +export function PatchedLDAPProviderRequestFromJSON(json: any): PatchedLDAPProviderRequest { + return PatchedLDAPProviderRequestFromJSONTyped(json, false); +} + +export function PatchedLDAPProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedLDAPProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'baseDn': json['base_dn'] == null ? undefined : json['base_dn'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'tlsServerName': json['tls_server_name'] == null ? undefined : json['tls_server_name'], + 'uidStartNumber': json['uid_start_number'] == null ? undefined : json['uid_start_number'], + 'gidStartNumber': json['gid_start_number'] == null ? undefined : json['gid_start_number'], + 'searchMode': json['search_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['search_mode']), + 'bindMode': json['bind_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['bind_mode']), + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + }; +} + +export function PatchedLDAPProviderRequestToJSON(json: any): PatchedLDAPProviderRequest { + return PatchedLDAPProviderRequestToJSONTyped(json, false); +} + +export function PatchedLDAPProviderRequestToJSONTyped(value?: PatchedLDAPProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'base_dn': value['baseDn'], + 'certificate': value['certificate'], + 'tls_server_name': value['tlsServerName'], + 'uid_start_number': value['uidStartNumber'], + 'gid_start_number': value['gidStartNumber'], + 'search_mode': LDAPAPIAccessModeToJSON(value['searchMode']), + 'bind_mode': LDAPAPIAccessModeToJSON(value['bindMode']), + 'mfa_support': value['mfaSupport'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedLDAPSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedLDAPSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..2095b64ccb --- /dev/null +++ b/packages/client-ts/src/models/PatchedLDAPSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * LDAP PropertyMapping Serializer + * @export + * @interface PatchedLDAPSourcePropertyMappingRequest + */ +export interface PatchedLDAPSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedLDAPSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedLDAPSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedLDAPSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedLDAPSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedLDAPSourcePropertyMappingRequest(value: object): value is PatchedLDAPSourcePropertyMappingRequest { + return true; +} + +export function PatchedLDAPSourcePropertyMappingRequestFromJSON(json: any): PatchedLDAPSourcePropertyMappingRequest { + return PatchedLDAPSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedLDAPSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedLDAPSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedLDAPSourcePropertyMappingRequestToJSON(json: any): PatchedLDAPSourcePropertyMappingRequest { + return PatchedLDAPSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedLDAPSourcePropertyMappingRequestToJSONTyped(value?: PatchedLDAPSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedLDAPSourceRequest.ts b/packages/client-ts/src/models/PatchedLDAPSourceRequest.ts new file mode 100644 index 0000000000..ad39f233ca --- /dev/null +++ b/packages/client-ts/src/models/PatchedLDAPSourceRequest.ts @@ -0,0 +1,361 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SyncOutgoingTriggerModeEnum } from './SyncOutgoingTriggerModeEnum'; +import { + SyncOutgoingTriggerModeEnumFromJSON, + SyncOutgoingTriggerModeEnumFromJSONTyped, + SyncOutgoingTriggerModeEnumToJSON, + SyncOutgoingTriggerModeEnumToJSONTyped, +} from './SyncOutgoingTriggerModeEnum'; + +/** + * LDAP Source Serializer + * @export + * @interface PatchedLDAPSourceRequest + */ +export interface PatchedLDAPSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PatchedLDAPSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedLDAPSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedLDAPSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PatchedLDAPSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + icon?: string; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + serverUri?: string; + /** + * Optionally verify the LDAP Server's Certificate against the CA Chain in this keypair. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + peerCertificate?: string | null; + /** + * Client certificate to authenticate against the LDAP Server's Certificate. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + clientCertificate?: string | null; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + bindCn?: string; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + bindPassword?: string; + /** + * + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + startTls?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + sni?: boolean; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + baseDn?: string; + /** + * Prepended to Base DN for User-queries. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + additionalUserDn?: string; + /** + * Prepended to Base DN for Group-queries. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + additionalGroupDn?: string; + /** + * Consider Objects matching this filter to be Users. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + userObjectFilter?: string; + /** + * Consider Objects matching this filter to be Groups. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + groupObjectFilter?: string; + /** + * Field which contains members of a group. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + groupMembershipField?: string; + /** + * Attribute which matches the value of `group_membership_field`. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + userMembershipAttribute?: string; + /** + * Field which contains a unique Identifier. + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + objectUniquenessField?: string; + /** + * Update internal authentik password when login succeeds with LDAP + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + passwordLoginUpdateInternalPassword?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + syncUsers?: boolean; + /** + * When a user changes their password, sync it back to LDAP. This can only be enabled on a single LDAP source. + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + syncUsersPassword?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + syncGroups?: boolean; + /** + * + * @type {string} + * @memberof PatchedLDAPSourceRequest + */ + syncParentGroup?: string | null; + /** + * Lookup group membership based on a user attribute instead of a group attribute. This allows nested group resolution on systems like FreeIPA and Active Directory + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + lookupGroupsFromUser?: boolean; + /** + * Delete authentik users and groups which were previously supplied by this source, but are now missing from it. + * @type {boolean} + * @memberof PatchedLDAPSourceRequest + */ + deleteNotFoundObjects?: boolean; + /** + * When to trigger sync for outgoing providers + * @type {SyncOutgoingTriggerModeEnum} + * @memberof PatchedLDAPSourceRequest + */ + syncOutgoingTriggerMode?: SyncOutgoingTriggerModeEnum; +} + + + +/** + * Check if a given object implements the PatchedLDAPSourceRequest interface. + */ +export function instanceOfPatchedLDAPSourceRequest(value: object): value is PatchedLDAPSourceRequest { + return true; +} + +export function PatchedLDAPSourceRequestFromJSON(json: any): PatchedLDAPSourceRequest { + return PatchedLDAPSourceRequestFromJSONTyped(json, false); +} + +export function PatchedLDAPSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedLDAPSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'serverUri': json['server_uri'] == null ? undefined : json['server_uri'], + 'peerCertificate': json['peer_certificate'] == null ? undefined : json['peer_certificate'], + 'clientCertificate': json['client_certificate'] == null ? undefined : json['client_certificate'], + 'bindCn': json['bind_cn'] == null ? undefined : json['bind_cn'], + 'bindPassword': json['bind_password'] == null ? undefined : json['bind_password'], + 'startTls': json['start_tls'] == null ? undefined : json['start_tls'], + 'sni': json['sni'] == null ? undefined : json['sni'], + 'baseDn': json['base_dn'] == null ? undefined : json['base_dn'], + 'additionalUserDn': json['additional_user_dn'] == null ? undefined : json['additional_user_dn'], + 'additionalGroupDn': json['additional_group_dn'] == null ? undefined : json['additional_group_dn'], + 'userObjectFilter': json['user_object_filter'] == null ? undefined : json['user_object_filter'], + 'groupObjectFilter': json['group_object_filter'] == null ? undefined : json['group_object_filter'], + 'groupMembershipField': json['group_membership_field'] == null ? undefined : json['group_membership_field'], + 'userMembershipAttribute': json['user_membership_attribute'] == null ? undefined : json['user_membership_attribute'], + 'objectUniquenessField': json['object_uniqueness_field'] == null ? undefined : json['object_uniqueness_field'], + 'passwordLoginUpdateInternalPassword': json['password_login_update_internal_password'] == null ? undefined : json['password_login_update_internal_password'], + 'syncUsers': json['sync_users'] == null ? undefined : json['sync_users'], + 'syncUsersPassword': json['sync_users_password'] == null ? undefined : json['sync_users_password'], + 'syncGroups': json['sync_groups'] == null ? undefined : json['sync_groups'], + 'syncParentGroup': json['sync_parent_group'] == null ? undefined : json['sync_parent_group'], + 'lookupGroupsFromUser': json['lookup_groups_from_user'] == null ? undefined : json['lookup_groups_from_user'], + 'deleteNotFoundObjects': json['delete_not_found_objects'] == null ? undefined : json['delete_not_found_objects'], + 'syncOutgoingTriggerMode': json['sync_outgoing_trigger_mode'] == null ? undefined : SyncOutgoingTriggerModeEnumFromJSON(json['sync_outgoing_trigger_mode']), + }; +} + +export function PatchedLDAPSourceRequestToJSON(json: any): PatchedLDAPSourceRequest { + return PatchedLDAPSourceRequestToJSONTyped(json, false); +} + +export function PatchedLDAPSourceRequestToJSONTyped(value?: PatchedLDAPSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'server_uri': value['serverUri'], + 'peer_certificate': value['peerCertificate'], + 'client_certificate': value['clientCertificate'], + 'bind_cn': value['bindCn'], + 'bind_password': value['bindPassword'], + 'start_tls': value['startTls'], + 'sni': value['sni'], + 'base_dn': value['baseDn'], + 'additional_user_dn': value['additionalUserDn'], + 'additional_group_dn': value['additionalGroupDn'], + 'user_object_filter': value['userObjectFilter'], + 'group_object_filter': value['groupObjectFilter'], + 'group_membership_field': value['groupMembershipField'], + 'user_membership_attribute': value['userMembershipAttribute'], + 'object_uniqueness_field': value['objectUniquenessField'], + 'password_login_update_internal_password': value['passwordLoginUpdateInternalPassword'], + 'sync_users': value['syncUsers'], + 'sync_users_password': value['syncUsersPassword'], + 'sync_groups': value['syncGroups'], + 'sync_parent_group': value['syncParentGroup'], + 'lookup_groups_from_user': value['lookupGroupsFromUser'], + 'delete_not_found_objects': value['deleteNotFoundObjects'], + 'sync_outgoing_trigger_mode': SyncOutgoingTriggerModeEnumToJSON(value['syncOutgoingTriggerMode']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedLicenseRequest.ts b/packages/client-ts/src/models/PatchedLicenseRequest.ts new file mode 100644 index 0000000000..f139a04c26 --- /dev/null +++ b/packages/client-ts/src/models/PatchedLicenseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * License Serializer + * @export + * @interface PatchedLicenseRequest + */ +export interface PatchedLicenseRequest { + /** + * + * @type {string} + * @memberof PatchedLicenseRequest + */ + key?: string; +} + +/** + * Check if a given object implements the PatchedLicenseRequest interface. + */ +export function instanceOfPatchedLicenseRequest(value: object): value is PatchedLicenseRequest { + return true; +} + +export function PatchedLicenseRequestFromJSON(json: any): PatchedLicenseRequest { + return PatchedLicenseRequestFromJSONTyped(json, false); +} + +export function PatchedLicenseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedLicenseRequest { + if (json == null) { + return json; + } + return { + + 'key': json['key'] == null ? undefined : json['key'], + }; +} + +export function PatchedLicenseRequestToJSON(json: any): PatchedLicenseRequest { + return PatchedLicenseRequestToJSONTyped(json, false); +} + +export function PatchedLicenseRequestToJSONTyped(value?: PatchedLicenseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'key': value['key'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedLifecycleRuleRequest.ts b/packages/client-ts/src/models/PatchedLifecycleRuleRequest.ts new file mode 100644 index 0000000000..14746c855b --- /dev/null +++ b/packages/client-ts/src/models/PatchedLifecycleRuleRequest.ts @@ -0,0 +1,148 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ContentTypeEnum } from './ContentTypeEnum'; +import { + ContentTypeEnumFromJSON, + ContentTypeEnumFromJSONTyped, + ContentTypeEnumToJSON, + ContentTypeEnumToJSONTyped, +} from './ContentTypeEnum'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface PatchedLifecycleRuleRequest + */ +export interface PatchedLifecycleRuleRequest { + /** + * + * @type {string} + * @memberof PatchedLifecycleRuleRequest + */ + name?: string; + /** + * + * @type {ContentTypeEnum} + * @memberof PatchedLifecycleRuleRequest + */ + contentType?: ContentTypeEnum; + /** + * + * @type {string} + * @memberof PatchedLifecycleRuleRequest + */ + objectId?: string | null; + /** + * + * @type {string} + * @memberof PatchedLifecycleRuleRequest + */ + interval?: string; + /** + * + * @type {string} + * @memberof PatchedLifecycleRuleRequest + */ + gracePeriod?: string; + /** + * + * @type {Array} + * @memberof PatchedLifecycleRuleRequest + */ + reviewerGroups?: Array; + /** + * + * @type {number} + * @memberof PatchedLifecycleRuleRequest + */ + minReviewers?: number; + /** + * + * @type {boolean} + * @memberof PatchedLifecycleRuleRequest + */ + minReviewersIsPerGroup?: boolean; + /** + * + * @type {Array} + * @memberof PatchedLifecycleRuleRequest + */ + reviewers?: Array; + /** + * Select which transports should be used to notify the reviewers. If none are selected, the notification will only be shown in the authentik UI. + * @type {Array} + * @memberof PatchedLifecycleRuleRequest + */ + notificationTransports?: Array; +} + + + +/** + * Check if a given object implements the PatchedLifecycleRuleRequest interface. + */ +export function instanceOfPatchedLifecycleRuleRequest(value: object): value is PatchedLifecycleRuleRequest { + return true; +} + +export function PatchedLifecycleRuleRequestFromJSON(json: any): PatchedLifecycleRuleRequest { + return PatchedLifecycleRuleRequestFromJSONTyped(json, false); +} + +export function PatchedLifecycleRuleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedLifecycleRuleRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'contentType': json['content_type'] == null ? undefined : ContentTypeEnumFromJSON(json['content_type']), + 'objectId': json['object_id'] == null ? undefined : json['object_id'], + 'interval': json['interval'] == null ? undefined : json['interval'], + 'gracePeriod': json['grace_period'] == null ? undefined : json['grace_period'], + 'reviewerGroups': json['reviewer_groups'] == null ? undefined : json['reviewer_groups'], + 'minReviewers': json['min_reviewers'] == null ? undefined : json['min_reviewers'], + 'minReviewersIsPerGroup': json['min_reviewers_is_per_group'] == null ? undefined : json['min_reviewers_is_per_group'], + 'reviewers': json['reviewers'] == null ? undefined : json['reviewers'], + 'notificationTransports': json['notification_transports'] == null ? undefined : json['notification_transports'], + }; +} + +export function PatchedLifecycleRuleRequestToJSON(json: any): PatchedLifecycleRuleRequest { + return PatchedLifecycleRuleRequestToJSONTyped(json, false); +} + +export function PatchedLifecycleRuleRequestToJSONTyped(value?: PatchedLifecycleRuleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'content_type': ContentTypeEnumToJSON(value['contentType']), + 'object_id': value['objectId'], + 'interval': value['interval'], + 'grace_period': value['gracePeriod'], + 'reviewer_groups': value['reviewerGroups'], + 'min_reviewers': value['minReviewers'], + 'min_reviewers_is_per_group': value['minReviewersIsPerGroup'], + 'reviewers': value['reviewers'], + 'notification_transports': value['notificationTransports'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedMicrosoftEntraProviderMappingRequest.ts b/packages/client-ts/src/models/PatchedMicrosoftEntraProviderMappingRequest.ts new file mode 100644 index 0000000000..76c60954b6 --- /dev/null +++ b/packages/client-ts/src/models/PatchedMicrosoftEntraProviderMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * MicrosoftEntraProviderMapping Serializer + * @export + * @interface PatchedMicrosoftEntraProviderMappingRequest + */ +export interface PatchedMicrosoftEntraProviderMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedMicrosoftEntraProviderMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedMicrosoftEntraProviderMappingRequest interface. + */ +export function instanceOfPatchedMicrosoftEntraProviderMappingRequest(value: object): value is PatchedMicrosoftEntraProviderMappingRequest { + return true; +} + +export function PatchedMicrosoftEntraProviderMappingRequestFromJSON(json: any): PatchedMicrosoftEntraProviderMappingRequest { + return PatchedMicrosoftEntraProviderMappingRequestFromJSONTyped(json, false); +} + +export function PatchedMicrosoftEntraProviderMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMicrosoftEntraProviderMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedMicrosoftEntraProviderMappingRequestToJSON(json: any): PatchedMicrosoftEntraProviderMappingRequest { + return PatchedMicrosoftEntraProviderMappingRequestToJSONTyped(json, false); +} + +export function PatchedMicrosoftEntraProviderMappingRequestToJSONTyped(value?: PatchedMicrosoftEntraProviderMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedMicrosoftEntraProviderRequest.ts b/packages/client-ts/src/models/PatchedMicrosoftEntraProviderRequest.ts new file mode 100644 index 0000000000..a2b9a2d19b --- /dev/null +++ b/packages/client-ts/src/models/PatchedMicrosoftEntraProviderRequest.ts @@ -0,0 +1,171 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction'; +import { + OutgoingSyncDeleteActionFromJSON, + OutgoingSyncDeleteActionFromJSONTyped, + OutgoingSyncDeleteActionToJSON, + OutgoingSyncDeleteActionToJSONTyped, +} from './OutgoingSyncDeleteAction'; + +/** + * MicrosoftEntraProvider Serializer + * @export + * @interface PatchedMicrosoftEntraProviderRequest + */ +export interface PatchedMicrosoftEntraProviderRequest { + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + name?: string; + /** + * + * @type {Array} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + propertyMappingsGroup?: Array; + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + clientId?: string; + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + clientSecret?: string; + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + tenantId?: string; + /** + * + * @type {boolean} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + excludeUsersServiceAccount?: boolean; + /** + * + * @type {string} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + filterGroup?: string | null; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + userDeleteAction?: OutgoingSyncDeleteAction; + /** + * + * @type {OutgoingSyncDeleteAction} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + groupDeleteAction?: OutgoingSyncDeleteAction; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + syncPageTimeout?: string; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof PatchedMicrosoftEntraProviderRequest + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the PatchedMicrosoftEntraProviderRequest interface. + */ +export function instanceOfPatchedMicrosoftEntraProviderRequest(value: object): value is PatchedMicrosoftEntraProviderRequest { + return true; +} + +export function PatchedMicrosoftEntraProviderRequestFromJSON(json: any): PatchedMicrosoftEntraProviderRequest { + return PatchedMicrosoftEntraProviderRequestFromJSONTyped(json, false); +} + +export function PatchedMicrosoftEntraProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMicrosoftEntraProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'], + 'tenantId': json['tenant_id'] == null ? undefined : json['tenant_id'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'], + 'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']), + 'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']), + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function PatchedMicrosoftEntraProviderRequestToJSON(json: any): PatchedMicrosoftEntraProviderRequest { + return PatchedMicrosoftEntraProviderRequestToJSONTyped(json, false); +} + +export function PatchedMicrosoftEntraProviderRequestToJSONTyped(value?: PatchedMicrosoftEntraProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'tenant_id': value['tenantId'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'filter_group': value['filterGroup'], + 'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']), + 'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']), + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedMutualTLSStageRequest.ts b/packages/client-ts/src/models/PatchedMutualTLSStageRequest.ts new file mode 100644 index 0000000000..cb38e2b2ed --- /dev/null +++ b/packages/client-ts/src/models/PatchedMutualTLSStageRequest.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { StageModeEnum } from './StageModeEnum'; +import { + StageModeEnumFromJSON, + StageModeEnumFromJSONTyped, + StageModeEnumToJSON, + StageModeEnumToJSONTyped, +} from './StageModeEnum'; +import type { CertAttributeEnum } from './CertAttributeEnum'; +import { + CertAttributeEnumFromJSON, + CertAttributeEnumFromJSONTyped, + CertAttributeEnumToJSON, + CertAttributeEnumToJSONTyped, +} from './CertAttributeEnum'; +import type { UserAttributeEnum } from './UserAttributeEnum'; +import { + UserAttributeEnumFromJSON, + UserAttributeEnumFromJSONTyped, + UserAttributeEnumToJSON, + UserAttributeEnumToJSONTyped, +} from './UserAttributeEnum'; + +/** + * MutualTLSStage Serializer + * @export + * @interface PatchedMutualTLSStageRequest + */ +export interface PatchedMutualTLSStageRequest { + /** + * + * @type {string} + * @memberof PatchedMutualTLSStageRequest + */ + name?: string; + /** + * + * @type {StageModeEnum} + * @memberof PatchedMutualTLSStageRequest + */ + mode?: StageModeEnum; + /** + * Configure certificate authorities to validate the certificate against. This option has a higher priority than the `client_certificate` option on `Brand`. + * @type {Array} + * @memberof PatchedMutualTLSStageRequest + */ + certificateAuthorities?: Array; + /** + * + * @type {CertAttributeEnum} + * @memberof PatchedMutualTLSStageRequest + */ + certAttribute?: CertAttributeEnum; + /** + * + * @type {UserAttributeEnum} + * @memberof PatchedMutualTLSStageRequest + */ + userAttribute?: UserAttributeEnum; +} + + + +/** + * Check if a given object implements the PatchedMutualTLSStageRequest interface. + */ +export function instanceOfPatchedMutualTLSStageRequest(value: object): value is PatchedMutualTLSStageRequest { + return true; +} + +export function PatchedMutualTLSStageRequestFromJSON(json: any): PatchedMutualTLSStageRequest { + return PatchedMutualTLSStageRequestFromJSONTyped(json, false); +} + +export function PatchedMutualTLSStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMutualTLSStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'mode': json['mode'] == null ? undefined : StageModeEnumFromJSON(json['mode']), + 'certificateAuthorities': json['certificate_authorities'] == null ? undefined : json['certificate_authorities'], + 'certAttribute': json['cert_attribute'] == null ? undefined : CertAttributeEnumFromJSON(json['cert_attribute']), + 'userAttribute': json['user_attribute'] == null ? undefined : UserAttributeEnumFromJSON(json['user_attribute']), + }; +} + +export function PatchedMutualTLSStageRequestToJSON(json: any): PatchedMutualTLSStageRequest { + return PatchedMutualTLSStageRequestToJSONTyped(json, false); +} + +export function PatchedMutualTLSStageRequestToJSONTyped(value?: PatchedMutualTLSStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': StageModeEnumToJSON(value['mode']), + 'certificate_authorities': value['certificateAuthorities'], + 'cert_attribute': CertAttributeEnumToJSON(value['certAttribute']), + 'user_attribute': UserAttributeEnumToJSON(value['userAttribute']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedNotificationRequest.ts b/packages/client-ts/src/models/PatchedNotificationRequest.ts new file mode 100644 index 0000000000..e2abb331e6 --- /dev/null +++ b/packages/client-ts/src/models/PatchedNotificationRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { EventRequest } from './EventRequest'; +import { + EventRequestFromJSON, + EventRequestFromJSONTyped, + EventRequestToJSON, + EventRequestToJSONTyped, +} from './EventRequest'; + +/** + * Notification Serializer + * @export + * @interface PatchedNotificationRequest + */ +export interface PatchedNotificationRequest { + /** + * + * @type {string} + * @memberof PatchedNotificationRequest + */ + hyperlink?: string | null; + /** + * + * @type {string} + * @memberof PatchedNotificationRequest + */ + hyperlinkLabel?: string | null; + /** + * + * @type {EventRequest} + * @memberof PatchedNotificationRequest + */ + event?: EventRequest; + /** + * + * @type {boolean} + * @memberof PatchedNotificationRequest + */ + seen?: boolean; +} + +/** + * Check if a given object implements the PatchedNotificationRequest interface. + */ +export function instanceOfPatchedNotificationRequest(value: object): value is PatchedNotificationRequest { + return true; +} + +export function PatchedNotificationRequestFromJSON(json: any): PatchedNotificationRequest { + return PatchedNotificationRequestFromJSONTyped(json, false); +} + +export function PatchedNotificationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedNotificationRequest { + if (json == null) { + return json; + } + return { + + 'hyperlink': json['hyperlink'] == null ? undefined : json['hyperlink'], + 'hyperlinkLabel': json['hyperlink_label'] == null ? undefined : json['hyperlink_label'], + 'event': json['event'] == null ? undefined : EventRequestFromJSON(json['event']), + 'seen': json['seen'] == null ? undefined : json['seen'], + }; +} + +export function PatchedNotificationRequestToJSON(json: any): PatchedNotificationRequest { + return PatchedNotificationRequestToJSONTyped(json, false); +} + +export function PatchedNotificationRequestToJSONTyped(value?: PatchedNotificationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'hyperlink': value['hyperlink'], + 'hyperlink_label': value['hyperlinkLabel'], + 'event': EventRequestToJSON(value['event']), + 'seen': value['seen'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedNotificationRuleRequest.ts b/packages/client-ts/src/models/PatchedNotificationRuleRequest.ts new file mode 100644 index 0000000000..f00b26afd2 --- /dev/null +++ b/packages/client-ts/src/models/PatchedNotificationRuleRequest.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SeverityEnum } from './SeverityEnum'; +import { + SeverityEnumFromJSON, + SeverityEnumFromJSONTyped, + SeverityEnumToJSON, + SeverityEnumToJSONTyped, +} from './SeverityEnum'; + +/** + * NotificationRule Serializer + * @export + * @interface PatchedNotificationRuleRequest + */ +export interface PatchedNotificationRuleRequest { + /** + * + * @type {string} + * @memberof PatchedNotificationRuleRequest + */ + 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. + * @type {Array} + * @memberof PatchedNotificationRuleRequest + */ + transports?: Array; + /** + * Controls which severity level the created notifications will have. + * @type {SeverityEnum} + * @memberof PatchedNotificationRuleRequest + */ + severity?: SeverityEnum; + /** + * Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent. + * @type {string} + * @memberof PatchedNotificationRuleRequest + */ + destinationGroup?: string | null; + /** + * When enabled, notification will be sent to user the user that triggered the event.When destination_group is configured, notification is sent to both. + * @type {boolean} + * @memberof PatchedNotificationRuleRequest + */ + destinationEventUser?: boolean; +} + + + +/** + * Check if a given object implements the PatchedNotificationRuleRequest interface. + */ +export function instanceOfPatchedNotificationRuleRequest(value: object): value is PatchedNotificationRuleRequest { + return true; +} + +export function PatchedNotificationRuleRequestFromJSON(json: any): PatchedNotificationRuleRequest { + return PatchedNotificationRuleRequestFromJSONTyped(json, false); +} + +export function PatchedNotificationRuleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedNotificationRuleRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'transports': json['transports'] == null ? undefined : json['transports'], + 'severity': json['severity'] == null ? undefined : SeverityEnumFromJSON(json['severity']), + 'destinationGroup': json['destination_group'] == null ? undefined : json['destination_group'], + 'destinationEventUser': json['destination_event_user'] == null ? undefined : json['destination_event_user'], + }; +} + +export function PatchedNotificationRuleRequestToJSON(json: any): PatchedNotificationRuleRequest { + return PatchedNotificationRuleRequestToJSONTyped(json, false); +} + +export function PatchedNotificationRuleRequestToJSONTyped(value?: PatchedNotificationRuleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'transports': value['transports'], + 'severity': SeverityEnumToJSON(value['severity']), + 'destination_group': value['destinationGroup'], + 'destination_event_user': value['destinationEventUser'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedNotificationTransportRequest.ts b/packages/client-ts/src/models/PatchedNotificationTransportRequest.ts new file mode 100644 index 0000000000..699655da61 --- /dev/null +++ b/packages/client-ts/src/models/PatchedNotificationTransportRequest.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { NotificationTransportModeEnum } from './NotificationTransportModeEnum'; +import { + NotificationTransportModeEnumFromJSON, + NotificationTransportModeEnumFromJSONTyped, + NotificationTransportModeEnumToJSON, + NotificationTransportModeEnumToJSONTyped, +} from './NotificationTransportModeEnum'; + +/** + * NotificationTransport Serializer + * @export + * @interface PatchedNotificationTransportRequest + */ +export interface PatchedNotificationTransportRequest { + /** + * + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + name?: string; + /** + * + * @type {NotificationTransportModeEnum} + * @memberof PatchedNotificationTransportRequest + */ + mode?: NotificationTransportModeEnum; + /** + * + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + webhookUrl?: string; + /** + * When set, the selected ceritifcate is used to validate the certificate of the webhook server. + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + webhookCa?: string | null; + /** + * Customize the body of the request. Mapping should return data that is JSON-serializable. + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + webhookMappingBody?: string | null; + /** + * Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + webhookMappingHeaders?: string | null; + /** + * + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + emailSubjectPrefix?: string; + /** + * + * @type {string} + * @memberof PatchedNotificationTransportRequest + */ + emailTemplate?: string; + /** + * Only send notification once, for example when sending a webhook into a chat channel. + * @type {boolean} + * @memberof PatchedNotificationTransportRequest + */ + sendOnce?: boolean; +} + + + +/** + * Check if a given object implements the PatchedNotificationTransportRequest interface. + */ +export function instanceOfPatchedNotificationTransportRequest(value: object): value is PatchedNotificationTransportRequest { + return true; +} + +export function PatchedNotificationTransportRequestFromJSON(json: any): PatchedNotificationTransportRequest { + return PatchedNotificationTransportRequestFromJSONTyped(json, false); +} + +export function PatchedNotificationTransportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedNotificationTransportRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'mode': json['mode'] == null ? undefined : NotificationTransportModeEnumFromJSON(json['mode']), + 'webhookUrl': json['webhook_url'] == null ? undefined : json['webhook_url'], + 'webhookCa': json['webhook_ca'] == null ? undefined : json['webhook_ca'], + 'webhookMappingBody': json['webhook_mapping_body'] == null ? undefined : json['webhook_mapping_body'], + 'webhookMappingHeaders': json['webhook_mapping_headers'] == null ? undefined : json['webhook_mapping_headers'], + 'emailSubjectPrefix': json['email_subject_prefix'] == null ? undefined : json['email_subject_prefix'], + 'emailTemplate': json['email_template'] == null ? undefined : json['email_template'], + 'sendOnce': json['send_once'] == null ? undefined : json['send_once'], + }; +} + +export function PatchedNotificationTransportRequestToJSON(json: any): PatchedNotificationTransportRequest { + return PatchedNotificationTransportRequestToJSONTyped(json, false); +} + +export function PatchedNotificationTransportRequestToJSONTyped(value?: PatchedNotificationTransportRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'mode': NotificationTransportModeEnumToJSON(value['mode']), + 'webhook_url': value['webhookUrl'], + 'webhook_ca': value['webhookCa'], + 'webhook_mapping_body': value['webhookMappingBody'], + 'webhook_mapping_headers': value['webhookMappingHeaders'], + 'email_subject_prefix': value['emailSubjectPrefix'], + 'email_template': value['emailTemplate'], + 'send_once': value['sendOnce'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedNotificationWebhookMappingRequest.ts b/packages/client-ts/src/models/PatchedNotificationWebhookMappingRequest.ts new file mode 100644 index 0000000000..9e158508fc --- /dev/null +++ b/packages/client-ts/src/models/PatchedNotificationWebhookMappingRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * NotificationWebhookMapping Serializer + * @export + * @interface PatchedNotificationWebhookMappingRequest + */ +export interface PatchedNotificationWebhookMappingRequest { + /** + * + * @type {string} + * @memberof PatchedNotificationWebhookMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedNotificationWebhookMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedNotificationWebhookMappingRequest interface. + */ +export function instanceOfPatchedNotificationWebhookMappingRequest(value: object): value is PatchedNotificationWebhookMappingRequest { + return true; +} + +export function PatchedNotificationWebhookMappingRequestFromJSON(json: any): PatchedNotificationWebhookMappingRequest { + return PatchedNotificationWebhookMappingRequestFromJSONTyped(json, false); +} + +export function PatchedNotificationWebhookMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedNotificationWebhookMappingRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedNotificationWebhookMappingRequestToJSON(json: any): PatchedNotificationWebhookMappingRequest { + return PatchedNotificationWebhookMappingRequestToJSONTyped(json, false); +} + +export function PatchedNotificationWebhookMappingRequestToJSONTyped(value?: PatchedNotificationWebhookMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedOAuth2ProviderRequest.ts b/packages/client-ts/src/models/PatchedOAuth2ProviderRequest.ts new file mode 100644 index 0000000000..fface1155e --- /dev/null +++ b/packages/client-ts/src/models/PatchedOAuth2ProviderRequest.ts @@ -0,0 +1,271 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RedirectURIRequest } from './RedirectURIRequest'; +import { + RedirectURIRequestFromJSON, + RedirectURIRequestFromJSONTyped, + RedirectURIRequestToJSON, + RedirectURIRequestToJSONTyped, +} from './RedirectURIRequest'; +import type { ClientTypeEnum } from './ClientTypeEnum'; +import { + ClientTypeEnumFromJSON, + ClientTypeEnumFromJSONTyped, + ClientTypeEnumToJSON, + ClientTypeEnumToJSONTyped, +} from './ClientTypeEnum'; +import type { SubModeEnum } from './SubModeEnum'; +import { + SubModeEnumFromJSON, + SubModeEnumFromJSONTyped, + SubModeEnumToJSON, + SubModeEnumToJSONTyped, +} from './SubModeEnum'; +import type { OAuth2ProviderLogoutMethodEnum } from './OAuth2ProviderLogoutMethodEnum'; +import { + OAuth2ProviderLogoutMethodEnumFromJSON, + OAuth2ProviderLogoutMethodEnumFromJSONTyped, + OAuth2ProviderLogoutMethodEnumToJSON, + OAuth2ProviderLogoutMethodEnumToJSONTyped, +} from './OAuth2ProviderLogoutMethodEnum'; +import type { IssuerModeEnum } from './IssuerModeEnum'; +import { + IssuerModeEnumFromJSON, + IssuerModeEnumFromJSONTyped, + IssuerModeEnumToJSON, + IssuerModeEnumToJSONTyped, +} from './IssuerModeEnum'; + +/** + * OAuth2Provider Serializer + * @export + * @interface PatchedOAuth2ProviderRequest + */ +export interface PatchedOAuth2ProviderRequest { + /** + * + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + authorizationFlow?: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + invalidationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedOAuth2ProviderRequest + */ + propertyMappings?: Array; + /** + * Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable + * @type {ClientTypeEnum} + * @memberof PatchedOAuth2ProviderRequest + */ + clientType?: ClientTypeEnum; + /** + * + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + clientId?: string; + /** + * + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + clientSecret?: string; + /** + * Access codes not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + accessCodeValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + accessTokenValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + refreshTokenValidity?: string; + /** + * When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + refreshTokenThreshold?: string; + /** + * Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint. + * @type {boolean} + * @memberof PatchedOAuth2ProviderRequest + */ + includeClaimsInIdToken?: boolean; + /** + * Key used to sign the tokens. + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + signingKey?: string | null; + /** + * Key used to encrypt the tokens. When set, tokens will be encrypted and returned as JWEs. + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + encryptionKey?: string | null; + /** + * + * @type {Array} + * @memberof PatchedOAuth2ProviderRequest + */ + redirectUris?: Array; + /** + * + * @type {string} + * @memberof PatchedOAuth2ProviderRequest + */ + logoutUri?: string; + /** + * Backchannel logs out with server to server calls. Frontchannel uses iframes in your browser + * @type {OAuth2ProviderLogoutMethodEnum} + * @memberof PatchedOAuth2ProviderRequest + */ + logoutMethod?: OAuth2ProviderLogoutMethodEnum; + /** + * Configure what data should be used as unique User Identifier. For most cases, the default should be fine. + * @type {SubModeEnum} + * @memberof PatchedOAuth2ProviderRequest + */ + subMode?: SubModeEnum; + /** + * Configure how the issuer field of the ID Token should be filled. + * @type {IssuerModeEnum} + * @memberof PatchedOAuth2ProviderRequest + */ + issuerMode?: IssuerModeEnum; + /** + * + * @type {Array} + * @memberof PatchedOAuth2ProviderRequest + */ + jwtFederationSources?: Array; + /** + * + * @type {Array} + * @memberof PatchedOAuth2ProviderRequest + */ + jwtFederationProviders?: Array; +} + + + +/** + * Check if a given object implements the PatchedOAuth2ProviderRequest interface. + */ +export function instanceOfPatchedOAuth2ProviderRequest(value: object): value is PatchedOAuth2ProviderRequest { + return true; +} + +export function PatchedOAuth2ProviderRequestFromJSON(json: any): PatchedOAuth2ProviderRequest { + return PatchedOAuth2ProviderRequestFromJSONTyped(json, false); +} + +export function PatchedOAuth2ProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOAuth2ProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'clientType': json['client_type'] == null ? undefined : ClientTypeEnumFromJSON(json['client_type']), + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'], + 'accessCodeValidity': json['access_code_validity'] == null ? undefined : json['access_code_validity'], + 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], + 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], + 'refreshTokenThreshold': json['refresh_token_threshold'] == null ? undefined : json['refresh_token_threshold'], + 'includeClaimsInIdToken': json['include_claims_in_id_token'] == null ? undefined : json['include_claims_in_id_token'], + 'signingKey': json['signing_key'] == null ? undefined : json['signing_key'], + 'encryptionKey': json['encryption_key'] == null ? undefined : json['encryption_key'], + 'redirectUris': json['redirect_uris'] == null ? undefined : ((json['redirect_uris'] as Array).map(RedirectURIRequestFromJSON)), + 'logoutUri': json['logout_uri'] == null ? undefined : json['logout_uri'], + 'logoutMethod': json['logout_method'] == null ? undefined : OAuth2ProviderLogoutMethodEnumFromJSON(json['logout_method']), + 'subMode': json['sub_mode'] == null ? undefined : SubModeEnumFromJSON(json['sub_mode']), + 'issuerMode': json['issuer_mode'] == null ? undefined : IssuerModeEnumFromJSON(json['issuer_mode']), + 'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + }; +} + +export function PatchedOAuth2ProviderRequestToJSON(json: any): PatchedOAuth2ProviderRequest { + return PatchedOAuth2ProviderRequestToJSONTyped(json, false); +} + +export function PatchedOAuth2ProviderRequestToJSONTyped(value?: PatchedOAuth2ProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'client_type': ClientTypeEnumToJSON(value['clientType']), + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'access_code_validity': value['accessCodeValidity'], + 'access_token_validity': value['accessTokenValidity'], + 'refresh_token_validity': value['refreshTokenValidity'], + 'refresh_token_threshold': value['refreshTokenThreshold'], + 'include_claims_in_id_token': value['includeClaimsInIdToken'], + 'signing_key': value['signingKey'], + 'encryption_key': value['encryptionKey'], + 'redirect_uris': value['redirectUris'] == null ? undefined : ((value['redirectUris'] as Array).map(RedirectURIRequestToJSON)), + 'logout_uri': value['logoutUri'], + 'logout_method': OAuth2ProviderLogoutMethodEnumToJSON(value['logoutMethod']), + 'sub_mode': SubModeEnumToJSON(value['subMode']), + 'issuer_mode': IssuerModeEnumToJSON(value['issuerMode']), + 'jwt_federation_sources': value['jwtFederationSources'], + 'jwt_federation_providers': value['jwtFederationProviders'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedOAuthSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedOAuthSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..5d10fb97ec --- /dev/null +++ b/packages/client-ts/src/models/PatchedOAuthSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * OAuthSourcePropertyMapping Serializer + * @export + * @interface PatchedOAuthSourcePropertyMappingRequest + */ +export interface PatchedOAuthSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedOAuthSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedOAuthSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedOAuthSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedOAuthSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedOAuthSourcePropertyMappingRequest(value: object): value is PatchedOAuthSourcePropertyMappingRequest { + return true; +} + +export function PatchedOAuthSourcePropertyMappingRequestFromJSON(json: any): PatchedOAuthSourcePropertyMappingRequest { + return PatchedOAuthSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedOAuthSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOAuthSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedOAuthSourcePropertyMappingRequestToJSON(json: any): PatchedOAuthSourcePropertyMappingRequest { + return PatchedOAuthSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedOAuthSourcePropertyMappingRequestToJSONTyped(value?: PatchedOAuthSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedOAuthSourceRequest.ts b/packages/client-ts/src/models/PatchedOAuthSourceRequest.ts new file mode 100644 index 0000000000..c33906fee1 --- /dev/null +++ b/packages/client-ts/src/models/PatchedOAuthSourceRequest.ts @@ -0,0 +1,310 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { PKCEMethodEnum } from './PKCEMethodEnum'; +import { + PKCEMethodEnumFromJSON, + PKCEMethodEnumFromJSONTyped, + PKCEMethodEnumToJSON, + PKCEMethodEnumToJSONTyped, +} from './PKCEMethodEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; +import type { AuthorizationCodeAuthMethodEnum } from './AuthorizationCodeAuthMethodEnum'; +import { + AuthorizationCodeAuthMethodEnumFromJSON, + AuthorizationCodeAuthMethodEnumFromJSONTyped, + AuthorizationCodeAuthMethodEnumToJSON, + AuthorizationCodeAuthMethodEnumToJSONTyped, +} from './AuthorizationCodeAuthMethodEnum'; +import type { ProviderTypeEnum } from './ProviderTypeEnum'; +import { + ProviderTypeEnumFromJSON, + ProviderTypeEnumFromJSONTyped, + ProviderTypeEnumToJSON, + ProviderTypeEnumToJSONTyped, +} from './ProviderTypeEnum'; + +/** + * OAuth Source Serializer + * @export + * @interface PatchedOAuthSourceRequest + */ +export interface PatchedOAuthSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedOAuthSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PatchedOAuthSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PatchedOAuthSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedOAuthSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedOAuthSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PatchedOAuthSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof PatchedOAuthSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * + * @type {ProviderTypeEnum} + * @memberof PatchedOAuthSourceRequest + */ + providerType?: ProviderTypeEnum; + /** + * URL used to request the initial token. This URL is only required for OAuth 1. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + requestTokenUrl?: string | null; + /** + * URL the user is redirect to to conest the flow. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + authorizationUrl?: string | null; + /** + * URL used by authentik to retrieve tokens. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + accessTokenUrl?: string | null; + /** + * URL used by authentik to get user information. + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + profileUrl?: string | null; + /** + * + * @type {PKCEMethodEnum} + * @memberof PatchedOAuthSourceRequest + */ + pkce?: PKCEMethodEnum; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + consumerKey?: string; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + consumerSecret?: string; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + additionalScopes?: string; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + oidcWellKnownUrl?: string; + /** + * + * @type {string} + * @memberof PatchedOAuthSourceRequest + */ + oidcJwksUrl?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedOAuthSourceRequest + */ + oidcJwks?: { [key: string]: any; }; + /** + * How to perform authentication during an authorization_code token request flow + * @type {AuthorizationCodeAuthMethodEnum} + * @memberof PatchedOAuthSourceRequest + */ + authorizationCodeAuthMethod?: AuthorizationCodeAuthMethodEnum; +} + + + +/** + * Check if a given object implements the PatchedOAuthSourceRequest interface. + */ +export function instanceOfPatchedOAuthSourceRequest(value: object): value is PatchedOAuthSourceRequest { + return true; +} + +export function PatchedOAuthSourceRequestFromJSON(json: any): PatchedOAuthSourceRequest { + return PatchedOAuthSourceRequestFromJSONTyped(json, false); +} + +export function PatchedOAuthSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOAuthSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'providerType': json['provider_type'] == null ? undefined : ProviderTypeEnumFromJSON(json['provider_type']), + 'requestTokenUrl': json['request_token_url'] == null ? undefined : json['request_token_url'], + 'authorizationUrl': json['authorization_url'] == null ? undefined : json['authorization_url'], + 'accessTokenUrl': json['access_token_url'] == null ? undefined : json['access_token_url'], + 'profileUrl': json['profile_url'] == null ? undefined : json['profile_url'], + 'pkce': json['pkce'] == null ? undefined : PKCEMethodEnumFromJSON(json['pkce']), + 'consumerKey': json['consumer_key'] == null ? undefined : json['consumer_key'], + 'consumerSecret': json['consumer_secret'] == null ? undefined : json['consumer_secret'], + 'additionalScopes': json['additional_scopes'] == null ? undefined : json['additional_scopes'], + 'oidcWellKnownUrl': json['oidc_well_known_url'] == null ? undefined : json['oidc_well_known_url'], + 'oidcJwksUrl': json['oidc_jwks_url'] == null ? undefined : json['oidc_jwks_url'], + 'oidcJwks': json['oidc_jwks'] == null ? undefined : json['oidc_jwks'], + 'authorizationCodeAuthMethod': json['authorization_code_auth_method'] == null ? undefined : AuthorizationCodeAuthMethodEnumFromJSON(json['authorization_code_auth_method']), + }; +} + +export function PatchedOAuthSourceRequestToJSON(json: any): PatchedOAuthSourceRequest { + return PatchedOAuthSourceRequestToJSONTyped(json, false); +} + +export function PatchedOAuthSourceRequestToJSONTyped(value?: PatchedOAuthSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'provider_type': ProviderTypeEnumToJSON(value['providerType']), + 'request_token_url': value['requestTokenUrl'], + 'authorization_url': value['authorizationUrl'], + 'access_token_url': value['accessTokenUrl'], + 'profile_url': value['profileUrl'], + 'pkce': PKCEMethodEnumToJSON(value['pkce']), + 'consumer_key': value['consumerKey'], + 'consumer_secret': value['consumerSecret'], + 'additional_scopes': value['additionalScopes'], + 'oidc_well_known_url': value['oidcWellKnownUrl'], + 'oidc_jwks_url': value['oidcJwksUrl'], + 'oidc_jwks': value['oidcJwks'], + 'authorization_code_auth_method': AuthorizationCodeAuthMethodEnumToJSON(value['authorizationCodeAuthMethod']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedOutpostRequest.ts b/packages/client-ts/src/models/PatchedOutpostRequest.ts new file mode 100644 index 0000000000..dfe91746e1 --- /dev/null +++ b/packages/client-ts/src/models/PatchedOutpostRequest.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OutpostTypeEnum } from './OutpostTypeEnum'; +import { + OutpostTypeEnumFromJSON, + OutpostTypeEnumFromJSONTyped, + OutpostTypeEnumToJSON, + OutpostTypeEnumToJSONTyped, +} from './OutpostTypeEnum'; + +/** + * Outpost Serializer + * @export + * @interface PatchedOutpostRequest + */ +export interface PatchedOutpostRequest { + /** + * + * @type {string} + * @memberof PatchedOutpostRequest + */ + name?: string; + /** + * + * @type {OutpostTypeEnum} + * @memberof PatchedOutpostRequest + */ + type?: OutpostTypeEnum; + /** + * + * @type {Array} + * @memberof PatchedOutpostRequest + */ + providers?: Array; + /** + * Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment. + * @type {string} + * @memberof PatchedOutpostRequest + */ + serviceConnection?: string | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedOutpostRequest + */ + config?: { [key: string]: any; }; + /** + * 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. + * @type {string} + * @memberof PatchedOutpostRequest + */ + managed?: string | null; +} + + + +/** + * Check if a given object implements the PatchedOutpostRequest interface. + */ +export function instanceOfPatchedOutpostRequest(value: object): value is PatchedOutpostRequest { + return true; +} + +export function PatchedOutpostRequestFromJSON(json: any): PatchedOutpostRequest { + return PatchedOutpostRequestFromJSONTyped(json, false); +} + +export function PatchedOutpostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOutpostRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'type': json['type'] == null ? undefined : OutpostTypeEnumFromJSON(json['type']), + 'providers': json['providers'] == null ? undefined : json['providers'], + 'serviceConnection': json['service_connection'] == null ? undefined : json['service_connection'], + 'config': json['config'] == null ? undefined : json['config'], + 'managed': json['managed'] == null ? undefined : json['managed'], + }; +} + +export function PatchedOutpostRequestToJSON(json: any): PatchedOutpostRequest { + return PatchedOutpostRequestToJSONTyped(json, false); +} + +export function PatchedOutpostRequestToJSONTyped(value?: PatchedOutpostRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': OutpostTypeEnumToJSON(value['type']), + 'providers': value['providers'], + 'service_connection': value['serviceConnection'], + 'config': value['config'], + 'managed': value['managed'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPasswordExpiryPolicyRequest.ts b/packages/client-ts/src/models/PatchedPasswordExpiryPolicyRequest.ts new file mode 100644 index 0000000000..88c7e24b2b --- /dev/null +++ b/packages/client-ts/src/models/PatchedPasswordExpiryPolicyRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Expiry Policy Serializer + * @export + * @interface PatchedPasswordExpiryPolicyRequest + */ +export interface PatchedPasswordExpiryPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedPasswordExpiryPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedPasswordExpiryPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {number} + * @memberof PatchedPasswordExpiryPolicyRequest + */ + days?: number; + /** + * + * @type {boolean} + * @memberof PatchedPasswordExpiryPolicyRequest + */ + denyOnly?: boolean; +} + +/** + * Check if a given object implements the PatchedPasswordExpiryPolicyRequest interface. + */ +export function instanceOfPatchedPasswordExpiryPolicyRequest(value: object): value is PatchedPasswordExpiryPolicyRequest { + return true; +} + +export function PatchedPasswordExpiryPolicyRequestFromJSON(json: any): PatchedPasswordExpiryPolicyRequest { + return PatchedPasswordExpiryPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedPasswordExpiryPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPasswordExpiryPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'days': json['days'] == null ? undefined : json['days'], + 'denyOnly': json['deny_only'] == null ? undefined : json['deny_only'], + }; +} + +export function PatchedPasswordExpiryPolicyRequestToJSON(json: any): PatchedPasswordExpiryPolicyRequest { + return PatchedPasswordExpiryPolicyRequestToJSONTyped(json, false); +} + +export function PatchedPasswordExpiryPolicyRequestToJSONTyped(value?: PatchedPasswordExpiryPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'days': value['days'], + 'deny_only': value['denyOnly'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPasswordPolicyRequest.ts b/packages/client-ts/src/models/PatchedPasswordPolicyRequest.ts new file mode 100644 index 0000000000..e5fc969c8f --- /dev/null +++ b/packages/client-ts/src/models/PatchedPasswordPolicyRequest.ts @@ -0,0 +1,177 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Policy Serializer + * @export + * @interface PatchedPasswordPolicyRequest + */ +export interface PatchedPasswordPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedPasswordPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedPasswordPolicyRequest + */ + executionLogging?: boolean; + /** + * Field key to check, field keys defined in Prompt stages are available. + * @type {string} + * @memberof PatchedPasswordPolicyRequest + */ + passwordField?: string; + /** + * + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + amountDigits?: number; + /** + * + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + amountUppercase?: number; + /** + * + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + amountLowercase?: number; + /** + * + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + amountSymbols?: number; + /** + * + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + lengthMin?: number; + /** + * + * @type {string} + * @memberof PatchedPasswordPolicyRequest + */ + symbolCharset?: string; + /** + * + * @type {string} + * @memberof PatchedPasswordPolicyRequest + */ + errorMessage?: string; + /** + * + * @type {boolean} + * @memberof PatchedPasswordPolicyRequest + */ + checkStaticRules?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedPasswordPolicyRequest + */ + checkHaveIBeenPwned?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedPasswordPolicyRequest + */ + checkZxcvbn?: boolean; + /** + * How many times the password hash is allowed to be on haveibeenpwned + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + hibpAllowedCount?: number; + /** + * If the zxcvbn score is equal or less than this value, the policy will fail. + * @type {number} + * @memberof PatchedPasswordPolicyRequest + */ + zxcvbnScoreThreshold?: number; +} + +/** + * Check if a given object implements the PatchedPasswordPolicyRequest interface. + */ +export function instanceOfPatchedPasswordPolicyRequest(value: object): value is PatchedPasswordPolicyRequest { + return true; +} + +export function PatchedPasswordPolicyRequestFromJSON(json: any): PatchedPasswordPolicyRequest { + return PatchedPasswordPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedPasswordPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPasswordPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'passwordField': json['password_field'] == null ? undefined : json['password_field'], + 'amountDigits': json['amount_digits'] == null ? undefined : json['amount_digits'], + 'amountUppercase': json['amount_uppercase'] == null ? undefined : json['amount_uppercase'], + 'amountLowercase': json['amount_lowercase'] == null ? undefined : json['amount_lowercase'], + 'amountSymbols': json['amount_symbols'] == null ? undefined : json['amount_symbols'], + 'lengthMin': json['length_min'] == null ? undefined : json['length_min'], + 'symbolCharset': json['symbol_charset'] == null ? undefined : json['symbol_charset'], + 'errorMessage': json['error_message'] == null ? undefined : json['error_message'], + 'checkStaticRules': json['check_static_rules'] == null ? undefined : json['check_static_rules'], + 'checkHaveIBeenPwned': json['check_have_i_been_pwned'] == null ? undefined : json['check_have_i_been_pwned'], + 'checkZxcvbn': json['check_zxcvbn'] == null ? undefined : json['check_zxcvbn'], + 'hibpAllowedCount': json['hibp_allowed_count'] == null ? undefined : json['hibp_allowed_count'], + 'zxcvbnScoreThreshold': json['zxcvbn_score_threshold'] == null ? undefined : json['zxcvbn_score_threshold'], + }; +} + +export function PatchedPasswordPolicyRequestToJSON(json: any): PatchedPasswordPolicyRequest { + return PatchedPasswordPolicyRequestToJSONTyped(json, false); +} + +export function PatchedPasswordPolicyRequestToJSONTyped(value?: PatchedPasswordPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'password_field': value['passwordField'], + 'amount_digits': value['amountDigits'], + 'amount_uppercase': value['amountUppercase'], + 'amount_lowercase': value['amountLowercase'], + 'amount_symbols': value['amountSymbols'], + 'length_min': value['lengthMin'], + 'symbol_charset': value['symbolCharset'], + 'error_message': value['errorMessage'], + 'check_static_rules': value['checkStaticRules'], + 'check_have_i_been_pwned': value['checkHaveIBeenPwned'], + 'check_zxcvbn': value['checkZxcvbn'], + 'hibp_allowed_count': value['hibpAllowedCount'], + 'zxcvbn_score_threshold': value['zxcvbnScoreThreshold'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPasswordStageRequest.ts b/packages/client-ts/src/models/PatchedPasswordStageRequest.ts new file mode 100644 index 0000000000..e588e41c76 --- /dev/null +++ b/packages/client-ts/src/models/PatchedPasswordStageRequest.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { BackendsEnum } from './BackendsEnum'; +import { + BackendsEnumFromJSON, + BackendsEnumFromJSONTyped, + BackendsEnumToJSON, + BackendsEnumToJSONTyped, +} from './BackendsEnum'; + +/** + * PasswordStage Serializer + * @export + * @interface PatchedPasswordStageRequest + */ +export interface PatchedPasswordStageRequest { + /** + * + * @type {string} + * @memberof PatchedPasswordStageRequest + */ + name?: string; + /** + * Selection of backends to test the password against. + * @type {Array} + * @memberof PatchedPasswordStageRequest + */ + backends?: Array; + /** + * Flow used by an authenticated user to configure this Stage. If empty, user will not be able to configure this stage. + * @type {string} + * @memberof PatchedPasswordStageRequest + */ + configureFlow?: string | null; + /** + * 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. + * @type {number} + * @memberof PatchedPasswordStageRequest + */ + failedAttemptsBeforeCancel?: number; + /** + * When enabled, provides a 'show password' button with the password input field. + * @type {boolean} + * @memberof PatchedPasswordStageRequest + */ + allowShowPassword?: boolean; +} + +/** + * Check if a given object implements the PatchedPasswordStageRequest interface. + */ +export function instanceOfPatchedPasswordStageRequest(value: object): value is PatchedPasswordStageRequest { + return true; +} + +export function PatchedPasswordStageRequestFromJSON(json: any): PatchedPasswordStageRequest { + return PatchedPasswordStageRequestFromJSONTyped(json, false); +} + +export function PatchedPasswordStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPasswordStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'backends': json['backends'] == null ? undefined : ((json['backends'] as Array).map(BackendsEnumFromJSON)), + 'configureFlow': json['configure_flow'] == null ? undefined : json['configure_flow'], + 'failedAttemptsBeforeCancel': json['failed_attempts_before_cancel'] == null ? undefined : json['failed_attempts_before_cancel'], + 'allowShowPassword': json['allow_show_password'] == null ? undefined : json['allow_show_password'], + }; +} + +export function PatchedPasswordStageRequestToJSON(json: any): PatchedPasswordStageRequest { + return PatchedPasswordStageRequestToJSONTyped(json, false); +} + +export function PatchedPasswordStageRequestToJSONTyped(value?: PatchedPasswordStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'backends': value['backends'] == null ? undefined : ((value['backends'] as Array).map(BackendsEnumToJSON)), + 'configure_flow': value['configureFlow'], + 'failed_attempts_before_cancel': value['failedAttemptsBeforeCancel'], + 'allow_show_password': value['allowShowPassword'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPermissionAssignRequest.ts b/packages/client-ts/src/models/PatchedPermissionAssignRequest.ts new file mode 100644 index 0000000000..e9311fdd77 --- /dev/null +++ b/packages/client-ts/src/models/PatchedPermissionAssignRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ModelEnum } from './ModelEnum'; +import { + ModelEnumFromJSON, + ModelEnumFromJSONTyped, + ModelEnumToJSON, + ModelEnumToJSONTyped, +} from './ModelEnum'; + +/** + * Request to assign a new permission + * @export + * @interface PatchedPermissionAssignRequest + */ +export interface PatchedPermissionAssignRequest { + /** + * + * @type {Array} + * @memberof PatchedPermissionAssignRequest + */ + permissions?: Array; + /** + * + * @type {ModelEnum} + * @memberof PatchedPermissionAssignRequest + */ + model?: ModelEnum; + /** + * + * @type {string} + * @memberof PatchedPermissionAssignRequest + */ + objectPk?: string; +} + + + +/** + * Check if a given object implements the PatchedPermissionAssignRequest interface. + */ +export function instanceOfPatchedPermissionAssignRequest(value: object): value is PatchedPermissionAssignRequest { + return true; +} + +export function PatchedPermissionAssignRequestFromJSON(json: any): PatchedPermissionAssignRequest { + return PatchedPermissionAssignRequestFromJSONTyped(json, false); +} + +export function PatchedPermissionAssignRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPermissionAssignRequest { + if (json == null) { + return json; + } + return { + + 'permissions': json['permissions'] == null ? undefined : json['permissions'], + 'model': json['model'] == null ? undefined : ModelEnumFromJSON(json['model']), + 'objectPk': json['object_pk'] == null ? undefined : json['object_pk'], + }; +} + +export function PatchedPermissionAssignRequestToJSON(json: any): PatchedPermissionAssignRequest { + return PatchedPermissionAssignRequestToJSONTyped(json, false); +} + +export function PatchedPermissionAssignRequestToJSONTyped(value?: PatchedPermissionAssignRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'permissions': value['permissions'], + 'model': ModelEnumToJSON(value['model']), + 'object_pk': value['objectPk'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPlexSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedPlexSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..de28d244c2 --- /dev/null +++ b/packages/client-ts/src/models/PatchedPlexSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PlexSourcePropertyMapping Serializer + * @export + * @interface PatchedPlexSourcePropertyMappingRequest + */ +export interface PatchedPlexSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedPlexSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedPlexSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedPlexSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedPlexSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedPlexSourcePropertyMappingRequest(value: object): value is PatchedPlexSourcePropertyMappingRequest { + return true; +} + +export function PatchedPlexSourcePropertyMappingRequestFromJSON(json: any): PatchedPlexSourcePropertyMappingRequest { + return PatchedPlexSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedPlexSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPlexSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedPlexSourcePropertyMappingRequestToJSON(json: any): PatchedPlexSourcePropertyMappingRequest { + return PatchedPlexSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedPlexSourcePropertyMappingRequestToJSONTyped(value?: PatchedPlexSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPlexSourceRequest.ts b/packages/client-ts/src/models/PatchedPlexSourceRequest.ts new file mode 100644 index 0000000000..86c4676427 --- /dev/null +++ b/packages/client-ts/src/models/PatchedPlexSourceRequest.ts @@ -0,0 +1,217 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * Plex Source Serializer + * @export + * @interface PatchedPlexSourceRequest + */ +export interface PatchedPlexSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedPlexSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PatchedPlexSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PatchedPlexSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedPlexSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedPlexSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PatchedPlexSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof PatchedPlexSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Client identifier used to talk to Plex. + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + clientId?: string; + /** + * Which servers a user has to be a member of to be granted access. Empty list allows every server. + * @type {Array} + * @memberof PatchedPlexSourceRequest + */ + allowedServers?: Array; + /** + * Allow friends to authenticate, even if you don't share a server. + * @type {boolean} + * @memberof PatchedPlexSourceRequest + */ + allowFriends?: boolean; + /** + * Plex token used to check friends + * @type {string} + * @memberof PatchedPlexSourceRequest + */ + plexToken?: string; +} + + + +/** + * Check if a given object implements the PatchedPlexSourceRequest interface. + */ +export function instanceOfPatchedPlexSourceRequest(value: object): value is PatchedPlexSourceRequest { + return true; +} + +export function PatchedPlexSourceRequestFromJSON(json: any): PatchedPlexSourceRequest { + return PatchedPlexSourceRequestFromJSONTyped(json, false); +} + +export function PatchedPlexSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPlexSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'allowedServers': json['allowed_servers'] == null ? undefined : json['allowed_servers'], + 'allowFriends': json['allow_friends'] == null ? undefined : json['allow_friends'], + 'plexToken': json['plex_token'] == null ? undefined : json['plex_token'], + }; +} + +export function PatchedPlexSourceRequestToJSON(json: any): PatchedPlexSourceRequest { + return PatchedPlexSourceRequestToJSONTyped(json, false); +} + +export function PatchedPlexSourceRequestToJSONTyped(value?: PatchedPlexSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'client_id': value['clientId'], + 'allowed_servers': value['allowedServers'], + 'allow_friends': value['allowFriends'], + 'plex_token': value['plexToken'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPolicyBindingRequest.ts b/packages/client-ts/src/models/PatchedPolicyBindingRequest.ts new file mode 100644 index 0000000000..9c4bed9186 --- /dev/null +++ b/packages/client-ts/src/models/PatchedPolicyBindingRequest.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PolicyBinding Serializer + * @export + * @interface PatchedPolicyBindingRequest + */ +export interface PatchedPolicyBindingRequest { + /** + * + * @type {string} + * @memberof PatchedPolicyBindingRequest + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof PatchedPolicyBindingRequest + */ + group?: string | null; + /** + * + * @type {number} + * @memberof PatchedPolicyBindingRequest + */ + user?: number | null; + /** + * + * @type {string} + * @memberof PatchedPolicyBindingRequest + */ + target?: string; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof PatchedPolicyBindingRequest + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedPolicyBindingRequest + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof PatchedPolicyBindingRequest + */ + order?: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof PatchedPolicyBindingRequest + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof PatchedPolicyBindingRequest + */ + failureResult?: boolean; +} + +/** + * Check if a given object implements the PatchedPolicyBindingRequest interface. + */ +export function instanceOfPatchedPolicyBindingRequest(value: object): value is PatchedPolicyBindingRequest { + return true; +} + +export function PatchedPolicyBindingRequestFromJSON(json: any): PatchedPolicyBindingRequest { + return PatchedPolicyBindingRequestFromJSONTyped(json, false); +} + +export function PatchedPolicyBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPolicyBindingRequest { + if (json == null) { + return json; + } + return { + + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'target': json['target'] == null ? undefined : json['target'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'] == null ? undefined : json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + }; +} + +export function PatchedPolicyBindingRequestToJSON(json: any): PatchedPolicyBindingRequest { + return PatchedPolicyBindingRequestToJSONTyped(json, false); +} + +export function PatchedPolicyBindingRequestToJSONTyped(value?: PatchedPolicyBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'target': value['target'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPromptRequest.ts b/packages/client-ts/src/models/PatchedPromptRequest.ts new file mode 100644 index 0000000000..2acaeba65a --- /dev/null +++ b/packages/client-ts/src/models/PatchedPromptRequest.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PromptTypeEnum } from './PromptTypeEnum'; +import { + PromptTypeEnumFromJSON, + PromptTypeEnumFromJSONTyped, + PromptTypeEnumToJSON, + PromptTypeEnumToJSONTyped, +} from './PromptTypeEnum'; + +/** + * Prompt Serializer + * @export + * @interface PatchedPromptRequest + */ +export interface PatchedPromptRequest { + /** + * + * @type {string} + * @memberof PatchedPromptRequest + */ + name?: string; + /** + * Name of the form field, also used to store the value + * @type {string} + * @memberof PatchedPromptRequest + */ + fieldKey?: string; + /** + * + * @type {string} + * @memberof PatchedPromptRequest + */ + label?: string; + /** + * + * @type {PromptTypeEnum} + * @memberof PatchedPromptRequest + */ + type?: PromptTypeEnum; + /** + * + * @type {boolean} + * @memberof PatchedPromptRequest + */ + required?: boolean; + /** + * 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. + * @type {string} + * @memberof PatchedPromptRequest + */ + 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. + * @type {string} + * @memberof PatchedPromptRequest + */ + initialValue?: string; + /** + * + * @type {number} + * @memberof PatchedPromptRequest + */ + order?: number; + /** + * + * @type {string} + * @memberof PatchedPromptRequest + */ + subText?: string; + /** + * + * @type {boolean} + * @memberof PatchedPromptRequest + */ + placeholderExpression?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedPromptRequest + */ + initialValueExpression?: boolean; +} + + + +/** + * Check if a given object implements the PatchedPromptRequest interface. + */ +export function instanceOfPatchedPromptRequest(value: object): value is PatchedPromptRequest { + return true; +} + +export function PatchedPromptRequestFromJSON(json: any): PatchedPromptRequest { + return PatchedPromptRequestFromJSONTyped(json, false); +} + +export function PatchedPromptRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPromptRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'fieldKey': json['field_key'] == null ? undefined : json['field_key'], + 'label': json['label'] == null ? undefined : json['label'], + 'type': json['type'] == null ? undefined : PromptTypeEnumFromJSON(json['type']), + 'required': json['required'] == null ? undefined : json['required'], + 'placeholder': json['placeholder'] == null ? undefined : json['placeholder'], + 'initialValue': json['initial_value'] == null ? undefined : json['initial_value'], + 'order': json['order'] == null ? undefined : json['order'], + 'subText': json['sub_text'] == null ? undefined : json['sub_text'], + 'placeholderExpression': json['placeholder_expression'] == null ? undefined : json['placeholder_expression'], + 'initialValueExpression': json['initial_value_expression'] == null ? undefined : json['initial_value_expression'], + }; +} + +export function PatchedPromptRequestToJSON(json: any): PatchedPromptRequest { + return PatchedPromptRequestToJSONTyped(json, false); +} + +export function PatchedPromptRequestToJSONTyped(value?: PatchedPromptRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'field_key': value['fieldKey'], + 'label': value['label'], + 'type': PromptTypeEnumToJSON(value['type']), + 'required': value['required'], + 'placeholder': value['placeholder'], + 'initial_value': value['initialValue'], + 'order': value['order'], + 'sub_text': value['subText'], + 'placeholder_expression': value['placeholderExpression'], + 'initial_value_expression': value['initialValueExpression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedPromptStageRequest.ts b/packages/client-ts/src/models/PatchedPromptStageRequest.ts new file mode 100644 index 0000000000..0a45bd1cce --- /dev/null +++ b/packages/client-ts/src/models/PatchedPromptStageRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PromptStage Serializer + * @export + * @interface PatchedPromptStageRequest + */ +export interface PatchedPromptStageRequest { + /** + * + * @type {string} + * @memberof PatchedPromptStageRequest + */ + name?: string; + /** + * + * @type {Array} + * @memberof PatchedPromptStageRequest + */ + fields?: Array; + /** + * + * @type {Array} + * @memberof PatchedPromptStageRequest + */ + validationPolicies?: Array; +} + +/** + * Check if a given object implements the PatchedPromptStageRequest interface. + */ +export function instanceOfPatchedPromptStageRequest(value: object): value is PatchedPromptStageRequest { + return true; +} + +export function PatchedPromptStageRequestFromJSON(json: any): PatchedPromptStageRequest { + return PatchedPromptStageRequestFromJSONTyped(json, false); +} + +export function PatchedPromptStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPromptStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'fields': json['fields'] == null ? undefined : json['fields'], + 'validationPolicies': json['validation_policies'] == null ? undefined : json['validation_policies'], + }; +} + +export function PatchedPromptStageRequestToJSON(json: any): PatchedPromptStageRequest { + return PatchedPromptStageRequestToJSONTyped(json, false); +} + +export function PatchedPromptStageRequestToJSONTyped(value?: PatchedPromptStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'fields': value['fields'], + 'validation_policies': value['validationPolicies'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedProxyProviderRequest.ts b/packages/client-ts/src/models/PatchedProxyProviderRequest.ts new file mode 100644 index 0000000000..8da27ecdaa --- /dev/null +++ b/packages/client-ts/src/models/PatchedProxyProviderRequest.ts @@ -0,0 +1,227 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ProxyMode } from './ProxyMode'; +import { + ProxyModeFromJSON, + ProxyModeFromJSONTyped, + ProxyModeToJSON, + ProxyModeToJSONTyped, +} from './ProxyMode'; + +/** + * ProxyProvider Serializer + * @export + * @interface PatchedProxyProviderRequest + */ +export interface PatchedProxyProviderRequest { + /** + * + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + authorizationFlow?: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + invalidationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedProxyProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + internalHost?: string; + /** + * + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + externalHost?: string; + /** + * Validate SSL Certificates of upstream servers + * @type {boolean} + * @memberof PatchedProxyProviderRequest + */ + internalHostSslValidation?: boolean; + /** + * + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + certificate?: string | null; + /** + * Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + skipPathRegex?: string; + /** + * Set a custom HTTP-Basic Authentication header based on values from authentik. + * @type {boolean} + * @memberof PatchedProxyProviderRequest + */ + basicAuthEnabled?: boolean; + /** + * User/Group Attribute used for the password part of the HTTP-Basic Header. + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + 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. + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + basicAuthUserAttribute?: string; + /** + * Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. + * @type {ProxyMode} + * @memberof PatchedProxyProviderRequest + */ + mode?: ProxyMode; + /** + * When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + * @type {boolean} + * @memberof PatchedProxyProviderRequest + */ + interceptHeaderAuth?: boolean; + /** + * + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + cookieDomain?: string; + /** + * + * @type {Array} + * @memberof PatchedProxyProviderRequest + */ + jwtFederationSources?: Array; + /** + * + * @type {Array} + * @memberof PatchedProxyProviderRequest + */ + jwtFederationProviders?: Array; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + accessTokenValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedProxyProviderRequest + */ + refreshTokenValidity?: string; +} + + + +/** + * Check if a given object implements the PatchedProxyProviderRequest interface. + */ +export function instanceOfPatchedProxyProviderRequest(value: object): value is PatchedProxyProviderRequest { + return true; +} + +export function PatchedProxyProviderRequestFromJSON(json: any): PatchedProxyProviderRequest { + return PatchedProxyProviderRequestFromJSONTyped(json, false); +} + +export function PatchedProxyProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedProxyProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'internalHost': json['internal_host'] == null ? undefined : json['internal_host'], + 'externalHost': json['external_host'] == null ? undefined : json['external_host'], + 'internalHostSslValidation': json['internal_host_ssl_validation'] == null ? undefined : json['internal_host_ssl_validation'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'skipPathRegex': json['skip_path_regex'] == null ? undefined : json['skip_path_regex'], + 'basicAuthEnabled': json['basic_auth_enabled'] == null ? undefined : json['basic_auth_enabled'], + 'basicAuthPasswordAttribute': json['basic_auth_password_attribute'] == null ? undefined : json['basic_auth_password_attribute'], + 'basicAuthUserAttribute': json['basic_auth_user_attribute'] == null ? undefined : json['basic_auth_user_attribute'], + 'mode': json['mode'] == null ? undefined : ProxyModeFromJSON(json['mode']), + 'interceptHeaderAuth': json['intercept_header_auth'] == null ? undefined : json['intercept_header_auth'], + 'cookieDomain': json['cookie_domain'] == null ? undefined : json['cookie_domain'], + 'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], + 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], + }; +} + +export function PatchedProxyProviderRequestToJSON(json: any): PatchedProxyProviderRequest { + return PatchedProxyProviderRequestToJSONTyped(json, false); +} + +export function PatchedProxyProviderRequestToJSONTyped(value?: PatchedProxyProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'internal_host': value['internalHost'], + 'external_host': value['externalHost'], + 'internal_host_ssl_validation': value['internalHostSslValidation'], + 'certificate': value['certificate'], + 'skip_path_regex': value['skipPathRegex'], + 'basic_auth_enabled': value['basicAuthEnabled'], + 'basic_auth_password_attribute': value['basicAuthPasswordAttribute'], + 'basic_auth_user_attribute': value['basicAuthUserAttribute'], + 'mode': ProxyModeToJSON(value['mode']), + 'intercept_header_auth': value['interceptHeaderAuth'], + 'cookie_domain': value['cookieDomain'], + 'jwt_federation_sources': value['jwtFederationSources'], + 'jwt_federation_providers': value['jwtFederationProviders'], + 'access_token_validity': value['accessTokenValidity'], + 'refresh_token_validity': value['refreshTokenValidity'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedRACPropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedRACPropertyMappingRequest.ts new file mode 100644 index 0000000000..6fec3ef352 --- /dev/null +++ b/packages/client-ts/src/models/PatchedRACPropertyMappingRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RACPropertyMapping Serializer + * @export + * @interface PatchedRACPropertyMappingRequest + */ +export interface PatchedRACPropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedRACPropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedRACPropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedRACPropertyMappingRequest + */ + expression?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedRACPropertyMappingRequest + */ + staticSettings?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedRACPropertyMappingRequest interface. + */ +export function instanceOfPatchedRACPropertyMappingRequest(value: object): value is PatchedRACPropertyMappingRequest { + return true; +} + +export function PatchedRACPropertyMappingRequestFromJSON(json: any): PatchedRACPropertyMappingRequest { + return PatchedRACPropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedRACPropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRACPropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + 'staticSettings': json['static_settings'] == null ? undefined : json['static_settings'], + }; +} + +export function PatchedRACPropertyMappingRequestToJSON(json: any): PatchedRACPropertyMappingRequest { + return PatchedRACPropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedRACPropertyMappingRequestToJSONTyped(value?: PatchedRACPropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'static_settings': value['staticSettings'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedRACProviderRequest.ts b/packages/client-ts/src/models/PatchedRACProviderRequest.ts new file mode 100644 index 0000000000..6e78ed2409 --- /dev/null +++ b/packages/client-ts/src/models/PatchedRACProviderRequest.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RACProvider Serializer + * @export + * @interface PatchedRACProviderRequest + */ +export interface PatchedRACProviderRequest { + /** + * + * @type {string} + * @memberof PatchedRACProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedRACProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedRACProviderRequest + */ + authorizationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedRACProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedRACProviderRequest + */ + settings?: { [key: string]: any; }; + /** + * 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) + * @type {string} + * @memberof PatchedRACProviderRequest + */ + connectionExpiry?: string; + /** + * When set to true, connection tokens will be deleted upon disconnect. + * @type {boolean} + * @memberof PatchedRACProviderRequest + */ + deleteTokenOnDisconnect?: boolean; +} + +/** + * Check if a given object implements the PatchedRACProviderRequest interface. + */ +export function instanceOfPatchedRACProviderRequest(value: object): value is PatchedRACProviderRequest { + return true; +} + +export function PatchedRACProviderRequestFromJSON(json: any): PatchedRACProviderRequest { + return PatchedRACProviderRequestFromJSONTyped(json, false); +} + +export function PatchedRACProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRACProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'settings': json['settings'] == null ? undefined : json['settings'], + 'connectionExpiry': json['connection_expiry'] == null ? undefined : json['connection_expiry'], + 'deleteTokenOnDisconnect': json['delete_token_on_disconnect'] == null ? undefined : json['delete_token_on_disconnect'], + }; +} + +export function PatchedRACProviderRequestToJSON(json: any): PatchedRACProviderRequest { + return PatchedRACProviderRequestToJSONTyped(json, false); +} + +export function PatchedRACProviderRequestToJSONTyped(value?: PatchedRACProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'property_mappings': value['propertyMappings'], + 'settings': value['settings'], + 'connection_expiry': value['connectionExpiry'], + 'delete_token_on_disconnect': value['deleteTokenOnDisconnect'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedRadiusProviderPropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedRadiusProviderPropertyMappingRequest.ts new file mode 100644 index 0000000000..4aee3575a8 --- /dev/null +++ b/packages/client-ts/src/models/PatchedRadiusProviderPropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProviderPropertyMapping Serializer + * @export + * @interface PatchedRadiusProviderPropertyMappingRequest + */ +export interface PatchedRadiusProviderPropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedRadiusProviderPropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedRadiusProviderPropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedRadiusProviderPropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedRadiusProviderPropertyMappingRequest interface. + */ +export function instanceOfPatchedRadiusProviderPropertyMappingRequest(value: object): value is PatchedRadiusProviderPropertyMappingRequest { + return true; +} + +export function PatchedRadiusProviderPropertyMappingRequestFromJSON(json: any): PatchedRadiusProviderPropertyMappingRequest { + return PatchedRadiusProviderPropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedRadiusProviderPropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRadiusProviderPropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedRadiusProviderPropertyMappingRequestToJSON(json: any): PatchedRadiusProviderPropertyMappingRequest { + return PatchedRadiusProviderPropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedRadiusProviderPropertyMappingRequestToJSONTyped(value?: PatchedRadiusProviderPropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedRadiusProviderRequest.ts b/packages/client-ts/src/models/PatchedRadiusProviderRequest.ts new file mode 100644 index 0000000000..9dd53b63f9 --- /dev/null +++ b/packages/client-ts/src/models/PatchedRadiusProviderRequest.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProvider Serializer + * @export + * @interface PatchedRadiusProviderRequest + */ +export interface PatchedRadiusProviderRequest { + /** + * + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + authorizationFlow?: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + invalidationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedRadiusProviderRequest + */ + propertyMappings?: Array; + /** + * 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. + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + clientNetworks?: string; + /** + * Shared secret between clients and server to hash packets. + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + 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. + * @type {boolean} + * @memberof PatchedRadiusProviderRequest + */ + mfaSupport?: boolean; + /** + * + * @type {string} + * @memberof PatchedRadiusProviderRequest + */ + certificate?: string | null; +} + +/** + * Check if a given object implements the PatchedRadiusProviderRequest interface. + */ +export function instanceOfPatchedRadiusProviderRequest(value: object): value is PatchedRadiusProviderRequest { + return true; +} + +export function PatchedRadiusProviderRequestFromJSON(json: any): PatchedRadiusProviderRequest { + return PatchedRadiusProviderRequestFromJSONTyped(json, false); +} + +export function PatchedRadiusProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRadiusProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'clientNetworks': json['client_networks'] == null ? undefined : json['client_networks'], + 'sharedSecret': json['shared_secret'] == null ? undefined : json['shared_secret'], + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + }; +} + +export function PatchedRadiusProviderRequestToJSON(json: any): PatchedRadiusProviderRequest { + return PatchedRadiusProviderRequestToJSONTyped(json, false); +} + +export function PatchedRadiusProviderRequestToJSONTyped(value?: PatchedRadiusProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'client_networks': value['clientNetworks'], + 'shared_secret': value['sharedSecret'], + 'mfa_support': value['mfaSupport'], + 'certificate': value['certificate'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedRedirectStageRequest.ts b/packages/client-ts/src/models/PatchedRedirectStageRequest.ts new file mode 100644 index 0000000000..00598d9b21 --- /dev/null +++ b/packages/client-ts/src/models/PatchedRedirectStageRequest.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RedirectStageModeEnum } from './RedirectStageModeEnum'; +import { + RedirectStageModeEnumFromJSON, + RedirectStageModeEnumFromJSONTyped, + RedirectStageModeEnumToJSON, + RedirectStageModeEnumToJSONTyped, +} from './RedirectStageModeEnum'; + +/** + * RedirectStage Serializer + * @export + * @interface PatchedRedirectStageRequest + */ +export interface PatchedRedirectStageRequest { + /** + * + * @type {string} + * @memberof PatchedRedirectStageRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedRedirectStageRequest + */ + keepContext?: boolean; + /** + * + * @type {RedirectStageModeEnum} + * @memberof PatchedRedirectStageRequest + */ + mode?: RedirectStageModeEnum; + /** + * + * @type {string} + * @memberof PatchedRedirectStageRequest + */ + targetStatic?: string; + /** + * + * @type {string} + * @memberof PatchedRedirectStageRequest + */ + targetFlow?: string | null; +} + + + +/** + * Check if a given object implements the PatchedRedirectStageRequest interface. + */ +export function instanceOfPatchedRedirectStageRequest(value: object): value is PatchedRedirectStageRequest { + return true; +} + +export function PatchedRedirectStageRequestFromJSON(json: any): PatchedRedirectStageRequest { + return PatchedRedirectStageRequestFromJSONTyped(json, false); +} + +export function PatchedRedirectStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRedirectStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'keepContext': json['keep_context'] == null ? undefined : json['keep_context'], + 'mode': json['mode'] == null ? undefined : RedirectStageModeEnumFromJSON(json['mode']), + 'targetStatic': json['target_static'] == null ? undefined : json['target_static'], + 'targetFlow': json['target_flow'] == null ? undefined : json['target_flow'], + }; +} + +export function PatchedRedirectStageRequestToJSON(json: any): PatchedRedirectStageRequest { + return PatchedRedirectStageRequestToJSONTyped(json, false); +} + +export function PatchedRedirectStageRequestToJSONTyped(value?: PatchedRedirectStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'keep_context': value['keepContext'], + 'mode': RedirectStageModeEnumToJSON(value['mode']), + 'target_static': value['targetStatic'], + 'target_flow': value['targetFlow'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedReputationPolicyRequest.ts b/packages/client-ts/src/models/PatchedReputationPolicyRequest.ts new file mode 100644 index 0000000000..03ed74116a --- /dev/null +++ b/packages/client-ts/src/models/PatchedReputationPolicyRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Reputation Policy Serializer + * @export + * @interface PatchedReputationPolicyRequest + */ +export interface PatchedReputationPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedReputationPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedReputationPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedReputationPolicyRequest + */ + checkIp?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedReputationPolicyRequest + */ + checkUsername?: boolean; + /** + * + * @type {number} + * @memberof PatchedReputationPolicyRequest + */ + threshold?: number; +} + +/** + * Check if a given object implements the PatchedReputationPolicyRequest interface. + */ +export function instanceOfPatchedReputationPolicyRequest(value: object): value is PatchedReputationPolicyRequest { + return true; +} + +export function PatchedReputationPolicyRequestFromJSON(json: any): PatchedReputationPolicyRequest { + return PatchedReputationPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedReputationPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedReputationPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'checkIp': json['check_ip'] == null ? undefined : json['check_ip'], + 'checkUsername': json['check_username'] == null ? undefined : json['check_username'], + 'threshold': json['threshold'] == null ? undefined : json['threshold'], + }; +} + +export function PatchedReputationPolicyRequestToJSON(json: any): PatchedReputationPolicyRequest { + return PatchedReputationPolicyRequestToJSONTyped(json, false); +} + +export function PatchedReputationPolicyRequestToJSONTyped(value?: PatchedReputationPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'check_ip': value['checkIp'], + 'check_username': value['checkUsername'], + 'threshold': value['threshold'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedRoleRequest.ts b/packages/client-ts/src/models/PatchedRoleRequest.ts new file mode 100644 index 0000000000..7ad3fc54fd --- /dev/null +++ b/packages/client-ts/src/models/PatchedRoleRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Role serializer + * @export + * @interface PatchedRoleRequest + */ +export interface PatchedRoleRequest { + /** + * + * @type {string} + * @memberof PatchedRoleRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedRoleRequest interface. + */ +export function instanceOfPatchedRoleRequest(value: object): value is PatchedRoleRequest { + return true; +} + +export function PatchedRoleRequestFromJSON(json: any): PatchedRoleRequest { + return PatchedRoleRequestFromJSONTyped(json, false); +} + +export function PatchedRoleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRoleRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedRoleRequestToJSON(json: any): PatchedRoleRequest { + return PatchedRoleRequestToJSONTyped(json, false); +} + +export function PatchedRoleRequestToJSONTyped(value?: PatchedRoleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSAMLPropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedSAMLPropertyMappingRequest.ts new file mode 100644 index 0000000000..4015b4e950 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSAMLPropertyMappingRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAMLPropertyMapping Serializer + * @export + * @interface PatchedSAMLPropertyMappingRequest + */ +export interface PatchedSAMLPropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedSAMLPropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedSAMLPropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedSAMLPropertyMappingRequest + */ + expression?: string; + /** + * + * @type {string} + * @memberof PatchedSAMLPropertyMappingRequest + */ + samlName?: string; + /** + * + * @type {string} + * @memberof PatchedSAMLPropertyMappingRequest + */ + friendlyName?: string | null; +} + +/** + * Check if a given object implements the PatchedSAMLPropertyMappingRequest interface. + */ +export function instanceOfPatchedSAMLPropertyMappingRequest(value: object): value is PatchedSAMLPropertyMappingRequest { + return true; +} + +export function PatchedSAMLPropertyMappingRequestFromJSON(json: any): PatchedSAMLPropertyMappingRequest { + return PatchedSAMLPropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedSAMLPropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSAMLPropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + 'samlName': json['saml_name'] == null ? undefined : json['saml_name'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + }; +} + +export function PatchedSAMLPropertyMappingRequestToJSON(json: any): PatchedSAMLPropertyMappingRequest { + return PatchedSAMLPropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedSAMLPropertyMappingRequestToJSONTyped(value?: PatchedSAMLPropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'saml_name': value['samlName'], + 'friendly_name': value['friendlyName'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSAMLProviderRequest.ts b/packages/client-ts/src/models/PatchedSAMLProviderRequest.ts new file mode 100644 index 0000000000..8a3f4282f4 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSAMLProviderRequest.ts @@ -0,0 +1,319 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; +import type { SAMLLogoutMethods } from './SAMLLogoutMethods'; +import { + SAMLLogoutMethodsFromJSON, + SAMLLogoutMethodsFromJSONTyped, + SAMLLogoutMethodsToJSON, + SAMLLogoutMethodsToJSONTyped, +} from './SAMLLogoutMethods'; +import type { SAMLBindingsEnum } from './SAMLBindingsEnum'; +import { + SAMLBindingsEnumFromJSON, + SAMLBindingsEnumFromJSONTyped, + SAMLBindingsEnumToJSON, + SAMLBindingsEnumToJSONTyped, +} from './SAMLBindingsEnum'; + +/** + * SAMLProvider Serializer + * @export + * @interface PatchedSAMLProviderRequest + */ +export interface PatchedSAMLProviderRequest { + /** + * + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + authorizationFlow?: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + invalidationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedSAMLProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + acsUrl?: string; + /** + * Single Logout Service URL where the logout response should be sent. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + slsUrl?: string; + /** + * Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + audience?: string; + /** + * Also known as EntityID + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + issuer?: string; + /** + * Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + assertionValidNotBefore?: string; + /** + * Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + assertionValidNotOnOrAfter?: string; + /** + * Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + sessionValidNotOnOrAfter?: string; + /** + * Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + nameIdMapping?: string | null; + /** + * Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + authnContextClassRefMapping?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof PatchedSAMLProviderRequest + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof PatchedSAMLProviderRequest + */ + signatureAlgorithm?: SignatureAlgorithmEnum; + /** + * Keypair used to sign outgoing Responses going to the Service Provider. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + signingKp?: string | null; + /** + * When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + verificationKp?: string | null; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof PatchedSAMLProviderRequest + */ + signAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedSAMLProviderRequest + */ + signResponse?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedSAMLProviderRequest + */ + signLogoutRequest?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedSAMLProviderRequest + */ + signLogoutResponse?: boolean; + /** + * This determines how authentik sends the response back to the Service Provider. + * @type {SAMLBindingsEnum} + * @memberof PatchedSAMLProviderRequest + */ + spBinding?: SAMLBindingsEnum; + /** + * This determines how authentik sends the logout response back to the Service Provider. + * @type {SAMLBindingsEnum} + * @memberof PatchedSAMLProviderRequest + */ + slsBinding?: SAMLBindingsEnum; + /** + * Method to use for logout. Front-channel iframe loads all logout URLs simultaneously in hidden iframes. Front-channel native uses your active browser tab to send post requests and redirect to providers. Back-channel sends logout requests directly from the server without user interaction (requires POST SLS binding). + * @type {SAMLLogoutMethods} + * @memberof PatchedSAMLProviderRequest + */ + logoutMethod?: SAMLLogoutMethods; + /** + * Default relay_state value for IDP-initiated logins + * @type {string} + * @memberof PatchedSAMLProviderRequest + */ + defaultRelayState?: string; + /** + * + * @type {SAMLNameIDPolicyEnum} + * @memberof PatchedSAMLProviderRequest + */ + defaultNameIdPolicy?: SAMLNameIDPolicyEnum; +} + + + +/** + * Check if a given object implements the PatchedSAMLProviderRequest interface. + */ +export function instanceOfPatchedSAMLProviderRequest(value: object): value is PatchedSAMLProviderRequest { + return true; +} + +export function PatchedSAMLProviderRequestFromJSON(json: any): PatchedSAMLProviderRequest { + return PatchedSAMLProviderRequestFromJSONTyped(json, false); +} + +export function PatchedSAMLProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSAMLProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'acsUrl': json['acs_url'] == null ? undefined : json['acs_url'], + 'slsUrl': json['sls_url'] == null ? undefined : json['sls_url'], + 'audience': json['audience'] == null ? undefined : json['audience'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'], + 'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'], + 'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'], + 'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'], + 'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'], + 'signResponse': json['sign_response'] == null ? undefined : json['sign_response'], + 'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'], + 'signLogoutResponse': json['sign_logout_response'] == null ? undefined : json['sign_logout_response'], + 'spBinding': json['sp_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['sp_binding']), + 'slsBinding': json['sls_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['sls_binding']), + 'logoutMethod': json['logout_method'] == null ? undefined : SAMLLogoutMethodsFromJSON(json['logout_method']), + 'defaultRelayState': json['default_relay_state'] == null ? undefined : json['default_relay_state'], + 'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['default_name_id_policy']), + }; +} + +export function PatchedSAMLProviderRequestToJSON(json: any): PatchedSAMLProviderRequest { + return PatchedSAMLProviderRequestToJSONTyped(json, false); +} + +export function PatchedSAMLProviderRequestToJSONTyped(value?: PatchedSAMLProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'acs_url': value['acsUrl'], + 'sls_url': value['slsUrl'], + 'audience': value['audience'], + 'issuer': value['issuer'], + 'assertion_valid_not_before': value['assertionValidNotBefore'], + 'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'], + 'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'], + 'name_id_mapping': value['nameIdMapping'], + 'authn_context_class_ref_mapping': value['authnContextClassRefMapping'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'signing_kp': value['signingKp'], + 'verification_kp': value['verificationKp'], + 'encryption_kp': value['encryptionKp'], + 'sign_assertion': value['signAssertion'], + 'sign_response': value['signResponse'], + 'sign_logout_request': value['signLogoutRequest'], + 'sign_logout_response': value['signLogoutResponse'], + 'sp_binding': SAMLBindingsEnumToJSON(value['spBinding']), + 'sls_binding': SAMLBindingsEnumToJSON(value['slsBinding']), + 'logout_method': SAMLLogoutMethodsToJSON(value['logoutMethod']), + 'default_relay_state': value['defaultRelayState'], + 'default_name_id_policy': SAMLNameIDPolicyEnumToJSON(value['defaultNameIdPolicy']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedSAMLSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedSAMLSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..6c83e5e1d4 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSAMLSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAMLSourcePropertyMapping Serializer + * @export + * @interface PatchedSAMLSourcePropertyMappingRequest + */ +export interface PatchedSAMLSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedSAMLSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedSAMLSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedSAMLSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedSAMLSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedSAMLSourcePropertyMappingRequest(value: object): value is PatchedSAMLSourcePropertyMappingRequest { + return true; +} + +export function PatchedSAMLSourcePropertyMappingRequestFromJSON(json: any): PatchedSAMLSourcePropertyMappingRequest { + return PatchedSAMLSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedSAMLSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSAMLSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedSAMLSourcePropertyMappingRequestToJSON(json: any): PatchedSAMLSourcePropertyMappingRequest { + return PatchedSAMLSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedSAMLSourcePropertyMappingRequestToJSONTyped(value?: PatchedSAMLSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSAMLSourceRequest.ts b/packages/client-ts/src/models/PatchedSAMLSourceRequest.ts new file mode 100644 index 0000000000..6570890360 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSAMLSourceRequest.ts @@ -0,0 +1,333 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { BindingTypeEnum } from './BindingTypeEnum'; +import { + BindingTypeEnumFromJSON, + BindingTypeEnumFromJSONTyped, + BindingTypeEnumToJSON, + BindingTypeEnumToJSONTyped, +} from './BindingTypeEnum'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * SAMLSource Serializer + * @export + * @interface PatchedSAMLSourceRequest + */ +export interface PatchedSAMLSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedSAMLSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PatchedSAMLSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PatchedSAMLSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedSAMLSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedSAMLSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PatchedSAMLSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof PatchedSAMLSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Flow used before authentication. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + preAuthenticationFlow?: string; + /** + * Also known as Entity ID. Defaults the Metadata URL. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + issuer?: string; + /** + * URL that the initial Login request is sent to. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + ssoUrl?: string; + /** + * Optional URL if your IDP supports Single-Logout. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + sloUrl?: string | null; + /** + * Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. + * @type {boolean} + * @memberof PatchedSAMLSourceRequest + */ + allowIdpInitiated?: boolean; + /** + * NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + * @type {SAMLNameIDPolicyEnum} + * @memberof PatchedSAMLSourceRequest + */ + nameIdPolicy?: SAMLNameIDPolicyEnum; + /** + * + * @type {BindingTypeEnum} + * @memberof PatchedSAMLSourceRequest + */ + bindingType?: BindingTypeEnum; + /** + * When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + verificationKp?: string | null; + /** + * Keypair used to sign outgoing Responses going to the Identity Provider. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + signingKp?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof PatchedSAMLSourceRequest + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof PatchedSAMLSourceRequest + */ + 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). + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + temporaryUserDeleteAfter?: string; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof PatchedSAMLSourceRequest + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof PatchedSAMLSourceRequest + */ + signedAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedSAMLSourceRequest + */ + signedResponse?: boolean; +} + + + +/** + * Check if a given object implements the PatchedSAMLSourceRequest interface. + */ +export function instanceOfPatchedSAMLSourceRequest(value: object): value is PatchedSAMLSourceRequest { + return true; +} + +export function PatchedSAMLSourceRequestFromJSON(json: any): PatchedSAMLSourceRequest { + return PatchedSAMLSourceRequestFromJSONTyped(json, false); +} + +export function PatchedSAMLSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSAMLSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'preAuthenticationFlow': json['pre_authentication_flow'] == null ? undefined : json['pre_authentication_flow'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'ssoUrl': json['sso_url'] == null ? undefined : json['sso_url'], + 'sloUrl': json['slo_url'] == null ? undefined : json['slo_url'], + 'allowIdpInitiated': json['allow_idp_initiated'] == null ? undefined : json['allow_idp_initiated'], + 'nameIdPolicy': json['name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['name_id_policy']), + 'bindingType': json['binding_type'] == null ? undefined : BindingTypeEnumFromJSON(json['binding_type']), + 'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'], + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'temporaryUserDeleteAfter': json['temporary_user_delete_after'] == null ? undefined : json['temporary_user_delete_after'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signedAssertion': json['signed_assertion'] == null ? undefined : json['signed_assertion'], + 'signedResponse': json['signed_response'] == null ? undefined : json['signed_response'], + }; +} + +export function PatchedSAMLSourceRequestToJSON(json: any): PatchedSAMLSourceRequest { + return PatchedSAMLSourceRequestToJSONTyped(json, false); +} + +export function PatchedSAMLSourceRequestToJSONTyped(value?: PatchedSAMLSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'pre_authentication_flow': value['preAuthenticationFlow'], + 'issuer': value['issuer'], + 'sso_url': value['ssoUrl'], + 'slo_url': value['sloUrl'], + 'allow_idp_initiated': value['allowIdpInitiated'], + 'name_id_policy': SAMLNameIDPolicyEnumToJSON(value['nameIdPolicy']), + 'binding_type': BindingTypeEnumToJSON(value['bindingType']), + 'verification_kp': value['verificationKp'], + 'signing_kp': value['signingKp'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'temporary_user_delete_after': value['temporaryUserDeleteAfter'], + 'encryption_kp': value['encryptionKp'], + 'signed_assertion': value['signedAssertion'], + 'signed_response': value['signedResponse'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSCIMMappingRequest.ts b/packages/client-ts/src/models/PatchedSCIMMappingRequest.ts new file mode 100644 index 0000000000..2e3d0e1e9f --- /dev/null +++ b/packages/client-ts/src/models/PatchedSCIMMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMMapping Serializer + * @export + * @interface PatchedSCIMMappingRequest + */ +export interface PatchedSCIMMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedSCIMMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedSCIMMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedSCIMMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedSCIMMappingRequest interface. + */ +export function instanceOfPatchedSCIMMappingRequest(value: object): value is PatchedSCIMMappingRequest { + return true; +} + +export function PatchedSCIMMappingRequestFromJSON(json: any): PatchedSCIMMappingRequest { + return PatchedSCIMMappingRequestFromJSONTyped(json, false); +} + +export function PatchedSCIMMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedSCIMMappingRequestToJSON(json: any): PatchedSCIMMappingRequest { + return PatchedSCIMMappingRequestToJSONTyped(json, false); +} + +export function PatchedSCIMMappingRequestToJSONTyped(value?: PatchedSCIMMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSCIMProviderRequest.ts b/packages/client-ts/src/models/PatchedSCIMProviderRequest.ts new file mode 100644 index 0000000000..eb2d9ba8a7 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSCIMProviderRequest.ts @@ -0,0 +1,202 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CompatibilityModeEnum } from './CompatibilityModeEnum'; +import { + CompatibilityModeEnumFromJSON, + CompatibilityModeEnumFromJSONTyped, + CompatibilityModeEnumToJSON, + CompatibilityModeEnumToJSONTyped, +} from './CompatibilityModeEnum'; +import type { SCIMAuthenticationModeEnum } from './SCIMAuthenticationModeEnum'; +import { + SCIMAuthenticationModeEnumFromJSON, + SCIMAuthenticationModeEnumFromJSONTyped, + SCIMAuthenticationModeEnumToJSON, + SCIMAuthenticationModeEnumToJSONTyped, +} from './SCIMAuthenticationModeEnum'; + +/** + * SCIMProvider Serializer + * @export + * @interface PatchedSCIMProviderRequest + */ +export interface PatchedSCIMProviderRequest { + /** + * + * @type {string} + * @memberof PatchedSCIMProviderRequest + */ + name?: string; + /** + * + * @type {Array} + * @memberof PatchedSCIMProviderRequest + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof PatchedSCIMProviderRequest + */ + propertyMappingsGroup?: Array; + /** + * Base URL to SCIM requests, usually ends in /v2 + * @type {string} + * @memberof PatchedSCIMProviderRequest + */ + url?: string; + /** + * + * @type {boolean} + * @memberof PatchedSCIMProviderRequest + */ + verifyCertificates?: boolean; + /** + * Authentication token + * @type {string} + * @memberof PatchedSCIMProviderRequest + */ + token?: string; + /** + * + * @type {SCIMAuthenticationModeEnum} + * @memberof PatchedSCIMProviderRequest + */ + authMode?: SCIMAuthenticationModeEnum; + /** + * OAuth Source used for authentication + * @type {string} + * @memberof PatchedSCIMProviderRequest + */ + authOauth?: string | null; + /** + * Additional OAuth parameters, such as grant_type + * @type {{ [key: string]: any; }} + * @memberof PatchedSCIMProviderRequest + */ + authOauthParams?: { [key: string]: any; }; + /** + * Alter authentik behavior for vendor-specific SCIM implementations. + * @type {CompatibilityModeEnum} + * @memberof PatchedSCIMProviderRequest + */ + compatibilityMode?: CompatibilityModeEnum; + /** + * Cache duration for ServiceProviderConfig responses. Set minutes=0 to disable. + * @type {string} + * @memberof PatchedSCIMProviderRequest + */ + serviceProviderConfigCacheTimeout?: string; + /** + * + * @type {boolean} + * @memberof PatchedSCIMProviderRequest + */ + excludeUsersServiceAccount?: boolean; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof PatchedSCIMProviderRequest + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof PatchedSCIMProviderRequest + */ + syncPageTimeout?: string; + /** + * Group filters used to define sync-scope for groups. + * @type {Array} + * @memberof PatchedSCIMProviderRequest + */ + groupFilters?: Array; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof PatchedSCIMProviderRequest + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the PatchedSCIMProviderRequest interface. + */ +export function instanceOfPatchedSCIMProviderRequest(value: object): value is PatchedSCIMProviderRequest { + return true; +} + +export function PatchedSCIMProviderRequestFromJSON(json: any): PatchedSCIMProviderRequest { + return PatchedSCIMProviderRequestFromJSONTyped(json, false); +} + +export function PatchedSCIMProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'url': json['url'] == null ? undefined : json['url'], + 'verifyCertificates': json['verify_certificates'] == null ? undefined : json['verify_certificates'], + 'token': json['token'] == null ? undefined : json['token'], + 'authMode': json['auth_mode'] == null ? undefined : SCIMAuthenticationModeEnumFromJSON(json['auth_mode']), + 'authOauth': json['auth_oauth'] == null ? undefined : json['auth_oauth'], + 'authOauthParams': json['auth_oauth_params'] == null ? undefined : json['auth_oauth_params'], + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : CompatibilityModeEnumFromJSON(json['compatibility_mode']), + 'serviceProviderConfigCacheTimeout': json['service_provider_config_cache_timeout'] == null ? undefined : json['service_provider_config_cache_timeout'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'groupFilters': json['group_filters'] == null ? undefined : json['group_filters'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function PatchedSCIMProviderRequestToJSON(json: any): PatchedSCIMProviderRequest { + return PatchedSCIMProviderRequestToJSONTyped(json, false); +} + +export function PatchedSCIMProviderRequestToJSONTyped(value?: PatchedSCIMProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'url': value['url'], + 'verify_certificates': value['verifyCertificates'], + 'token': value['token'], + 'auth_mode': SCIMAuthenticationModeEnumToJSON(value['authMode']), + 'auth_oauth': value['authOauth'], + 'auth_oauth_params': value['authOauthParams'], + 'compatibility_mode': CompatibilityModeEnumToJSON(value['compatibilityMode']), + 'service_provider_config_cache_timeout': value['serviceProviderConfigCacheTimeout'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'group_filters': value['groupFilters'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSCIMSourceGroupRequest.ts b/packages/client-ts/src/models/PatchedSCIMSourceGroupRequest.ts new file mode 100644 index 0000000000..c2bbd7d98d --- /dev/null +++ b/packages/client-ts/src/models/PatchedSCIMSourceGroupRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourceGroup Serializer + * @export + * @interface PatchedSCIMSourceGroupRequest + */ +export interface PatchedSCIMSourceGroupRequest { + /** + * + * @type {string} + * @memberof PatchedSCIMSourceGroupRequest + */ + id?: string; + /** + * + * @type {string} + * @memberof PatchedSCIMSourceGroupRequest + */ + externalId?: string; + /** + * + * @type {string} + * @memberof PatchedSCIMSourceGroupRequest + */ + group?: string; + /** + * + * @type {string} + * @memberof PatchedSCIMSourceGroupRequest + */ + source?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedSCIMSourceGroupRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedSCIMSourceGroupRequest interface. + */ +export function instanceOfPatchedSCIMSourceGroupRequest(value: object): value is PatchedSCIMSourceGroupRequest { + return true; +} + +export function PatchedSCIMSourceGroupRequestFromJSON(json: any): PatchedSCIMSourceGroupRequest { + return PatchedSCIMSourceGroupRequestFromJSONTyped(json, false); +} + +export function PatchedSCIMSourceGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMSourceGroupRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'externalId': json['external_id'] == null ? undefined : json['external_id'], + 'group': json['group'] == null ? undefined : json['group'], + 'source': json['source'] == null ? undefined : json['source'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PatchedSCIMSourceGroupRequestToJSON(json: any): PatchedSCIMSourceGroupRequest { + return PatchedSCIMSourceGroupRequestToJSONTyped(json, false); +} + +export function PatchedSCIMSourceGroupRequestToJSONTyped(value?: PatchedSCIMSourceGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'external_id': value['externalId'], + 'group': value['group'], + 'source': value['source'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSCIMSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedSCIMSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..d2109ef43c --- /dev/null +++ b/packages/client-ts/src/models/PatchedSCIMSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourcePropertyMapping Serializer + * @export + * @interface PatchedSCIMSourcePropertyMappingRequest + */ +export interface PatchedSCIMSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedSCIMSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedSCIMSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedSCIMSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedSCIMSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedSCIMSourcePropertyMappingRequest(value: object): value is PatchedSCIMSourcePropertyMappingRequest { + return true; +} + +export function PatchedSCIMSourcePropertyMappingRequestFromJSON(json: any): PatchedSCIMSourcePropertyMappingRequest { + return PatchedSCIMSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedSCIMSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedSCIMSourcePropertyMappingRequestToJSON(json: any): PatchedSCIMSourcePropertyMappingRequest { + return PatchedSCIMSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedSCIMSourcePropertyMappingRequestToJSONTyped(value?: PatchedSCIMSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSCIMSourceRequest.ts b/packages/client-ts/src/models/PatchedSCIMSourceRequest.ts new file mode 100644 index 0000000000..18789b03ac --- /dev/null +++ b/packages/client-ts/src/models/PatchedSCIMSourceRequest.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSource Serializer + * @export + * @interface PatchedSCIMSourceRequest + */ +export interface PatchedSCIMSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedSCIMSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedSCIMSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedSCIMSourceRequest + */ + enabled?: boolean; + /** + * + * @type {Array} + * @memberof PatchedSCIMSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedSCIMSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {string} + * @memberof PatchedSCIMSourceRequest + */ + userPathTemplate?: string; +} + +/** + * Check if a given object implements the PatchedSCIMSourceRequest interface. + */ +export function instanceOfPatchedSCIMSourceRequest(value: object): value is PatchedSCIMSourceRequest { + return true; +} + +export function PatchedSCIMSourceRequestFromJSON(json: any): PatchedSCIMSourceRequest { + return PatchedSCIMSourceRequestFromJSONTyped(json, false); +} + +export function PatchedSCIMSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + }; +} + +export function PatchedSCIMSourceRequestToJSON(json: any): PatchedSCIMSourceRequest { + return PatchedSCIMSourceRequestToJSONTyped(json, false); +} + +export function PatchedSCIMSourceRequestToJSONTyped(value?: PatchedSCIMSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'user_path_template': value['userPathTemplate'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSCIMSourceUserRequest.ts b/packages/client-ts/src/models/PatchedSCIMSourceUserRequest.ts new file mode 100644 index 0000000000..e30e0e58ee --- /dev/null +++ b/packages/client-ts/src/models/PatchedSCIMSourceUserRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourceUser Serializer + * @export + * @interface PatchedSCIMSourceUserRequest + */ +export interface PatchedSCIMSourceUserRequest { + /** + * + * @type {string} + * @memberof PatchedSCIMSourceUserRequest + */ + id?: string; + /** + * + * @type {string} + * @memberof PatchedSCIMSourceUserRequest + */ + externalId?: string; + /** + * + * @type {number} + * @memberof PatchedSCIMSourceUserRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedSCIMSourceUserRequest + */ + source?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedSCIMSourceUserRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PatchedSCIMSourceUserRequest interface. + */ +export function instanceOfPatchedSCIMSourceUserRequest(value: object): value is PatchedSCIMSourceUserRequest { + return true; +} + +export function PatchedSCIMSourceUserRequestFromJSON(json: any): PatchedSCIMSourceUserRequest { + return PatchedSCIMSourceUserRequestFromJSONTyped(json, false); +} + +export function PatchedSCIMSourceUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSCIMSourceUserRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'externalId': json['external_id'] == null ? undefined : json['external_id'], + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function PatchedSCIMSourceUserRequestToJSON(json: any): PatchedSCIMSourceUserRequest { + return PatchedSCIMSourceUserRequestToJSONTyped(json, false); +} + +export function PatchedSCIMSourceUserRequestToJSONTyped(value?: PatchedSCIMSourceUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'external_id': value['externalId'], + 'user': value['user'], + 'source': value['source'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSMSDeviceRequest.ts b/packages/client-ts/src/models/PatchedSMSDeviceRequest.ts new file mode 100644 index 0000000000..f0da9509cd --- /dev/null +++ b/packages/client-ts/src/models/PatchedSMSDeviceRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for sms authenticator devices + * @export + * @interface PatchedSMSDeviceRequest + */ +export interface PatchedSMSDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof PatchedSMSDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedSMSDeviceRequest interface. + */ +export function instanceOfPatchedSMSDeviceRequest(value: object): value is PatchedSMSDeviceRequest { + return true; +} + +export function PatchedSMSDeviceRequestFromJSON(json: any): PatchedSMSDeviceRequest { + return PatchedSMSDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedSMSDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSMSDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedSMSDeviceRequestToJSON(json: any): PatchedSMSDeviceRequest { + return PatchedSMSDeviceRequestToJSONTyped(json, false); +} + +export function PatchedSMSDeviceRequestToJSONTyped(value?: PatchedSMSDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSSFProviderRequest.ts b/packages/client-ts/src/models/PatchedSSFProviderRequest.ts new file mode 100644 index 0000000000..3cf6a8157b --- /dev/null +++ b/packages/client-ts/src/models/PatchedSSFProviderRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SSFProvider Serializer + * @export + * @interface PatchedSSFProviderRequest + */ +export interface PatchedSSFProviderRequest { + /** + * + * @type {string} + * @memberof PatchedSSFProviderRequest + */ + name?: string; + /** + * Key used to sign the SSF Events. + * @type {string} + * @memberof PatchedSSFProviderRequest + */ + signingKey?: string; + /** + * + * @type {Array} + * @memberof PatchedSSFProviderRequest + */ + oidcAuthProviders?: Array; + /** + * + * @type {string} + * @memberof PatchedSSFProviderRequest + */ + eventRetention?: string; +} + +/** + * Check if a given object implements the PatchedSSFProviderRequest interface. + */ +export function instanceOfPatchedSSFProviderRequest(value: object): value is PatchedSSFProviderRequest { + return true; +} + +export function PatchedSSFProviderRequestFromJSON(json: any): PatchedSSFProviderRequest { + return PatchedSSFProviderRequestFromJSONTyped(json, false); +} + +export function PatchedSSFProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSSFProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'signingKey': json['signing_key'] == null ? undefined : json['signing_key'], + 'oidcAuthProviders': json['oidc_auth_providers'] == null ? undefined : json['oidc_auth_providers'], + 'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'], + }; +} + +export function PatchedSSFProviderRequestToJSON(json: any): PatchedSSFProviderRequest { + return PatchedSSFProviderRequestToJSONTyped(json, false); +} + +export function PatchedSSFProviderRequestToJSONTyped(value?: PatchedSSFProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'signing_key': value['signingKey'], + 'oidc_auth_providers': value['oidcAuthProviders'], + 'event_retention': value['eventRetention'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedScheduleRequest.ts b/packages/client-ts/src/models/PatchedScheduleRequest.ts new file mode 100644 index 0000000000..584f1042fc --- /dev/null +++ b/packages/client-ts/src/models/PatchedScheduleRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PatchedScheduleRequest + */ +export interface PatchedScheduleRequest { + /** + * + * @type {string} + * @memberof PatchedScheduleRequest + */ + relObjId?: string | null; + /** + * When to schedule tasks + * @type {string} + * @memberof PatchedScheduleRequest + */ + crontab?: string; + /** + * Pause this schedule + * @type {boolean} + * @memberof PatchedScheduleRequest + */ + paused?: boolean; +} + +/** + * Check if a given object implements the PatchedScheduleRequest interface. + */ +export function instanceOfPatchedScheduleRequest(value: object): value is PatchedScheduleRequest { + return true; +} + +export function PatchedScheduleRequestFromJSON(json: any): PatchedScheduleRequest { + return PatchedScheduleRequestFromJSONTyped(json, false); +} + +export function PatchedScheduleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedScheduleRequest { + if (json == null) { + return json; + } + return { + + 'relObjId': json['rel_obj_id'] == null ? undefined : json['rel_obj_id'], + 'crontab': json['crontab'] == null ? undefined : json['crontab'], + 'paused': json['paused'] == null ? undefined : json['paused'], + }; +} + +export function PatchedScheduleRequestToJSON(json: any): PatchedScheduleRequest { + return PatchedScheduleRequestToJSONTyped(json, false); +} + +export function PatchedScheduleRequestToJSONTyped(value?: PatchedScheduleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'rel_obj_id': value['relObjId'], + 'crontab': value['crontab'], + 'paused': value['paused'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedScopeMappingRequest.ts b/packages/client-ts/src/models/PatchedScopeMappingRequest.ts new file mode 100644 index 0000000000..cae2903629 --- /dev/null +++ b/packages/client-ts/src/models/PatchedScopeMappingRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ScopeMapping Serializer + * @export + * @interface PatchedScopeMappingRequest + */ +export interface PatchedScopeMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedScopeMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedScopeMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedScopeMappingRequest + */ + expression?: string; + /** + * Scope name requested by the client + * @type {string} + * @memberof PatchedScopeMappingRequest + */ + scopeName?: string; + /** + * Description shown to the user when consenting. If left empty, the user won't be informed. + * @type {string} + * @memberof PatchedScopeMappingRequest + */ + description?: string; +} + +/** + * Check if a given object implements the PatchedScopeMappingRequest interface. + */ +export function instanceOfPatchedScopeMappingRequest(value: object): value is PatchedScopeMappingRequest { + return true; +} + +export function PatchedScopeMappingRequestFromJSON(json: any): PatchedScopeMappingRequest { + return PatchedScopeMappingRequestFromJSONTyped(json, false); +} + +export function PatchedScopeMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedScopeMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + 'scopeName': json['scope_name'] == null ? undefined : json['scope_name'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function PatchedScopeMappingRequestToJSON(json: any): PatchedScopeMappingRequest { + return PatchedScopeMappingRequestToJSONTyped(json, false); +} + +export function PatchedScopeMappingRequestToJSONTyped(value?: PatchedScopeMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'scope_name': value['scopeName'], + 'description': value['description'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSettingsRequest.ts b/packages/client-ts/src/models/PatchedSettingsRequest.ts new file mode 100644 index 0000000000..5ddc4be1e5 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSettingsRequest.ts @@ -0,0 +1,193 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PatchedSettingsRequestFlags } from './PatchedSettingsRequestFlags'; +import { + PatchedSettingsRequestFlagsFromJSON, + PatchedSettingsRequestFlagsFromJSONTyped, + PatchedSettingsRequestFlagsToJSON, + PatchedSettingsRequestFlagsToJSONTyped, +} from './PatchedSettingsRequestFlags'; + +/** + * Settings Serializer + * @export + * @interface PatchedSettingsRequest + */ +export interface PatchedSettingsRequest { + /** + * Configure how authentik should show avatars for users. + * @type {string} + * @memberof PatchedSettingsRequest + */ + avatars?: string; + /** + * Enable the ability for users to change their name. + * @type {boolean} + * @memberof PatchedSettingsRequest + */ + defaultUserChangeName?: boolean; + /** + * Enable the ability for users to change their email address. + * @type {boolean} + * @memberof PatchedSettingsRequest + */ + defaultUserChangeEmail?: boolean; + /** + * Enable the ability for users to change their username. + * @type {boolean} + * @memberof PatchedSettingsRequest + */ + defaultUserChangeUsername?: boolean; + /** + * Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). + * @type {string} + * @memberof PatchedSettingsRequest + */ + eventRetention?: string; + /** + * Reputation cannot decrease lower than this value. Zero or negative. + * @type {number} + * @memberof PatchedSettingsRequest + */ + reputationLowerLimit?: number; + /** + * Reputation cannot increase higher than this value. Zero or positive. + * @type {number} + * @memberof PatchedSettingsRequest + */ + reputationUpperLimit?: number; + /** + * + * @type {any} + * @memberof PatchedSettingsRequest + */ + footerLinks?: any | null; + /** + * When enabled, all the events caused by a user will be deleted upon the user's deletion. + * @type {boolean} + * @memberof PatchedSettingsRequest + */ + gdprCompliance?: boolean; + /** + * Globally enable/disable impersonation. + * @type {boolean} + * @memberof PatchedSettingsRequest + */ + impersonation?: boolean; + /** + * Require administrators to provide a reason for impersonating a user. + * @type {boolean} + * @memberof PatchedSettingsRequest + */ + impersonationRequireReason?: boolean; + /** + * Default token duration + * @type {string} + * @memberof PatchedSettingsRequest + */ + defaultTokenDuration?: string; + /** + * Default token length + * @type {number} + * @memberof PatchedSettingsRequest + */ + defaultTokenLength?: number; + /** + * Default page size for API responses, if no size was requested. + * @type {number} + * @memberof PatchedSettingsRequest + */ + paginationDefaultPageSize?: number; + /** + * Maximum page size + * @type {number} + * @memberof PatchedSettingsRequest + */ + paginationMaxPageSize?: number; + /** + * + * @type {PatchedSettingsRequestFlags} + * @memberof PatchedSettingsRequest + */ + flags?: PatchedSettingsRequestFlags; +} + +/** + * Check if a given object implements the PatchedSettingsRequest interface. + */ +export function instanceOfPatchedSettingsRequest(value: object): value is PatchedSettingsRequest { + return true; +} + +export function PatchedSettingsRequestFromJSON(json: any): PatchedSettingsRequest { + return PatchedSettingsRequestFromJSONTyped(json, false); +} + +export function PatchedSettingsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSettingsRequest { + if (json == null) { + return json; + } + return { + + 'avatars': json['avatars'] == null ? undefined : json['avatars'], + 'defaultUserChangeName': json['default_user_change_name'] == null ? undefined : json['default_user_change_name'], + 'defaultUserChangeEmail': json['default_user_change_email'] == null ? undefined : json['default_user_change_email'], + 'defaultUserChangeUsername': json['default_user_change_username'] == null ? undefined : json['default_user_change_username'], + 'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'], + 'reputationLowerLimit': json['reputation_lower_limit'] == null ? undefined : json['reputation_lower_limit'], + 'reputationUpperLimit': json['reputation_upper_limit'] == null ? undefined : json['reputation_upper_limit'], + 'footerLinks': json['footer_links'] == null ? undefined : json['footer_links'], + 'gdprCompliance': json['gdpr_compliance'] == null ? undefined : json['gdpr_compliance'], + 'impersonation': json['impersonation'] == null ? undefined : json['impersonation'], + 'impersonationRequireReason': json['impersonation_require_reason'] == null ? undefined : json['impersonation_require_reason'], + 'defaultTokenDuration': json['default_token_duration'] == null ? undefined : json['default_token_duration'], + 'defaultTokenLength': json['default_token_length'] == null ? undefined : json['default_token_length'], + 'paginationDefaultPageSize': json['pagination_default_page_size'] == null ? undefined : json['pagination_default_page_size'], + 'paginationMaxPageSize': json['pagination_max_page_size'] == null ? undefined : json['pagination_max_page_size'], + 'flags': json['flags'] == null ? undefined : PatchedSettingsRequestFlagsFromJSON(json['flags']), + }; +} + +export function PatchedSettingsRequestToJSON(json: any): PatchedSettingsRequest { + return PatchedSettingsRequestToJSONTyped(json, false); +} + +export function PatchedSettingsRequestToJSONTyped(value?: PatchedSettingsRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'avatars': value['avatars'], + 'default_user_change_name': value['defaultUserChangeName'], + 'default_user_change_email': value['defaultUserChangeEmail'], + 'default_user_change_username': value['defaultUserChangeUsername'], + 'event_retention': value['eventRetention'], + 'reputation_lower_limit': value['reputationLowerLimit'], + 'reputation_upper_limit': value['reputationUpperLimit'], + 'footer_links': value['footerLinks'], + 'gdpr_compliance': value['gdprCompliance'], + 'impersonation': value['impersonation'], + 'impersonation_require_reason': value['impersonationRequireReason'], + 'default_token_duration': value['defaultTokenDuration'], + 'default_token_length': value['defaultTokenLength'], + 'pagination_default_page_size': value['paginationDefaultPageSize'], + 'pagination_max_page_size': value['paginationMaxPageSize'], + 'flags': PatchedSettingsRequestFlagsToJSON(value['flags']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedSettingsRequestFlags.ts b/packages/client-ts/src/models/PatchedSettingsRequestFlags.ts new file mode 100644 index 0000000000..f811fb2ff7 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSettingsRequestFlags.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PatchedSettingsRequestFlags + */ +export interface PatchedSettingsRequestFlags { + /** + * Configure if applications without any policy/group/user bindings should be accessible to any user. + * @type {boolean} + * @memberof PatchedSettingsRequestFlags + */ + coreDefaultAppAccess: boolean; + /** + * Include additional information in audit logs, may incur a performance penalty. + * @type {boolean} + * @memberof PatchedSettingsRequestFlags + */ + enterpriseAuditIncludeExpandedDiff: boolean; + /** + * Upon successful authentication, re-start authentication in other open tabs. + * @type {boolean} + * @memberof PatchedSettingsRequestFlags + */ + flowsContinuousLogin: boolean; + /** + * Refresh other tabs after successful authentication. + * @type {boolean} + * @memberof PatchedSettingsRequestFlags + */ + flowsRefreshOthers: boolean; +} + +/** + * Check if a given object implements the PatchedSettingsRequestFlags interface. + */ +export function instanceOfPatchedSettingsRequestFlags(value: object): value is PatchedSettingsRequestFlags { + if (!('coreDefaultAppAccess' in value) || value['coreDefaultAppAccess'] === undefined) return false; + if (!('enterpriseAuditIncludeExpandedDiff' in value) || value['enterpriseAuditIncludeExpandedDiff'] === undefined) return false; + if (!('flowsContinuousLogin' in value) || value['flowsContinuousLogin'] === undefined) return false; + if (!('flowsRefreshOthers' in value) || value['flowsRefreshOthers'] === undefined) return false; + return true; +} + +export function PatchedSettingsRequestFlagsFromJSON(json: any): PatchedSettingsRequestFlags { + return PatchedSettingsRequestFlagsFromJSONTyped(json, false); +} + +export function PatchedSettingsRequestFlagsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSettingsRequestFlags { + if (json == null) { + return json; + } + return { + + 'coreDefaultAppAccess': json['core_default_app_access'], + 'enterpriseAuditIncludeExpandedDiff': json['enterprise_audit_include_expanded_diff'], + 'flowsContinuousLogin': json['flows_continuous_login'], + 'flowsRefreshOthers': json['flows_refresh_others'], + }; +} + +export function PatchedSettingsRequestFlagsToJSON(json: any): PatchedSettingsRequestFlags { + return PatchedSettingsRequestFlagsToJSONTyped(json, false); +} + +export function PatchedSettingsRequestFlagsToJSONTyped(value?: PatchedSettingsRequestFlags | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'core_default_app_access': value['coreDefaultAppAccess'], + 'enterprise_audit_include_expanded_diff': value['enterpriseAuditIncludeExpandedDiff'], + 'flows_continuous_login': value['flowsContinuousLogin'], + 'flows_refresh_others': value['flowsRefreshOthers'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedSourceStageRequest.ts b/packages/client-ts/src/models/PatchedSourceStageRequest.ts new file mode 100644 index 0000000000..b51f7f1995 --- /dev/null +++ b/packages/client-ts/src/models/PatchedSourceStageRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SourceStage Serializer + * @export + * @interface PatchedSourceStageRequest + */ +export interface PatchedSourceStageRequest { + /** + * + * @type {string} + * @memberof PatchedSourceStageRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedSourceStageRequest + */ + source?: string; + /** + * Amount of time a user can take to return from the source to continue the flow (Format: hours=-1;minutes=-2;seconds=-3) + * @type {string} + * @memberof PatchedSourceStageRequest + */ + resumeTimeout?: string; +} + +/** + * Check if a given object implements the PatchedSourceStageRequest interface. + */ +export function instanceOfPatchedSourceStageRequest(value: object): value is PatchedSourceStageRequest { + return true; +} + +export function PatchedSourceStageRequestFromJSON(json: any): PatchedSourceStageRequest { + return PatchedSourceStageRequestFromJSONTyped(json, false); +} + +export function PatchedSourceStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSourceStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'source': json['source'] == null ? undefined : json['source'], + 'resumeTimeout': json['resume_timeout'] == null ? undefined : json['resume_timeout'], + }; +} + +export function PatchedSourceStageRequestToJSON(json: any): PatchedSourceStageRequest { + return PatchedSourceStageRequestToJSONTyped(json, false); +} + +export function PatchedSourceStageRequestToJSONTyped(value?: PatchedSourceStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'source': value['source'], + 'resume_timeout': value['resumeTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedStaticDeviceRequest.ts b/packages/client-ts/src/models/PatchedStaticDeviceRequest.ts new file mode 100644 index 0000000000..99af566a3b --- /dev/null +++ b/packages/client-ts/src/models/PatchedStaticDeviceRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for static authenticator devices + * @export + * @interface PatchedStaticDeviceRequest + */ +export interface PatchedStaticDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof PatchedStaticDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedStaticDeviceRequest interface. + */ +export function instanceOfPatchedStaticDeviceRequest(value: object): value is PatchedStaticDeviceRequest { + return true; +} + +export function PatchedStaticDeviceRequestFromJSON(json: any): PatchedStaticDeviceRequest { + return PatchedStaticDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedStaticDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStaticDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedStaticDeviceRequestToJSON(json: any): PatchedStaticDeviceRequest { + return PatchedStaticDeviceRequestToJSONTyped(json, false); +} + +export function PatchedStaticDeviceRequestToJSONTyped(value?: PatchedStaticDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedTOTPDeviceRequest.ts b/packages/client-ts/src/models/PatchedTOTPDeviceRequest.ts new file mode 100644 index 0000000000..6cfd34a972 --- /dev/null +++ b/packages/client-ts/src/models/PatchedTOTPDeviceRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for totp authenticator devices + * @export + * @interface PatchedTOTPDeviceRequest + */ +export interface PatchedTOTPDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof PatchedTOTPDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedTOTPDeviceRequest interface. + */ +export function instanceOfPatchedTOTPDeviceRequest(value: object): value is PatchedTOTPDeviceRequest { + return true; +} + +export function PatchedTOTPDeviceRequestFromJSON(json: any): PatchedTOTPDeviceRequest { + return PatchedTOTPDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedTOTPDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedTOTPDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedTOTPDeviceRequestToJSON(json: any): PatchedTOTPDeviceRequest { + return PatchedTOTPDeviceRequestToJSONTyped(json, false); +} + +export function PatchedTOTPDeviceRequestToJSONTyped(value?: PatchedTOTPDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedTelegramSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PatchedTelegramSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..2f21355080 --- /dev/null +++ b/packages/client-ts/src/models/PatchedTelegramSourcePropertyMappingRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * TelegramSourcePropertyMapping Serializer + * @export + * @interface PatchedTelegramSourcePropertyMappingRequest + */ +export interface PatchedTelegramSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PatchedTelegramSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedTelegramSourcePropertyMappingRequest + */ + name?: string; + /** + * + * @type {string} + * @memberof PatchedTelegramSourcePropertyMappingRequest + */ + expression?: string; +} + +/** + * Check if a given object implements the PatchedTelegramSourcePropertyMappingRequest interface. + */ +export function instanceOfPatchedTelegramSourcePropertyMappingRequest(value: object): value is PatchedTelegramSourcePropertyMappingRequest { + return true; +} + +export function PatchedTelegramSourcePropertyMappingRequestFromJSON(json: any): PatchedTelegramSourcePropertyMappingRequest { + return PatchedTelegramSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PatchedTelegramSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedTelegramSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'] == null ? undefined : json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function PatchedTelegramSourcePropertyMappingRequestToJSON(json: any): PatchedTelegramSourcePropertyMappingRequest { + return PatchedTelegramSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PatchedTelegramSourcePropertyMappingRequestToJSONTyped(value?: PatchedTelegramSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedTelegramSourceRequest.ts b/packages/client-ts/src/models/PatchedTelegramSourceRequest.ts new file mode 100644 index 0000000000..634bc89650 --- /dev/null +++ b/packages/client-ts/src/models/PatchedTelegramSourceRequest.ts @@ -0,0 +1,202 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; + +/** + * Source Serializer + * @export + * @interface PatchedTelegramSourceRequest + */ +export interface PatchedTelegramSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + name?: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + slug?: string; + /** + * + * @type {boolean} + * @memberof PatchedTelegramSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PatchedTelegramSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PatchedTelegramSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PatchedTelegramSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PatchedTelegramSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PatchedTelegramSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + icon?: string; + /** + * Telegram bot username + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + botUsername?: string; + /** + * Telegram bot token + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + botToken?: string; + /** + * Request access to send messages from your bot. + * @type {boolean} + * @memberof PatchedTelegramSourceRequest + */ + requestMessageAccess?: boolean; + /** + * Flow used before authentication. + * @type {string} + * @memberof PatchedTelegramSourceRequest + */ + preAuthenticationFlow?: string; +} + + + +/** + * Check if a given object implements the PatchedTelegramSourceRequest interface. + */ +export function instanceOfPatchedTelegramSourceRequest(value: object): value is PatchedTelegramSourceRequest { + return true; +} + +export function PatchedTelegramSourceRequestFromJSON(json: any): PatchedTelegramSourceRequest { + return PatchedTelegramSourceRequestFromJSONTyped(json, false); +} + +export function PatchedTelegramSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedTelegramSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'slug': json['slug'] == null ? undefined : json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'botUsername': json['bot_username'] == null ? undefined : json['bot_username'], + 'botToken': json['bot_token'] == null ? undefined : json['bot_token'], + 'requestMessageAccess': json['request_message_access'] == null ? undefined : json['request_message_access'], + 'preAuthenticationFlow': json['pre_authentication_flow'] == null ? undefined : json['pre_authentication_flow'], + }; +} + +export function PatchedTelegramSourceRequestToJSON(json: any): PatchedTelegramSourceRequest { + return PatchedTelegramSourceRequestToJSONTyped(json, false); +} + +export function PatchedTelegramSourceRequestToJSONTyped(value?: PatchedTelegramSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'bot_username': value['botUsername'], + 'bot_token': value['botToken'], + 'request_message_access': value['requestMessageAccess'], + 'pre_authentication_flow': value['preAuthenticationFlow'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedTenantRequest.ts b/packages/client-ts/src/models/PatchedTenantRequest.ts new file mode 100644 index 0000000000..aca425af45 --- /dev/null +++ b/packages/client-ts/src/models/PatchedTenantRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Tenant Serializer + * @export + * @interface PatchedTenantRequest + */ +export interface PatchedTenantRequest { + /** + * + * @type {string} + * @memberof PatchedTenantRequest + */ + schemaName?: string; + /** + * + * @type {string} + * @memberof PatchedTenantRequest + */ + name?: string; + /** + * + * @type {boolean} + * @memberof PatchedTenantRequest + */ + ready?: boolean; +} + +/** + * Check if a given object implements the PatchedTenantRequest interface. + */ +export function instanceOfPatchedTenantRequest(value: object): value is PatchedTenantRequest { + return true; +} + +export function PatchedTenantRequestFromJSON(json: any): PatchedTenantRequest { + return PatchedTenantRequestFromJSONTyped(json, false); +} + +export function PatchedTenantRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedTenantRequest { + if (json == null) { + return json; + } + return { + + 'schemaName': json['schema_name'] == null ? undefined : json['schema_name'], + 'name': json['name'] == null ? undefined : json['name'], + 'ready': json['ready'] == null ? undefined : json['ready'], + }; +} + +export function PatchedTenantRequestToJSON(json: any): PatchedTenantRequest { + return PatchedTenantRequestToJSONTyped(json, false); +} + +export function PatchedTenantRequestToJSONTyped(value?: PatchedTenantRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'schema_name': value['schemaName'], + 'name': value['name'], + 'ready': value['ready'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedTokenRequest.ts b/packages/client-ts/src/models/PatchedTokenRequest.ts new file mode 100644 index 0000000000..71cbe6da2a --- /dev/null +++ b/packages/client-ts/src/models/PatchedTokenRequest.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { IntentEnum } from './IntentEnum'; +import { + IntentEnumFromJSON, + IntentEnumFromJSONTyped, + IntentEnumToJSON, + IntentEnumToJSONTyped, +} from './IntentEnum'; + +/** + * Token Serializer + * @export + * @interface PatchedTokenRequest + */ +export interface PatchedTokenRequest { + /** + * 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. + * @type {string} + * @memberof PatchedTokenRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PatchedTokenRequest + */ + identifier?: string; + /** + * + * @type {IntentEnum} + * @memberof PatchedTokenRequest + */ + intent?: IntentEnum; + /** + * + * @type {number} + * @memberof PatchedTokenRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedTokenRequest + */ + description?: string; + /** + * + * @type {Date} + * @memberof PatchedTokenRequest + */ + expires?: Date | null; + /** + * + * @type {boolean} + * @memberof PatchedTokenRequest + */ + expiring?: boolean; +} + + + +/** + * Check if a given object implements the PatchedTokenRequest interface. + */ +export function instanceOfPatchedTokenRequest(value: object): value is PatchedTokenRequest { + return true; +} + +export function PatchedTokenRequestFromJSON(json: any): PatchedTokenRequest { + return PatchedTokenRequestFromJSONTyped(json, false); +} + +export function PatchedTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedTokenRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + 'intent': json['intent'] == null ? undefined : IntentEnumFromJSON(json['intent']), + 'user': json['user'] == null ? undefined : json['user'], + 'description': json['description'] == null ? undefined : json['description'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + }; +} + +export function PatchedTokenRequestToJSON(json: any): PatchedTokenRequest { + return PatchedTokenRequestToJSONTyped(json, false); +} + +export function PatchedTokenRequestToJSONTyped(value?: PatchedTokenRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'identifier': value['identifier'], + 'intent': IntentEnumToJSON(value['intent']), + 'user': value['user'], + 'description': value['description'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'expiring': value['expiring'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUniquePasswordPolicyRequest.ts b/packages/client-ts/src/models/PatchedUniquePasswordPolicyRequest.ts new file mode 100644 index 0000000000..5a9fffc043 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUniquePasswordPolicyRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Uniqueness Policy Serializer + * @export + * @interface PatchedUniquePasswordPolicyRequest + */ +export interface PatchedUniquePasswordPolicyRequest { + /** + * + * @type {string} + * @memberof PatchedUniquePasswordPolicyRequest + */ + name?: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof PatchedUniquePasswordPolicyRequest + */ + executionLogging?: boolean; + /** + * Field key to check, field keys defined in Prompt stages are available. + * @type {string} + * @memberof PatchedUniquePasswordPolicyRequest + */ + passwordField?: string; + /** + * Number of passwords to check against. + * @type {number} + * @memberof PatchedUniquePasswordPolicyRequest + */ + numHistoricalPasswords?: number; +} + +/** + * Check if a given object implements the PatchedUniquePasswordPolicyRequest interface. + */ +export function instanceOfPatchedUniquePasswordPolicyRequest(value: object): value is PatchedUniquePasswordPolicyRequest { + return true; +} + +export function PatchedUniquePasswordPolicyRequestFromJSON(json: any): PatchedUniquePasswordPolicyRequest { + return PatchedUniquePasswordPolicyRequestFromJSONTyped(json, false); +} + +export function PatchedUniquePasswordPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUniquePasswordPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'passwordField': json['password_field'] == null ? undefined : json['password_field'], + 'numHistoricalPasswords': json['num_historical_passwords'] == null ? undefined : json['num_historical_passwords'], + }; +} + +export function PatchedUniquePasswordPolicyRequestToJSON(json: any): PatchedUniquePasswordPolicyRequest { + return PatchedUniquePasswordPolicyRequestToJSONTyped(json, false); +} + +export function PatchedUniquePasswordPolicyRequestToJSONTyped(value?: PatchedUniquePasswordPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'password_field': value['passwordField'], + 'num_historical_passwords': value['numHistoricalPasswords'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserDeleteStageRequest.ts b/packages/client-ts/src/models/PatchedUserDeleteStageRequest.ts new file mode 100644 index 0000000000..16fb2140c0 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserDeleteStageRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * UserDeleteStage Serializer + * @export + * @interface PatchedUserDeleteStageRequest + */ +export interface PatchedUserDeleteStageRequest { + /** + * + * @type {string} + * @memberof PatchedUserDeleteStageRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedUserDeleteStageRequest interface. + */ +export function instanceOfPatchedUserDeleteStageRequest(value: object): value is PatchedUserDeleteStageRequest { + return true; +} + +export function PatchedUserDeleteStageRequestFromJSON(json: any): PatchedUserDeleteStageRequest { + return PatchedUserDeleteStageRequestFromJSONTyped(json, false); +} + +export function PatchedUserDeleteStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserDeleteStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedUserDeleteStageRequestToJSON(json: any): PatchedUserDeleteStageRequest { + return PatchedUserDeleteStageRequestToJSONTyped(json, false); +} + +export function PatchedUserDeleteStageRequestToJSONTyped(value?: PatchedUserDeleteStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserKerberosSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserKerberosSourceConnectionRequest.ts new file mode 100644 index 0000000000..8f6589c1e8 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserKerberosSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserKerberosSourceConnectionRequest + */ +export interface PatchedUserKerberosSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserKerberosSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserKerberosSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserKerberosSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedUserKerberosSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserKerberosSourceConnectionRequest(value: object): value is PatchedUserKerberosSourceConnectionRequest { + return true; +} + +export function PatchedUserKerberosSourceConnectionRequestFromJSON(json: any): PatchedUserKerberosSourceConnectionRequest { + return PatchedUserKerberosSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserKerberosSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserKerberosSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedUserKerberosSourceConnectionRequestToJSON(json: any): PatchedUserKerberosSourceConnectionRequest { + return PatchedUserKerberosSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserKerberosSourceConnectionRequestToJSONTyped(value?: PatchedUserKerberosSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserLDAPSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserLDAPSourceConnectionRequest.ts new file mode 100644 index 0000000000..4821e69e89 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserLDAPSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserLDAPSourceConnectionRequest + */ +export interface PatchedUserLDAPSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserLDAPSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserLDAPSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserLDAPSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedUserLDAPSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserLDAPSourceConnectionRequest(value: object): value is PatchedUserLDAPSourceConnectionRequest { + return true; +} + +export function PatchedUserLDAPSourceConnectionRequestFromJSON(json: any): PatchedUserLDAPSourceConnectionRequest { + return PatchedUserLDAPSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserLDAPSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserLDAPSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedUserLDAPSourceConnectionRequestToJSON(json: any): PatchedUserLDAPSourceConnectionRequest { + return PatchedUserLDAPSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserLDAPSourceConnectionRequestToJSONTyped(value?: PatchedUserLDAPSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserLoginStageRequest.ts b/packages/client-ts/src/models/PatchedUserLoginStageRequest.ts new file mode 100644 index 0000000000..e958ab5b67 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserLoginStageRequest.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GeoipBindingEnum } from './GeoipBindingEnum'; +import { + GeoipBindingEnumFromJSON, + GeoipBindingEnumFromJSONTyped, + GeoipBindingEnumToJSON, + GeoipBindingEnumToJSONTyped, +} from './GeoipBindingEnum'; +import type { NetworkBindingEnum } from './NetworkBindingEnum'; +import { + NetworkBindingEnumFromJSON, + NetworkBindingEnumFromJSONTyped, + NetworkBindingEnumToJSON, + NetworkBindingEnumToJSONTyped, +} from './NetworkBindingEnum'; + +/** + * UserLoginStage Serializer + * @export + * @interface PatchedUserLoginStageRequest + */ +export interface PatchedUserLoginStageRequest { + /** + * + * @type {string} + * @memberof PatchedUserLoginStageRequest + */ + name?: 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) + * @type {string} + * @memberof PatchedUserLoginStageRequest + */ + sessionDuration?: string; + /** + * Terminate all other sessions of the user logging in. + * @type {boolean} + * @memberof PatchedUserLoginStageRequest + */ + terminateOtherSessions?: boolean; + /** + * 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) + * @type {string} + * @memberof PatchedUserLoginStageRequest + */ + rememberMeOffset?: string; + /** + * Bind sessions created by this stage to the configured network + * @type {NetworkBindingEnum} + * @memberof PatchedUserLoginStageRequest + */ + networkBinding?: NetworkBindingEnum; + /** + * Bind sessions created by this stage to the configured GeoIP location + * @type {GeoipBindingEnum} + * @memberof PatchedUserLoginStageRequest + */ + geoipBinding?: GeoipBindingEnum; + /** + * When set to a non-zero value, authentik will save a cookie with a longer expiry,to remember the device the user is logging in from. (Format: hours=-1;minutes=-2;seconds=-3) + * @type {string} + * @memberof PatchedUserLoginStageRequest + */ + rememberDevice?: string; +} + + + +/** + * Check if a given object implements the PatchedUserLoginStageRequest interface. + */ +export function instanceOfPatchedUserLoginStageRequest(value: object): value is PatchedUserLoginStageRequest { + return true; +} + +export function PatchedUserLoginStageRequestFromJSON(json: any): PatchedUserLoginStageRequest { + return PatchedUserLoginStageRequestFromJSONTyped(json, false); +} + +export function PatchedUserLoginStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserLoginStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'sessionDuration': json['session_duration'] == null ? undefined : json['session_duration'], + 'terminateOtherSessions': json['terminate_other_sessions'] == null ? undefined : json['terminate_other_sessions'], + 'rememberMeOffset': json['remember_me_offset'] == null ? undefined : json['remember_me_offset'], + 'networkBinding': json['network_binding'] == null ? undefined : NetworkBindingEnumFromJSON(json['network_binding']), + 'geoipBinding': json['geoip_binding'] == null ? undefined : GeoipBindingEnumFromJSON(json['geoip_binding']), + 'rememberDevice': json['remember_device'] == null ? undefined : json['remember_device'], + }; +} + +export function PatchedUserLoginStageRequestToJSON(json: any): PatchedUserLoginStageRequest { + return PatchedUserLoginStageRequestToJSONTyped(json, false); +} + +export function PatchedUserLoginStageRequestToJSONTyped(value?: PatchedUserLoginStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'session_duration': value['sessionDuration'], + 'terminate_other_sessions': value['terminateOtherSessions'], + 'remember_me_offset': value['rememberMeOffset'], + 'network_binding': NetworkBindingEnumToJSON(value['networkBinding']), + 'geoip_binding': GeoipBindingEnumToJSON(value['geoipBinding']), + 'remember_device': value['rememberDevice'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserLogoutStageRequest.ts b/packages/client-ts/src/models/PatchedUserLogoutStageRequest.ts new file mode 100644 index 0000000000..c72b172953 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserLogoutStageRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * UserLogoutStage Serializer + * @export + * @interface PatchedUserLogoutStageRequest + */ +export interface PatchedUserLogoutStageRequest { + /** + * + * @type {string} + * @memberof PatchedUserLogoutStageRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedUserLogoutStageRequest interface. + */ +export function instanceOfPatchedUserLogoutStageRequest(value: object): value is PatchedUserLogoutStageRequest { + return true; +} + +export function PatchedUserLogoutStageRequestFromJSON(json: any): PatchedUserLogoutStageRequest { + return PatchedUserLogoutStageRequestFromJSONTyped(json, false); +} + +export function PatchedUserLogoutStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserLogoutStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedUserLogoutStageRequestToJSON(json: any): PatchedUserLogoutStageRequest { + return PatchedUserLogoutStageRequestToJSONTyped(json, false); +} + +export function PatchedUserLogoutStageRequestToJSONTyped(value?: PatchedUserLogoutStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserOAuthSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserOAuthSourceConnectionRequest.ts new file mode 100644 index 0000000000..6e841436bf --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserOAuthSourceConnectionRequest.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserOAuthSourceConnectionRequest + */ +export interface PatchedUserOAuthSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserOAuthSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserOAuthSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserOAuthSourceConnectionRequest + */ + identifier?: string; + /** + * + * @type {string} + * @memberof PatchedUserOAuthSourceConnectionRequest + */ + accessToken?: string | null; + /** + * + * @type {Date} + * @memberof PatchedUserOAuthSourceConnectionRequest + */ + expires?: Date; +} + +/** + * Check if a given object implements the PatchedUserOAuthSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserOAuthSourceConnectionRequest(value: object): value is PatchedUserOAuthSourceConnectionRequest { + return true; +} + +export function PatchedUserOAuthSourceConnectionRequestFromJSON(json: any): PatchedUserOAuthSourceConnectionRequest { + return PatchedUserOAuthSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserOAuthSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserOAuthSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + 'accessToken': json['access_token'] == null ? undefined : json['access_token'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function PatchedUserOAuthSourceConnectionRequestToJSON(json: any): PatchedUserOAuthSourceConnectionRequest { + return PatchedUserOAuthSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserOAuthSourceConnectionRequestToJSONTyped(value?: PatchedUserOAuthSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + 'access_token': value['accessToken'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserPlexSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserPlexSourceConnectionRequest.ts new file mode 100644 index 0000000000..080e58621c --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserPlexSourceConnectionRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserPlexSourceConnectionRequest + */ +export interface PatchedUserPlexSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserPlexSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserPlexSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserPlexSourceConnectionRequest + */ + identifier?: string; + /** + * + * @type {string} + * @memberof PatchedUserPlexSourceConnectionRequest + */ + plexToken?: string; +} + +/** + * Check if a given object implements the PatchedUserPlexSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserPlexSourceConnectionRequest(value: object): value is PatchedUserPlexSourceConnectionRequest { + return true; +} + +export function PatchedUserPlexSourceConnectionRequestFromJSON(json: any): PatchedUserPlexSourceConnectionRequest { + return PatchedUserPlexSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserPlexSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserPlexSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + 'plexToken': json['plex_token'] == null ? undefined : json['plex_token'], + }; +} + +export function PatchedUserPlexSourceConnectionRequestToJSON(json: any): PatchedUserPlexSourceConnectionRequest { + return PatchedUserPlexSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserPlexSourceConnectionRequestToJSONTyped(value?: PatchedUserPlexSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + 'plex_token': value['plexToken'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserRequest.ts b/packages/client-ts/src/models/PatchedUserRequest.ts new file mode 100644 index 0000000000..ae70ded9ba --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserRequest.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; + +/** + * User Serializer + * @export + * @interface PatchedUserRequest + */ +export interface PatchedUserRequest { + /** + * + * @type {string} + * @memberof PatchedUserRequest + */ + username?: string; + /** + * User's display name. + * @type {string} + * @memberof PatchedUserRequest + */ + name?: string; + /** + * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + * @type {boolean} + * @memberof PatchedUserRequest + */ + isActive?: boolean; + /** + * + * @type {Date} + * @memberof PatchedUserRequest + */ + lastLogin?: Date | null; + /** + * + * @type {Array} + * @memberof PatchedUserRequest + */ + groups?: Array; + /** + * + * @type {Array} + * @memberof PatchedUserRequest + */ + roles?: Array; + /** + * + * @type {string} + * @memberof PatchedUserRequest + */ + email?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PatchedUserRequest + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof PatchedUserRequest + */ + path?: string; + /** + * + * @type {UserTypeEnum} + * @memberof PatchedUserRequest + */ + type?: UserTypeEnum; +} + + + +/** + * Check if a given object implements the PatchedUserRequest interface. + */ +export function instanceOfPatchedUserRequest(value: object): value is PatchedUserRequest { + return true; +} + +export function PatchedUserRequestFromJSON(json: any): PatchedUserRequest { + return PatchedUserRequestFromJSONTyped(json, false); +} + +export function PatchedUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserRequest { + if (json == null) { + return json; + } + return { + + 'username': json['username'] == null ? undefined : json['username'], + 'name': json['name'] == null ? undefined : json['name'], + 'isActive': json['is_active'] == null ? undefined : json['is_active'], + 'lastLogin': json['last_login'] == null ? undefined : (new Date(json['last_login'])), + 'groups': json['groups'] == null ? undefined : json['groups'], + 'roles': json['roles'] == null ? undefined : json['roles'], + 'email': json['email'] == null ? undefined : json['email'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'path': json['path'] == null ? undefined : json['path'], + 'type': json['type'] == null ? undefined : UserTypeEnumFromJSON(json['type']), + }; +} + +export function PatchedUserRequestToJSON(json: any): PatchedUserRequest { + return PatchedUserRequestToJSONTyped(json, false); +} + +export function PatchedUserRequestToJSONTyped(value?: PatchedUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'name': value['name'], + 'is_active': value['isActive'], + 'last_login': value['lastLogin'] == null ? value['lastLogin'] : value['lastLogin'].toISOString(), + 'groups': value['groups'], + 'roles': value['roles'], + 'email': value['email'], + 'attributes': value['attributes'], + 'path': value['path'], + 'type': UserTypeEnumToJSON(value['type']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserSAMLSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserSAMLSourceConnectionRequest.ts new file mode 100644 index 0000000000..e7a97c6d64 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserSAMLSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserSAMLSourceConnectionRequest + */ +export interface PatchedUserSAMLSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserSAMLSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserSAMLSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserSAMLSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedUserSAMLSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserSAMLSourceConnectionRequest(value: object): value is PatchedUserSAMLSourceConnectionRequest { + return true; +} + +export function PatchedUserSAMLSourceConnectionRequestFromJSON(json: any): PatchedUserSAMLSourceConnectionRequest { + return PatchedUserSAMLSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserSAMLSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSAMLSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedUserSAMLSourceConnectionRequestToJSON(json: any): PatchedUserSAMLSourceConnectionRequest { + return PatchedUserSAMLSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserSAMLSourceConnectionRequestToJSONTyped(value?: PatchedUserSAMLSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserSourceConnectionRequest.ts new file mode 100644 index 0000000000..9122a36fed --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserSourceConnectionRequest + */ +export interface PatchedUserSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedUserSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserSourceConnectionRequest(value: object): value is PatchedUserSourceConnectionRequest { + return true; +} + +export function PatchedUserSourceConnectionRequestFromJSON(json: any): PatchedUserSourceConnectionRequest { + return PatchedUserSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedUserSourceConnectionRequestToJSON(json: any): PatchedUserSourceConnectionRequest { + return PatchedUserSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserSourceConnectionRequestToJSONTyped(value?: PatchedUserSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserTelegramSourceConnectionRequest.ts b/packages/client-ts/src/models/PatchedUserTelegramSourceConnectionRequest.ts new file mode 100644 index 0000000000..cba5c9f5ad --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserTelegramSourceConnectionRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface PatchedUserTelegramSourceConnectionRequest + */ +export interface PatchedUserTelegramSourceConnectionRequest { + /** + * + * @type {number} + * @memberof PatchedUserTelegramSourceConnectionRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof PatchedUserTelegramSourceConnectionRequest + */ + source?: string; + /** + * + * @type {string} + * @memberof PatchedUserTelegramSourceConnectionRequest + */ + identifier?: string; +} + +/** + * Check if a given object implements the PatchedUserTelegramSourceConnectionRequest interface. + */ +export function instanceOfPatchedUserTelegramSourceConnectionRequest(value: object): value is PatchedUserTelegramSourceConnectionRequest { + return true; +} + +export function PatchedUserTelegramSourceConnectionRequestFromJSON(json: any): PatchedUserTelegramSourceConnectionRequest { + return PatchedUserTelegramSourceConnectionRequestFromJSONTyped(json, false); +} + +export function PatchedUserTelegramSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserTelegramSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'source': json['source'] == null ? undefined : json['source'], + 'identifier': json['identifier'] == null ? undefined : json['identifier'], + }; +} + +export function PatchedUserTelegramSourceConnectionRequestToJSON(json: any): PatchedUserTelegramSourceConnectionRequest { + return PatchedUserTelegramSourceConnectionRequestToJSONTyped(json, false); +} + +export function PatchedUserTelegramSourceConnectionRequestToJSONTyped(value?: PatchedUserTelegramSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedUserWriteStageRequest.ts b/packages/client-ts/src/models/PatchedUserWriteStageRequest.ts new file mode 100644 index 0000000000..7f372658d2 --- /dev/null +++ b/packages/client-ts/src/models/PatchedUserWriteStageRequest.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; +import type { UserCreationModeEnum } from './UserCreationModeEnum'; +import { + UserCreationModeEnumFromJSON, + UserCreationModeEnumFromJSONTyped, + UserCreationModeEnumToJSON, + UserCreationModeEnumToJSONTyped, +} from './UserCreationModeEnum'; + +/** + * UserWriteStage Serializer + * @export + * @interface PatchedUserWriteStageRequest + */ +export interface PatchedUserWriteStageRequest { + /** + * + * @type {string} + * @memberof PatchedUserWriteStageRequest + */ + name?: string; + /** + * + * @type {UserCreationModeEnum} + * @memberof PatchedUserWriteStageRequest + */ + userCreationMode?: UserCreationModeEnum; + /** + * When set, newly created users are inactive and cannot login. + * @type {boolean} + * @memberof PatchedUserWriteStageRequest + */ + createUsersAsInactive?: boolean; + /** + * Optionally add newly created users to this group. + * @type {string} + * @memberof PatchedUserWriteStageRequest + */ + createUsersGroup?: string | null; + /** + * + * @type {UserTypeEnum} + * @memberof PatchedUserWriteStageRequest + */ + userType?: UserTypeEnum; + /** + * + * @type {string} + * @memberof PatchedUserWriteStageRequest + */ + userPathTemplate?: string; +} + + + +/** + * Check if a given object implements the PatchedUserWriteStageRequest interface. + */ +export function instanceOfPatchedUserWriteStageRequest(value: object): value is PatchedUserWriteStageRequest { + return true; +} + +export function PatchedUserWriteStageRequestFromJSON(json: any): PatchedUserWriteStageRequest { + return PatchedUserWriteStageRequestFromJSONTyped(json, false); +} + +export function PatchedUserWriteStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserWriteStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'userCreationMode': json['user_creation_mode'] == null ? undefined : UserCreationModeEnumFromJSON(json['user_creation_mode']), + 'createUsersAsInactive': json['create_users_as_inactive'] == null ? undefined : json['create_users_as_inactive'], + 'createUsersGroup': json['create_users_group'] == null ? undefined : json['create_users_group'], + 'userType': json['user_type'] == null ? undefined : UserTypeEnumFromJSON(json['user_type']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + }; +} + +export function PatchedUserWriteStageRequestToJSON(json: any): PatchedUserWriteStageRequest { + return PatchedUserWriteStageRequestToJSONTyped(json, false); +} + +export function PatchedUserWriteStageRequestToJSONTyped(value?: PatchedUserWriteStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'user_creation_mode': UserCreationModeEnumToJSON(value['userCreationMode']), + 'create_users_as_inactive': value['createUsersAsInactive'], + 'create_users_group': value['createUsersGroup'], + 'user_type': UserTypeEnumToJSON(value['userType']), + 'user_path_template': value['userPathTemplate'], + }; +} + diff --git a/packages/client-ts/src/models/PatchedWSFederationProviderRequest.ts b/packages/client-ts/src/models/PatchedWSFederationProviderRequest.ts new file mode 100644 index 0000000000..227ea90d30 --- /dev/null +++ b/packages/client-ts/src/models/PatchedWSFederationProviderRequest.ts @@ -0,0 +1,233 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; + +/** + * WSFederationProvider Serializer + * @export + * @interface PatchedWSFederationProviderRequest + */ +export interface PatchedWSFederationProviderRequest { + /** + * + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + name?: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + authorizationFlow?: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + invalidationFlow?: string; + /** + * + * @type {Array} + * @memberof PatchedWSFederationProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + replyUrl?: string; + /** + * + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + wtrealm?: string; + /** + * Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + assertionValidNotBefore?: string; + /** + * Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + assertionValidNotOnOrAfter?: string; + /** + * Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + sessionValidNotOnOrAfter?: string; + /** + * Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + nameIdMapping?: string | null; + /** + * Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate. + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + authnContextClassRefMapping?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof PatchedWSFederationProviderRequest + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof PatchedWSFederationProviderRequest + */ + signatureAlgorithm?: SignatureAlgorithmEnum; + /** + * Keypair used to sign outgoing Responses going to the Service Provider. + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + signingKp?: string | null; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof PatchedWSFederationProviderRequest + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof PatchedWSFederationProviderRequest + */ + signAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof PatchedWSFederationProviderRequest + */ + signLogoutRequest?: boolean; + /** + * + * @type {SAMLNameIDPolicyEnum} + * @memberof PatchedWSFederationProviderRequest + */ + defaultNameIdPolicy?: SAMLNameIDPolicyEnum; +} + + + +/** + * Check if a given object implements the PatchedWSFederationProviderRequest interface. + */ +export function instanceOfPatchedWSFederationProviderRequest(value: object): value is PatchedWSFederationProviderRequest { + return true; +} + +export function PatchedWSFederationProviderRequestFromJSON(json: any): PatchedWSFederationProviderRequest { + return PatchedWSFederationProviderRequestFromJSONTyped(json, false); +} + +export function PatchedWSFederationProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedWSFederationProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'] == null ? undefined : json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'] == null ? undefined : json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'replyUrl': json['reply_url'] == null ? undefined : json['reply_url'], + 'wtrealm': json['wtrealm'] == null ? undefined : json['wtrealm'], + 'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'], + 'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'], + 'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'], + 'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'], + 'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'], + 'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'], + 'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['default_name_id_policy']), + }; +} + +export function PatchedWSFederationProviderRequestToJSON(json: any): PatchedWSFederationProviderRequest { + return PatchedWSFederationProviderRequestToJSONTyped(json, false); +} + +export function PatchedWSFederationProviderRequestToJSONTyped(value?: PatchedWSFederationProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'reply_url': value['replyUrl'], + 'wtrealm': value['wtrealm'], + 'assertion_valid_not_before': value['assertionValidNotBefore'], + 'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'], + 'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'], + 'name_id_mapping': value['nameIdMapping'], + 'authn_context_class_ref_mapping': value['authnContextClassRefMapping'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'signing_kp': value['signingKp'], + 'encryption_kp': value['encryptionKp'], + 'sign_assertion': value['signAssertion'], + 'sign_logout_request': value['signLogoutRequest'], + 'default_name_id_policy': SAMLNameIDPolicyEnumToJSON(value['defaultNameIdPolicy']), + }; +} + diff --git a/packages/client-ts/src/models/PatchedWebAuthnDeviceRequest.ts b/packages/client-ts/src/models/PatchedWebAuthnDeviceRequest.ts new file mode 100644 index 0000000000..9350c10ccb --- /dev/null +++ b/packages/client-ts/src/models/PatchedWebAuthnDeviceRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for WebAuthn authenticator devices + * @export + * @interface PatchedWebAuthnDeviceRequest + */ +export interface PatchedWebAuthnDeviceRequest { + /** + * + * @type {string} + * @memberof PatchedWebAuthnDeviceRequest + */ + name?: string; +} + +/** + * Check if a given object implements the PatchedWebAuthnDeviceRequest interface. + */ +export function instanceOfPatchedWebAuthnDeviceRequest(value: object): value is PatchedWebAuthnDeviceRequest { + return true; +} + +export function PatchedWebAuthnDeviceRequestFromJSON(json: any): PatchedWebAuthnDeviceRequest { + return PatchedWebAuthnDeviceRequestFromJSONTyped(json, false); +} + +export function PatchedWebAuthnDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedWebAuthnDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function PatchedWebAuthnDeviceRequestToJSON(json: any): PatchedWebAuthnDeviceRequest { + return PatchedWebAuthnDeviceRequestToJSONTyped(json, false); +} + +export function PatchedWebAuthnDeviceRequestToJSONTyped(value?: PatchedWebAuthnDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/Permission.ts b/packages/client-ts/src/models/Permission.ts new file mode 100644 index 0000000000..8496ffb4aa --- /dev/null +++ b/packages/client-ts/src/models/Permission.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Global permission + * @export + * @interface Permission + */ +export interface Permission { + /** + * + * @type {number} + * @memberof Permission + */ + readonly id: number; + /** + * + * @type {string} + * @memberof Permission + */ + name: string; + /** + * + * @type {string} + * @memberof Permission + */ + codename: string; + /** + * + * @type {string} + * @memberof Permission + */ + readonly model: string; + /** + * + * @type {string} + * @memberof Permission + */ + readonly appLabel: string; + /** + * Human-readable app label + * @type {string} + * @memberof Permission + */ + readonly appLabelVerbose: string; + /** + * Human-readable model name + * @type {string} + * @memberof Permission + */ + readonly modelVerbose: string; +} + +/** + * Check if a given object implements the Permission interface. + */ +export function instanceOfPermission(value: object): value is Permission { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('codename' in value) || value['codename'] === undefined) return false; + if (!('model' in value) || value['model'] === undefined) return false; + if (!('appLabel' in value) || value['appLabel'] === undefined) return false; + if (!('appLabelVerbose' in value) || value['appLabelVerbose'] === undefined) return false; + if (!('modelVerbose' in value) || value['modelVerbose'] === undefined) return false; + return true; +} + +export function PermissionFromJSON(json: any): Permission { + return PermissionFromJSONTyped(json, false); +} + +export function PermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Permission { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + 'codename': json['codename'], + 'model': json['model'], + 'appLabel': json['app_label'], + 'appLabelVerbose': json['app_label_verbose'], + 'modelVerbose': json['model_verbose'], + }; +} + +export function PermissionToJSON(json: any): Permission { + return PermissionToJSONTyped(json, false); +} + +export function PermissionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'codename': value['codename'], + }; +} + diff --git a/packages/client-ts/src/models/PermissionAssignRequest.ts b/packages/client-ts/src/models/PermissionAssignRequest.ts new file mode 100644 index 0000000000..ffb5b64c86 --- /dev/null +++ b/packages/client-ts/src/models/PermissionAssignRequest.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ModelEnum } from './ModelEnum'; +import { + ModelEnumFromJSON, + ModelEnumFromJSONTyped, + ModelEnumToJSON, + ModelEnumToJSONTyped, +} from './ModelEnum'; + +/** + * Request to assign a new permission + * @export + * @interface PermissionAssignRequest + */ +export interface PermissionAssignRequest { + /** + * + * @type {Array} + * @memberof PermissionAssignRequest + */ + permissions: Array; + /** + * + * @type {ModelEnum} + * @memberof PermissionAssignRequest + */ + model?: ModelEnum; + /** + * + * @type {string} + * @memberof PermissionAssignRequest + */ + objectPk?: string; +} + + + +/** + * Check if a given object implements the PermissionAssignRequest interface. + */ +export function instanceOfPermissionAssignRequest(value: object): value is PermissionAssignRequest { + if (!('permissions' in value) || value['permissions'] === undefined) return false; + return true; +} + +export function PermissionAssignRequestFromJSON(json: any): PermissionAssignRequest { + return PermissionAssignRequestFromJSONTyped(json, false); +} + +export function PermissionAssignRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionAssignRequest { + if (json == null) { + return json; + } + return { + + 'permissions': json['permissions'], + 'model': json['model'] == null ? undefined : ModelEnumFromJSON(json['model']), + 'objectPk': json['object_pk'] == null ? undefined : json['object_pk'], + }; +} + +export function PermissionAssignRequestToJSON(json: any): PermissionAssignRequest { + return PermissionAssignRequestToJSONTyped(json, false); +} + +export function PermissionAssignRequestToJSONTyped(value?: PermissionAssignRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'permissions': value['permissions'], + 'model': ModelEnumToJSON(value['model']), + 'object_pk': value['objectPk'], + }; +} + diff --git a/packages/client-ts/src/models/PermissionAssignResult.ts b/packages/client-ts/src/models/PermissionAssignResult.ts new file mode 100644 index 0000000000..c706d85cf9 --- /dev/null +++ b/packages/client-ts/src/models/PermissionAssignResult.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Result from assigning permissions to a user/role + * @export + * @interface PermissionAssignResult + */ +export interface PermissionAssignResult { + /** + * + * @type {string} + * @memberof PermissionAssignResult + */ + id: string; +} + +/** + * Check if a given object implements the PermissionAssignResult interface. + */ +export function instanceOfPermissionAssignResult(value: object): value is PermissionAssignResult { + if (!('id' in value) || value['id'] === undefined) return false; + return true; +} + +export function PermissionAssignResultFromJSON(json: any): PermissionAssignResult { + return PermissionAssignResultFromJSONTyped(json, false); +} + +export function PermissionAssignResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionAssignResult { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + }; +} + +export function PermissionAssignResultToJSON(json: any): PermissionAssignResult { + return PermissionAssignResultToJSONTyped(json, false); +} + +export function PermissionAssignResultToJSONTyped(value?: PermissionAssignResult | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + }; +} + diff --git a/packages/client-ts/src/models/PlexAuthenticationChallenge.ts b/packages/client-ts/src/models/PlexAuthenticationChallenge.ts new file mode 100644 index 0000000000..c9eab1a7a8 --- /dev/null +++ b/packages/client-ts/src/models/PlexAuthenticationChallenge.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge shown to the user in identification stage + * @export + * @interface PlexAuthenticationChallenge + */ +export interface PlexAuthenticationChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof PlexAuthenticationChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof PlexAuthenticationChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof PlexAuthenticationChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof PlexAuthenticationChallenge + */ + clientId: string; + /** + * + * @type {string} + * @memberof PlexAuthenticationChallenge + */ + slug: string; +} + +/** + * Check if a given object implements the PlexAuthenticationChallenge interface. + */ +export function instanceOfPlexAuthenticationChallenge(value: object): value is PlexAuthenticationChallenge { + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + return true; +} + +export function PlexAuthenticationChallengeFromJSON(json: any): PlexAuthenticationChallenge { + return PlexAuthenticationChallengeFromJSONTyped(json, false); +} + +export function PlexAuthenticationChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexAuthenticationChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'clientId': json['client_id'], + 'slug': json['slug'], + }; +} + +export function PlexAuthenticationChallengeToJSON(json: any): PlexAuthenticationChallenge { + return PlexAuthenticationChallengeToJSONTyped(json, false); +} + +export function PlexAuthenticationChallengeToJSONTyped(value?: PlexAuthenticationChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'client_id': value['clientId'], + 'slug': value['slug'], + }; +} + diff --git a/packages/client-ts/src/models/PlexAuthenticationChallengeResponseRequest.ts b/packages/client-ts/src/models/PlexAuthenticationChallengeResponseRequest.ts new file mode 100644 index 0000000000..4f947c6ae7 --- /dev/null +++ b/packages/client-ts/src/models/PlexAuthenticationChallengeResponseRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Pseudo class for plex response + * @export + * @interface PlexAuthenticationChallengeResponseRequest + */ +export interface PlexAuthenticationChallengeResponseRequest { + /** + * + * @type {string} + * @memberof PlexAuthenticationChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the PlexAuthenticationChallengeResponseRequest interface. + */ +export function instanceOfPlexAuthenticationChallengeResponseRequest(value: object): value is PlexAuthenticationChallengeResponseRequest { + return true; +} + +export function PlexAuthenticationChallengeResponseRequestFromJSON(json: any): PlexAuthenticationChallengeResponseRequest { + return PlexAuthenticationChallengeResponseRequestFromJSONTyped(json, false); +} + +export function PlexAuthenticationChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexAuthenticationChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function PlexAuthenticationChallengeResponseRequestToJSON(json: any): PlexAuthenticationChallengeResponseRequest { + return PlexAuthenticationChallengeResponseRequestToJSONTyped(json, false); +} + +export function PlexAuthenticationChallengeResponseRequestToJSONTyped(value?: PlexAuthenticationChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/PlexSource.ts b/packages/client-ts/src/models/PlexSource.ts new file mode 100644 index 0000000000..0432f37310 --- /dev/null +++ b/packages/client-ts/src/models/PlexSource.ts @@ -0,0 +1,291 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * Plex Source Serializer + * @export + * @interface PlexSource + */ +export interface PlexSource { + /** + * + * @type {string} + * @memberof PlexSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof PlexSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PlexSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof PlexSource + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PlexSource + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PlexSource + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PlexSource + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PlexSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PlexSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof PlexSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PlexSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PlexSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PlexSource + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof PlexSource + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PlexSource + */ + 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. + * @type {string} + * @memberof PlexSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof PlexSource + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PlexSource + */ + icon?: string; + /** + * + * @type {string} + * @memberof PlexSource + */ + readonly iconUrl: string; + /** + * + * @type {ThemedUrls} + * @memberof PlexSource + */ + readonly iconThemedUrls: ThemedUrls | null; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof PlexSource + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Client identifier used to talk to Plex. + * @type {string} + * @memberof PlexSource + */ + clientId?: string; + /** + * Which servers a user has to be a member of to be granted access. Empty list allows every server. + * @type {Array} + * @memberof PlexSource + */ + allowedServers?: Array; + /** + * Allow friends to authenticate, even if you don't share a server. + * @type {boolean} + * @memberof PlexSource + */ + allowFriends?: boolean; + /** + * Plex token used to check friends + * @type {string} + * @memberof PlexSource + */ + plexToken: string; +} + + + +/** + * Check if a given object implements the PlexSource interface. + */ +export function instanceOfPlexSource(value: object): value is PlexSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + if (!('plexToken' in value) || value['plexToken'] === undefined) return false; + return true; +} + +export function PlexSourceFromJSON(json: any): PlexSource { + return PlexSourceFromJSONTyped(json, false); +} + +export function PlexSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'allowedServers': json['allowed_servers'] == null ? undefined : json['allowed_servers'], + 'allowFriends': json['allow_friends'] == null ? undefined : json['allow_friends'], + 'plexToken': json['plex_token'], + }; +} + +export function PlexSourceToJSON(json: any): PlexSource { + return PlexSourceToJSONTyped(json, false); +} + +export function PlexSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'client_id': value['clientId'], + 'allowed_servers': value['allowedServers'], + 'allow_friends': value['allowFriends'], + 'plex_token': value['plexToken'], + }; +} + diff --git a/packages/client-ts/src/models/PlexSourcePropertyMapping.ts b/packages/client-ts/src/models/PlexSourcePropertyMapping.ts new file mode 100644 index 0000000000..6cb05b2649 --- /dev/null +++ b/packages/client-ts/src/models/PlexSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PlexSourcePropertyMapping Serializer + * @export + * @interface PlexSourcePropertyMapping + */ +export interface PlexSourcePropertyMapping { + /** + * + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PlexSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the PlexSourcePropertyMapping interface. + */ +export function instanceOfPlexSourcePropertyMapping(value: object): value is PlexSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function PlexSourcePropertyMappingFromJSON(json: any): PlexSourcePropertyMapping { + return PlexSourcePropertyMappingFromJSONTyped(json, false); +} + +export function PlexSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function PlexSourcePropertyMappingToJSON(json: any): PlexSourcePropertyMapping { + return PlexSourcePropertyMappingToJSONTyped(json, false); +} + +export function PlexSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PlexSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/PlexSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..5b126f6bfc --- /dev/null +++ b/packages/client-ts/src/models/PlexSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PlexSourcePropertyMapping Serializer + * @export + * @interface PlexSourcePropertyMappingRequest + */ +export interface PlexSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof PlexSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PlexSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof PlexSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the PlexSourcePropertyMappingRequest interface. + */ +export function instanceOfPlexSourcePropertyMappingRequest(value: object): value is PlexSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function PlexSourcePropertyMappingRequestFromJSON(json: any): PlexSourcePropertyMappingRequest { + return PlexSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function PlexSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function PlexSourcePropertyMappingRequestToJSON(json: any): PlexSourcePropertyMappingRequest { + return PlexSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function PlexSourcePropertyMappingRequestToJSONTyped(value?: PlexSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PlexSourceRequest.ts b/packages/client-ts/src/models/PlexSourceRequest.ts new file mode 100644 index 0000000000..deaff20089 --- /dev/null +++ b/packages/client-ts/src/models/PlexSourceRequest.ts @@ -0,0 +1,220 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * Plex Source Serializer + * @export + * @interface PlexSourceRequest + */ +export interface PlexSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof PlexSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof PlexSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof PlexSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof PlexSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof PlexSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof PlexSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof PlexSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof PlexSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof PlexSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof PlexSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof PlexSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof PlexSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof PlexSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Client identifier used to talk to Plex. + * @type {string} + * @memberof PlexSourceRequest + */ + clientId?: string; + /** + * Which servers a user has to be a member of to be granted access. Empty list allows every server. + * @type {Array} + * @memberof PlexSourceRequest + */ + allowedServers?: Array; + /** + * Allow friends to authenticate, even if you don't share a server. + * @type {boolean} + * @memberof PlexSourceRequest + */ + allowFriends?: boolean; + /** + * Plex token used to check friends + * @type {string} + * @memberof PlexSourceRequest + */ + plexToken: string; +} + + + +/** + * Check if a given object implements the PlexSourceRequest interface. + */ +export function instanceOfPlexSourceRequest(value: object): value is PlexSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('plexToken' in value) || value['plexToken'] === undefined) return false; + return true; +} + +export function PlexSourceRequestFromJSON(json: any): PlexSourceRequest { + return PlexSourceRequestFromJSONTyped(json, false); +} + +export function PlexSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'allowedServers': json['allowed_servers'] == null ? undefined : json['allowed_servers'], + 'allowFriends': json['allow_friends'] == null ? undefined : json['allow_friends'], + 'plexToken': json['plex_token'], + }; +} + +export function PlexSourceRequestToJSON(json: any): PlexSourceRequest { + return PlexSourceRequestToJSONTyped(json, false); +} + +export function PlexSourceRequestToJSONTyped(value?: PlexSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'client_id': value['clientId'], + 'allowed_servers': value['allowedServers'], + 'allow_friends': value['allowFriends'], + 'plex_token': value['plexToken'], + }; +} + diff --git a/packages/client-ts/src/models/PlexTokenRedeemRequest.ts b/packages/client-ts/src/models/PlexTokenRedeemRequest.ts new file mode 100644 index 0000000000..337b17dc18 --- /dev/null +++ b/packages/client-ts/src/models/PlexTokenRedeemRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer to redeem a plex token + * @export + * @interface PlexTokenRedeemRequest + */ +export interface PlexTokenRedeemRequest { + /** + * + * @type {string} + * @memberof PlexTokenRedeemRequest + */ + plexToken: string; +} + +/** + * Check if a given object implements the PlexTokenRedeemRequest interface. + */ +export function instanceOfPlexTokenRedeemRequest(value: object): value is PlexTokenRedeemRequest { + if (!('plexToken' in value) || value['plexToken'] === undefined) return false; + return true; +} + +export function PlexTokenRedeemRequestFromJSON(json: any): PlexTokenRedeemRequest { + return PlexTokenRedeemRequestFromJSONTyped(json, false); +} + +export function PlexTokenRedeemRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlexTokenRedeemRequest { + if (json == null) { + return json; + } + return { + + 'plexToken': json['plex_token'], + }; +} + +export function PlexTokenRedeemRequestToJSON(json: any): PlexTokenRedeemRequest { + return PlexTokenRedeemRequestToJSONTyped(json, false); +} + +export function PlexTokenRedeemRequestToJSONTyped(value?: PlexTokenRedeemRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'plex_token': value['plexToken'], + }; +} + diff --git a/packages/client-ts/src/models/Policy.ts b/packages/client-ts/src/models/Policy.ts new file mode 100644 index 0000000000..620d8f99d1 --- /dev/null +++ b/packages/client-ts/src/models/Policy.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Policy Serializer + * @export + * @interface Policy + */ +export interface Policy { + /** + * + * @type {string} + * @memberof Policy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Policy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof Policy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof Policy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof Policy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof Policy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof Policy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof Policy + */ + readonly boundTo: number; +} + +/** + * Check if a given object implements the Policy interface. + */ +export function instanceOfPolicy(value: object): value is Policy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + return true; +} + +export function PolicyFromJSON(json: any): Policy { + return PolicyFromJSONTyped(json, false); +} + +export function PolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Policy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + }; +} + +export function PolicyToJSON(json: any): Policy { + return PolicyToJSONTyped(json, false); +} + +export function PolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + }; +} + diff --git a/packages/client-ts/src/models/PolicyBinding.ts b/packages/client-ts/src/models/PolicyBinding.ts new file mode 100644 index 0000000000..2cde7d91f9 --- /dev/null +++ b/packages/client-ts/src/models/PolicyBinding.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { Policy } from './Policy'; +import { + PolicyFromJSON, + PolicyFromJSONTyped, + PolicyToJSON, + PolicyToJSONTyped, +} from './Policy'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * PolicyBinding Serializer + * @export + * @interface PolicyBinding + */ +export interface PolicyBinding { + /** + * + * @type {string} + * @memberof PolicyBinding + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof PolicyBinding + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof PolicyBinding + */ + group?: string | null; + /** + * + * @type {number} + * @memberof PolicyBinding + */ + user?: number | null; + /** + * + * @type {Policy} + * @memberof PolicyBinding + */ + readonly policyObj: Policy; + /** + * + * @type {PartialGroup} + * @memberof PolicyBinding + */ + readonly groupObj: PartialGroup; + /** + * + * @type {PartialUser} + * @memberof PolicyBinding + */ + readonly userObj: PartialUser; + /** + * + * @type {string} + * @memberof PolicyBinding + */ + target: string; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof PolicyBinding + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof PolicyBinding + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof PolicyBinding + */ + order: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof PolicyBinding + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof PolicyBinding + */ + failureResult?: boolean; +} + +/** + * Check if a given object implements the PolicyBinding interface. + */ +export function instanceOfPolicyBinding(value: object): value is PolicyBinding { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('policyObj' in value) || value['policyObj'] === undefined) return false; + if (!('groupObj' in value) || value['groupObj'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + if (!('target' in value) || value['target'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + return true; +} + +export function PolicyBindingFromJSON(json: any): PolicyBinding { + return PolicyBindingFromJSONTyped(json, false); +} + +export function PolicyBindingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyBinding { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'policyObj': PolicyFromJSON(json['policy_obj']), + 'groupObj': PartialGroupFromJSON(json['group_obj']), + 'userObj': PartialUserFromJSON(json['user_obj']), + 'target': json['target'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + }; +} + +export function PolicyBindingToJSON(json: any): PolicyBinding { + return PolicyBindingToJSONTyped(json, false); +} + +export function PolicyBindingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'target': value['target'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + }; +} + diff --git a/packages/client-ts/src/models/PolicyBindingRequest.ts b/packages/client-ts/src/models/PolicyBindingRequest.ts new file mode 100644 index 0000000000..a0d26f933d --- /dev/null +++ b/packages/client-ts/src/models/PolicyBindingRequest.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PolicyBinding Serializer + * @export + * @interface PolicyBindingRequest + */ +export interface PolicyBindingRequest { + /** + * + * @type {string} + * @memberof PolicyBindingRequest + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof PolicyBindingRequest + */ + group?: string | null; + /** + * + * @type {number} + * @memberof PolicyBindingRequest + */ + user?: number | null; + /** + * + * @type {string} + * @memberof PolicyBindingRequest + */ + target: string; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof PolicyBindingRequest + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof PolicyBindingRequest + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof PolicyBindingRequest + */ + order: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof PolicyBindingRequest + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof PolicyBindingRequest + */ + failureResult?: boolean; +} + +/** + * Check if a given object implements the PolicyBindingRequest interface. + */ +export function instanceOfPolicyBindingRequest(value: object): value is PolicyBindingRequest { + if (!('target' in value) || value['target'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + return true; +} + +export function PolicyBindingRequestFromJSON(json: any): PolicyBindingRequest { + return PolicyBindingRequestFromJSONTyped(json, false); +} + +export function PolicyBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyBindingRequest { + if (json == null) { + return json; + } + return { + + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'target': json['target'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + }; +} + +export function PolicyBindingRequestToJSON(json: any): PolicyBindingRequest { + return PolicyBindingRequestToJSONTyped(json, false); +} + +export function PolicyBindingRequestToJSONTyped(value?: PolicyBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'target': value['target'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + }; +} + diff --git a/packages/client-ts/src/models/PolicyEngineMode.ts b/packages/client-ts/src/models/PolicyEngineMode.ts new file mode 100644 index 0000000000..50f0c7e2ba --- /dev/null +++ b/packages/client-ts/src/models/PolicyEngineMode.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const PolicyEngineMode = { + All: 'all', + Any: 'any', + UnknownDefaultOpenApi: '11184809' +} as const; +export type PolicyEngineMode = typeof PolicyEngineMode[keyof typeof PolicyEngineMode]; + + +export function instanceOfPolicyEngineMode(value: any): boolean { + for (const key in PolicyEngineMode) { + if (Object.prototype.hasOwnProperty.call(PolicyEngineMode, key)) { + if (PolicyEngineMode[key as keyof typeof PolicyEngineMode] === value) { + return true; + } + } + } + return false; +} + +export function PolicyEngineModeFromJSON(json: any): PolicyEngineMode { + return PolicyEngineModeFromJSONTyped(json, false); +} + +export function PolicyEngineModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyEngineMode { + return json as PolicyEngineMode; +} + +export function PolicyEngineModeToJSON(value?: PolicyEngineMode | null): any { + return value as any; +} + +export function PolicyEngineModeToJSONTyped(value: any, ignoreDiscriminator: boolean): PolicyEngineMode { + return value as PolicyEngineMode; +} + diff --git a/packages/client-ts/src/models/PolicyTestRequest.ts b/packages/client-ts/src/models/PolicyTestRequest.ts new file mode 100644 index 0000000000..f47ba08bb1 --- /dev/null +++ b/packages/client-ts/src/models/PolicyTestRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Test policy execution for a user with context + * @export + * @interface PolicyTestRequest + */ +export interface PolicyTestRequest { + /** + * + * @type {number} + * @memberof PolicyTestRequest + */ + user: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PolicyTestRequest + */ + context?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PolicyTestRequest interface. + */ +export function instanceOfPolicyTestRequest(value: object): value is PolicyTestRequest { + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function PolicyTestRequestFromJSON(json: any): PolicyTestRequest { + return PolicyTestRequestFromJSONTyped(json, false); +} + +export function PolicyTestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyTestRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'context': json['context'] == null ? undefined : json['context'], + }; +} + +export function PolicyTestRequestToJSON(json: any): PolicyTestRequest { + return PolicyTestRequestToJSONTyped(json, false); +} + +export function PolicyTestRequestToJSONTyped(value?: PolicyTestRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'context': value['context'], + }; +} + diff --git a/packages/client-ts/src/models/PolicyTestResult.ts b/packages/client-ts/src/models/PolicyTestResult.ts new file mode 100644 index 0000000000..c65e030686 --- /dev/null +++ b/packages/client-ts/src/models/PolicyTestResult.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LogEvent } from './LogEvent'; +import { + LogEventFromJSON, + LogEventFromJSONTyped, + LogEventToJSON, + LogEventToJSONTyped, +} from './LogEvent'; + +/** + * result of a policy test + * @export + * @interface PolicyTestResult + */ +export interface PolicyTestResult { + /** + * + * @type {boolean} + * @memberof PolicyTestResult + */ + passing: boolean; + /** + * + * @type {Array} + * @memberof PolicyTestResult + */ + readonly messages: Array; + /** + * + * @type {Array} + * @memberof PolicyTestResult + */ + readonly logMessages: Array; +} + +/** + * Check if a given object implements the PolicyTestResult interface. + */ +export function instanceOfPolicyTestResult(value: object): value is PolicyTestResult { + if (!('passing' in value) || value['passing'] === undefined) return false; + if (!('messages' in value) || value['messages'] === undefined) return false; + if (!('logMessages' in value) || value['logMessages'] === undefined) return false; + return true; +} + +export function PolicyTestResultFromJSON(json: any): PolicyTestResult { + return PolicyTestResultFromJSONTyped(json, false); +} + +export function PolicyTestResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyTestResult { + if (json == null) { + return json; + } + return { + + 'passing': json['passing'], + 'messages': json['messages'], + 'logMessages': ((json['log_messages'] as Array).map(LogEventFromJSON)), + }; +} + +export function PolicyTestResultToJSON(json: any): PolicyTestResult { + return PolicyTestResultToJSONTyped(json, false); +} + +export function PolicyTestResultToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'passing': value['passing'], + }; +} + diff --git a/packages/client-ts/src/models/Process.ts b/packages/client-ts/src/models/Process.ts new file mode 100644 index 0000000000..410418cbf0 --- /dev/null +++ b/packages/client-ts/src/models/Process.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Process + */ +export interface Process { + /** + * + * @type {number} + * @memberof Process + */ + id: number; + /** + * + * @type {string} + * @memberof Process + */ + name: string; + /** + * + * @type {string} + * @memberof Process + */ + user?: string; +} + +/** + * Check if a given object implements the Process interface. + */ +export function instanceOfProcess(value: object): value is Process { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function ProcessFromJSON(json: any): Process { + return ProcessFromJSONTyped(json, false); +} + +export function ProcessFromJSONTyped(json: any, ignoreDiscriminator: boolean): Process { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + 'user': json['user'] == null ? undefined : json['user'], + }; +} + +export function ProcessToJSON(json: any): Process { + return ProcessToJSONTyped(json, false); +} + +export function ProcessToJSONTyped(value?: Process | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'user': value['user'], + }; +} + diff --git a/packages/client-ts/src/models/ProcessRequest.ts b/packages/client-ts/src/models/ProcessRequest.ts new file mode 100644 index 0000000000..8f93478cf2 --- /dev/null +++ b/packages/client-ts/src/models/ProcessRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ProcessRequest + */ +export interface ProcessRequest { + /** + * + * @type {number} + * @memberof ProcessRequest + */ + id: number; + /** + * + * @type {string} + * @memberof ProcessRequest + */ + name: string; + /** + * + * @type {string} + * @memberof ProcessRequest + */ + user?: string; +} + +/** + * Check if a given object implements the ProcessRequest interface. + */ +export function instanceOfProcessRequest(value: object): value is ProcessRequest { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function ProcessRequestFromJSON(json: any): ProcessRequest { + return ProcessRequestFromJSONTyped(json, false); +} + +export function ProcessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProcessRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'name': json['name'], + 'user': json['user'] == null ? undefined : json['user'], + }; +} + +export function ProcessRequestToJSON(json: any): ProcessRequest { + return ProcessRequestToJSONTyped(json, false); +} + +export function ProcessRequestToJSONTyped(value?: ProcessRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'user': value['user'], + }; +} + diff --git a/packages/client-ts/src/models/Prompt.ts b/packages/client-ts/src/models/Prompt.ts new file mode 100644 index 0000000000..e66ccff38c --- /dev/null +++ b/packages/client-ts/src/models/Prompt.ts @@ -0,0 +1,182 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PromptStage } from './PromptStage'; +import { + PromptStageFromJSON, + PromptStageFromJSONTyped, + PromptStageToJSON, + PromptStageToJSONTyped, +} from './PromptStage'; +import type { PromptTypeEnum } from './PromptTypeEnum'; +import { + PromptTypeEnumFromJSON, + PromptTypeEnumFromJSONTyped, + PromptTypeEnumToJSON, + PromptTypeEnumToJSONTyped, +} from './PromptTypeEnum'; + +/** + * Prompt Serializer + * @export + * @interface Prompt + */ +export interface Prompt { + /** + * + * @type {string} + * @memberof Prompt + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Prompt + */ + name: string; + /** + * Name of the form field, also used to store the value + * @type {string} + * @memberof Prompt + */ + fieldKey: string; + /** + * + * @type {string} + * @memberof Prompt + */ + label: string; + /** + * + * @type {PromptTypeEnum} + * @memberof Prompt + */ + type: PromptTypeEnum; + /** + * + * @type {boolean} + * @memberof Prompt + */ + required?: boolean; + /** + * 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. + * @type {string} + * @memberof Prompt + */ + 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. + * @type {string} + * @memberof Prompt + */ + initialValue?: string; + /** + * + * @type {number} + * @memberof Prompt + */ + order?: number; + /** + * + * @type {Array} + * @memberof Prompt + */ + readonly promptStagesObj: Array; + /** + * + * @type {string} + * @memberof Prompt + */ + subText?: string; + /** + * + * @type {boolean} + * @memberof Prompt + */ + placeholderExpression?: boolean; + /** + * + * @type {boolean} + * @memberof Prompt + */ + initialValueExpression?: boolean; +} + + + +/** + * Check if a given object implements the Prompt interface. + */ +export function instanceOfPrompt(value: object): value is Prompt { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('fieldKey' in value) || value['fieldKey'] === undefined) return false; + if (!('label' in value) || value['label'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('promptStagesObj' in value) || value['promptStagesObj'] === undefined) return false; + return true; +} + +export function PromptFromJSON(json: any): Prompt { + return PromptFromJSONTyped(json, false); +} + +export function PromptFromJSONTyped(json: any, ignoreDiscriminator: boolean): Prompt { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'fieldKey': json['field_key'], + 'label': json['label'], + 'type': PromptTypeEnumFromJSON(json['type']), + 'required': json['required'] == null ? undefined : json['required'], + 'placeholder': json['placeholder'] == null ? undefined : json['placeholder'], + 'initialValue': json['initial_value'] == null ? undefined : json['initial_value'], + 'order': json['order'] == null ? undefined : json['order'], + 'promptStagesObj': ((json['prompt_stages_obj'] as Array).map(PromptStageFromJSON)), + 'subText': json['sub_text'] == null ? undefined : json['sub_text'], + 'placeholderExpression': json['placeholder_expression'] == null ? undefined : json['placeholder_expression'], + 'initialValueExpression': json['initial_value_expression'] == null ? undefined : json['initial_value_expression'], + }; +} + +export function PromptToJSON(json: any): Prompt { + return PromptToJSONTyped(json, false); +} + +export function PromptToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'field_key': value['fieldKey'], + 'label': value['label'], + 'type': PromptTypeEnumToJSON(value['type']), + 'required': value['required'], + 'placeholder': value['placeholder'], + 'initial_value': value['initialValue'], + 'order': value['order'], + 'sub_text': value['subText'], + 'placeholder_expression': value['placeholderExpression'], + 'initial_value_expression': value['initialValueExpression'], + }; +} + diff --git a/packages/client-ts/src/models/PromptChallenge.ts b/packages/client-ts/src/models/PromptChallenge.ts new file mode 100644 index 0000000000..5636a4cba0 --- /dev/null +++ b/packages/client-ts/src/models/PromptChallenge.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; +import type { StagePrompt } from './StagePrompt'; +import { + StagePromptFromJSON, + StagePromptFromJSONTyped, + StagePromptToJSON, + StagePromptToJSONTyped, +} from './StagePrompt'; + +/** + * Initial challenge being sent, define fields + * @export + * @interface PromptChallenge + */ +export interface PromptChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof PromptChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof PromptChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof PromptChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {Array} + * @memberof PromptChallenge + */ + fields: Array; +} + +/** + * Check if a given object implements the PromptChallenge interface. + */ +export function instanceOfPromptChallenge(value: object): value is PromptChallenge { + if (!('fields' in value) || value['fields'] === undefined) return false; + return true; +} + +export function PromptChallengeFromJSON(json: any): PromptChallenge { + return PromptChallengeFromJSONTyped(json, false); +} + +export function PromptChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'fields': ((json['fields'] as Array).map(StagePromptFromJSON)), + }; +} + +export function PromptChallengeToJSON(json: any): PromptChallenge { + return PromptChallengeToJSONTyped(json, false); +} + +export function PromptChallengeToJSONTyped(value?: PromptChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'fields': ((value['fields'] as Array).map(StagePromptToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/PromptChallengeResponseRequest.ts b/packages/client-ts/src/models/PromptChallengeResponseRequest.ts new file mode 100644 index 0000000000..513fcde1fa --- /dev/null +++ b/packages/client-ts/src/models/PromptChallengeResponseRequest.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Validate response, fields are dynamically created based + * on the stage + * @export + * @interface PromptChallengeResponseRequest + */ +export interface PromptChallengeResponseRequest { + [key: string]: any | any; + /** + * + * @type {string} + * @memberof PromptChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the PromptChallengeResponseRequest interface. + */ +export function instanceOfPromptChallengeResponseRequest(value: object): value is PromptChallengeResponseRequest { + return true; +} + +export function PromptChallengeResponseRequestFromJSON(json: any): PromptChallengeResponseRequest { + return PromptChallengeResponseRequestFromJSONTyped(json, false); +} + +export function PromptChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + ...json, + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function PromptChallengeResponseRequestToJSON(json: any): PromptChallengeResponseRequest { + return PromptChallengeResponseRequestToJSONTyped(json, false); +} + +export function PromptChallengeResponseRequestToJSONTyped(value?: PromptChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/PromptChoice.ts b/packages/client-ts/src/models/PromptChoice.ts new file mode 100644 index 0000000000..5b0a0c9bbc --- /dev/null +++ b/packages/client-ts/src/models/PromptChoice.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for a single Choice field + * @export + * @interface PromptChoice + */ +export interface PromptChoice { + /** + * + * @type {string} + * @memberof PromptChoice + */ + value: string; + /** + * + * @type {string} + * @memberof PromptChoice + */ + label: string; +} + +/** + * Check if a given object implements the PromptChoice interface. + */ +export function instanceOfPromptChoice(value: object): value is PromptChoice { + if (!('value' in value) || value['value'] === undefined) return false; + if (!('label' in value) || value['label'] === undefined) return false; + return true; +} + +export function PromptChoiceFromJSON(json: any): PromptChoice { + return PromptChoiceFromJSONTyped(json, false); +} + +export function PromptChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptChoice { + if (json == null) { + return json; + } + return { + + 'value': json['value'], + 'label': json['label'], + }; +} + +export function PromptChoiceToJSON(json: any): PromptChoice { + return PromptChoiceToJSONTyped(json, false); +} + +export function PromptChoiceToJSONTyped(value?: PromptChoice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'value': value['value'], + 'label': value['label'], + }; +} + diff --git a/packages/client-ts/src/models/PromptRequest.ts b/packages/client-ts/src/models/PromptRequest.ts new file mode 100644 index 0000000000..76aa30027a --- /dev/null +++ b/packages/client-ts/src/models/PromptRequest.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PromptTypeEnum } from './PromptTypeEnum'; +import { + PromptTypeEnumFromJSON, + PromptTypeEnumFromJSONTyped, + PromptTypeEnumToJSON, + PromptTypeEnumToJSONTyped, +} from './PromptTypeEnum'; + +/** + * Prompt Serializer + * @export + * @interface PromptRequest + */ +export interface PromptRequest { + /** + * + * @type {string} + * @memberof PromptRequest + */ + name: string; + /** + * Name of the form field, also used to store the value + * @type {string} + * @memberof PromptRequest + */ + fieldKey: string; + /** + * + * @type {string} + * @memberof PromptRequest + */ + label: string; + /** + * + * @type {PromptTypeEnum} + * @memberof PromptRequest + */ + type: PromptTypeEnum; + /** + * + * @type {boolean} + * @memberof PromptRequest + */ + required?: boolean; + /** + * 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. + * @type {string} + * @memberof PromptRequest + */ + 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. + * @type {string} + * @memberof PromptRequest + */ + initialValue?: string; + /** + * + * @type {number} + * @memberof PromptRequest + */ + order?: number; + /** + * + * @type {string} + * @memberof PromptRequest + */ + subText?: string; + /** + * + * @type {boolean} + * @memberof PromptRequest + */ + placeholderExpression?: boolean; + /** + * + * @type {boolean} + * @memberof PromptRequest + */ + initialValueExpression?: boolean; +} + + + +/** + * Check if a given object implements the PromptRequest interface. + */ +export function instanceOfPromptRequest(value: object): value is PromptRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('fieldKey' in value) || value['fieldKey'] === undefined) return false; + if (!('label' in value) || value['label'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function PromptRequestFromJSON(json: any): PromptRequest { + return PromptRequestFromJSONTyped(json, false); +} + +export function PromptRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'fieldKey': json['field_key'], + 'label': json['label'], + 'type': PromptTypeEnumFromJSON(json['type']), + 'required': json['required'] == null ? undefined : json['required'], + 'placeholder': json['placeholder'] == null ? undefined : json['placeholder'], + 'initialValue': json['initial_value'] == null ? undefined : json['initial_value'], + 'order': json['order'] == null ? undefined : json['order'], + 'subText': json['sub_text'] == null ? undefined : json['sub_text'], + 'placeholderExpression': json['placeholder_expression'] == null ? undefined : json['placeholder_expression'], + 'initialValueExpression': json['initial_value_expression'] == null ? undefined : json['initial_value_expression'], + }; +} + +export function PromptRequestToJSON(json: any): PromptRequest { + return PromptRequestToJSONTyped(json, false); +} + +export function PromptRequestToJSONTyped(value?: PromptRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'field_key': value['fieldKey'], + 'label': value['label'], + 'type': PromptTypeEnumToJSON(value['type']), + 'required': value['required'], + 'placeholder': value['placeholder'], + 'initial_value': value['initialValue'], + 'order': value['order'], + 'sub_text': value['subText'], + 'placeholder_expression': value['placeholderExpression'], + 'initial_value_expression': value['initialValueExpression'], + }; +} + diff --git a/packages/client-ts/src/models/PromptStage.ts b/packages/client-ts/src/models/PromptStage.ts new file mode 100644 index 0000000000..6b2eeb85df --- /dev/null +++ b/packages/client-ts/src/models/PromptStage.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * PromptStage Serializer + * @export + * @interface PromptStage + */ +export interface PromptStage { + /** + * + * @type {string} + * @memberof PromptStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof PromptStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof PromptStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PromptStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PromptStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PromptStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof PromptStage + */ + readonly flowSet: Array; + /** + * + * @type {Array} + * @memberof PromptStage + */ + fields: Array; + /** + * + * @type {Array} + * @memberof PromptStage + */ + validationPolicies?: Array; +} + +/** + * Check if a given object implements the PromptStage interface. + */ +export function instanceOfPromptStage(value: object): value is PromptStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('fields' in value) || value['fields'] === undefined) return false; + return true; +} + +export function PromptStageFromJSON(json: any): PromptStage { + return PromptStageFromJSONTyped(json, false); +} + +export function PromptStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'fields': json['fields'], + 'validationPolicies': json['validation_policies'] == null ? undefined : json['validation_policies'], + }; +} + +export function PromptStageToJSON(json: any): PromptStage { + return PromptStageToJSONTyped(json, false); +} + +export function PromptStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'fields': value['fields'], + 'validation_policies': value['validationPolicies'], + }; +} + diff --git a/packages/client-ts/src/models/PromptStageRequest.ts b/packages/client-ts/src/models/PromptStageRequest.ts new file mode 100644 index 0000000000..79b7d19390 --- /dev/null +++ b/packages/client-ts/src/models/PromptStageRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PromptStage Serializer + * @export + * @interface PromptStageRequest + */ +export interface PromptStageRequest { + /** + * + * @type {string} + * @memberof PromptStageRequest + */ + name: string; + /** + * + * @type {Array} + * @memberof PromptStageRequest + */ + fields: Array; + /** + * + * @type {Array} + * @memberof PromptStageRequest + */ + validationPolicies?: Array; +} + +/** + * Check if a given object implements the PromptStageRequest interface. + */ +export function instanceOfPromptStageRequest(value: object): value is PromptStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('fields' in value) || value['fields'] === undefined) return false; + return true; +} + +export function PromptStageRequestFromJSON(json: any): PromptStageRequest { + return PromptStageRequestFromJSONTyped(json, false); +} + +export function PromptStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'fields': json['fields'], + 'validationPolicies': json['validation_policies'] == null ? undefined : json['validation_policies'], + }; +} + +export function PromptStageRequestToJSON(json: any): PromptStageRequest { + return PromptStageRequestToJSONTyped(json, false); +} + +export function PromptStageRequestToJSONTyped(value?: PromptStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'fields': value['fields'], + 'validation_policies': value['validationPolicies'], + }; +} + diff --git a/packages/client-ts/src/models/PromptTypeEnum.ts b/packages/client-ts/src/models/PromptTypeEnum.ts new file mode 100644 index 0000000000..7240088bde --- /dev/null +++ b/packages/client-ts/src/models/PromptTypeEnum.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const PromptTypeEnum = { + Text: 'text', + TextArea: 'text_area', + TextReadOnly: 'text_read_only', + TextAreaReadOnly: 'text_area_read_only', + Username: 'username', + Email: 'email', + Password: 'password', + Number: 'number', + Checkbox: 'checkbox', + RadioButtonGroup: 'radio-button-group', + Dropdown: 'dropdown', + Date: 'date', + DateTime: 'date-time', + File: 'file', + Separator: 'separator', + Hidden: 'hidden', + Static: 'static', + AkLocale: 'ak-locale', + UnknownDefaultOpenApi: '11184809' +} as const; +export type PromptTypeEnum = typeof PromptTypeEnum[keyof typeof PromptTypeEnum]; + + +export function instanceOfPromptTypeEnum(value: any): boolean { + for (const key in PromptTypeEnum) { + if (Object.prototype.hasOwnProperty.call(PromptTypeEnum, key)) { + if (PromptTypeEnum[key as keyof typeof PromptTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function PromptTypeEnumFromJSON(json: any): PromptTypeEnum { + return PromptTypeEnumFromJSONTyped(json, false); +} + +export function PromptTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptTypeEnum { + return json as PromptTypeEnum; +} + +export function PromptTypeEnumToJSON(value?: PromptTypeEnum | null): any { + return value as any; +} + +export function PromptTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): PromptTypeEnum { + return value as PromptTypeEnum; +} + diff --git a/packages/client-ts/src/models/PropertyMapping.ts b/packages/client-ts/src/models/PropertyMapping.ts new file mode 100644 index 0000000000..f2af83febd --- /dev/null +++ b/packages/client-ts/src/models/PropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PropertyMapping Serializer + * @export + * @interface PropertyMapping + */ +export interface PropertyMapping { + /** + * + * @type {string} + * @memberof PropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof PropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof PropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof PropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof PropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof PropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof PropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof PropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the PropertyMapping interface. + */ +export function instanceOfPropertyMapping(value: object): value is PropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function PropertyMappingFromJSON(json: any): PropertyMapping { + return PropertyMappingFromJSONTyped(json, false); +} + +export function PropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function PropertyMappingToJSON(json: any): PropertyMapping { + return PropertyMappingToJSONTyped(json, false); +} + +export function PropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/PropertyMappingPreview.ts b/packages/client-ts/src/models/PropertyMappingPreview.ts new file mode 100644 index 0000000000..e5a678279a --- /dev/null +++ b/packages/client-ts/src/models/PropertyMappingPreview.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Preview how the current user is mapped via the property mappings selected in a provider + * @export + * @interface PropertyMappingPreview + */ +export interface PropertyMappingPreview { + /** + * + * @type {{ [key: string]: any; }} + * @memberof PropertyMappingPreview + */ + readonly preview: { [key: string]: any; }; +} + +/** + * Check if a given object implements the PropertyMappingPreview interface. + */ +export function instanceOfPropertyMappingPreview(value: object): value is PropertyMappingPreview { + if (!('preview' in value) || value['preview'] === undefined) return false; + return true; +} + +export function PropertyMappingPreviewFromJSON(json: any): PropertyMappingPreview { + return PropertyMappingPreviewFromJSONTyped(json, false); +} + +export function PropertyMappingPreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyMappingPreview { + if (json == null) { + return json; + } + return { + + 'preview': json['preview'], + }; +} + +export function PropertyMappingPreviewToJSON(json: any): PropertyMappingPreview { + return PropertyMappingPreviewToJSONTyped(json, false); +} + +export function PropertyMappingPreviewToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/PropertyMappingTestRequest.ts b/packages/client-ts/src/models/PropertyMappingTestRequest.ts new file mode 100644 index 0000000000..36437f3ed9 --- /dev/null +++ b/packages/client-ts/src/models/PropertyMappingTestRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Test property mapping execution for a user/group with context + * @export + * @interface PropertyMappingTestRequest + */ +export interface PropertyMappingTestRequest { + /** + * + * @type {number} + * @memberof PropertyMappingTestRequest + */ + user?: number | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof PropertyMappingTestRequest + */ + context?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof PropertyMappingTestRequest + */ + group?: string | null; +} + +/** + * Check if a given object implements the PropertyMappingTestRequest interface. + */ +export function instanceOfPropertyMappingTestRequest(value: object): value is PropertyMappingTestRequest { + return true; +} + +export function PropertyMappingTestRequestFromJSON(json: any): PropertyMappingTestRequest { + return PropertyMappingTestRequestFromJSONTyped(json, false); +} + +export function PropertyMappingTestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyMappingTestRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'context': json['context'] == null ? undefined : json['context'], + 'group': json['group'] == null ? undefined : json['group'], + }; +} + +export function PropertyMappingTestRequestToJSON(json: any): PropertyMappingTestRequest { + return PropertyMappingTestRequestToJSONTyped(json, false); +} + +export function PropertyMappingTestRequestToJSONTyped(value?: PropertyMappingTestRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'context': value['context'], + 'group': value['group'], + }; +} + diff --git a/packages/client-ts/src/models/PropertyMappingTestResult.ts b/packages/client-ts/src/models/PropertyMappingTestResult.ts new file mode 100644 index 0000000000..962331ab7a --- /dev/null +++ b/packages/client-ts/src/models/PropertyMappingTestResult.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Result of a Property-mapping test + * @export + * @interface PropertyMappingTestResult + */ +export interface PropertyMappingTestResult { + /** + * + * @type {string} + * @memberof PropertyMappingTestResult + */ + readonly result: string; + /** + * + * @type {boolean} + * @memberof PropertyMappingTestResult + */ + readonly successful: boolean; +} + +/** + * Check if a given object implements the PropertyMappingTestResult interface. + */ +export function instanceOfPropertyMappingTestResult(value: object): value is PropertyMappingTestResult { + if (!('result' in value) || value['result'] === undefined) return false; + if (!('successful' in value) || value['successful'] === undefined) return false; + return true; +} + +export function PropertyMappingTestResultFromJSON(json: any): PropertyMappingTestResult { + return PropertyMappingTestResultFromJSONTyped(json, false); +} + +export function PropertyMappingTestResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyMappingTestResult { + if (json == null) { + return json; + } + return { + + 'result': json['result'], + 'successful': json['successful'], + }; +} + +export function PropertyMappingTestResultToJSON(json: any): PropertyMappingTestResult { + return PropertyMappingTestResultToJSONTyped(json, false); +} + +export function PropertyMappingTestResultToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/ProtocolEnum.ts b/packages/client-ts/src/models/ProtocolEnum.ts new file mode 100644 index 0000000000..3d178a4710 --- /dev/null +++ b/packages/client-ts/src/models/ProtocolEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ProtocolEnum = { + Rdp: 'rdp', + Vnc: 'vnc', + Ssh: 'ssh', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProtocolEnum = typeof ProtocolEnum[keyof typeof ProtocolEnum]; + + +export function instanceOfProtocolEnum(value: any): boolean { + for (const key in ProtocolEnum) { + if (Object.prototype.hasOwnProperty.call(ProtocolEnum, key)) { + if (ProtocolEnum[key as keyof typeof ProtocolEnum] === value) { + return true; + } + } + } + return false; +} + +export function ProtocolEnumFromJSON(json: any): ProtocolEnum { + return ProtocolEnumFromJSONTyped(json, false); +} + +export function ProtocolEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolEnum { + return json as ProtocolEnum; +} + +export function ProtocolEnumToJSON(value?: ProtocolEnum | null): any { + return value as any; +} + +export function ProtocolEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ProtocolEnum { + return value as ProtocolEnum; +} + diff --git a/packages/client-ts/src/models/Provider.ts b/packages/client-ts/src/models/Provider.ts new file mode 100644 index 0000000000..a504b5b9c7 --- /dev/null +++ b/packages/client-ts/src/models/Provider.ts @@ -0,0 +1,172 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Provider Serializer + * @export + * @interface Provider + */ +export interface Provider { + /** + * + * @type {number} + * @memberof Provider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof Provider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof Provider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof Provider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof Provider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof Provider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof Provider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof Provider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof Provider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof Provider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof Provider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof Provider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof Provider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof Provider + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the Provider interface. + */ +export function instanceOfProvider(value: object): value is Provider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function ProviderFromJSON(json: any): Provider { + return ProviderFromJSONTyped(json, false); +} + +export function ProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Provider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function ProviderToJSON(json: any): Provider { + return ProviderToJSONTyped(json, false); +} + +export function ProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + }; +} + diff --git a/packages/client-ts/src/models/ProviderEnum.ts b/packages/client-ts/src/models/ProviderEnum.ts new file mode 100644 index 0000000000..309d86f3ff --- /dev/null +++ b/packages/client-ts/src/models/ProviderEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ProviderEnum = { + Twilio: 'twilio', + Generic: 'generic', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProviderEnum = typeof ProviderEnum[keyof typeof ProviderEnum]; + + +export function instanceOfProviderEnum(value: any): boolean { + for (const key in ProviderEnum) { + if (Object.prototype.hasOwnProperty.call(ProviderEnum, key)) { + if (ProviderEnum[key as keyof typeof ProviderEnum] === value) { + return true; + } + } + } + return false; +} + +export function ProviderEnumFromJSON(json: any): ProviderEnum { + return ProviderEnumFromJSONTyped(json, false); +} + +export function ProviderEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProviderEnum { + return json as ProviderEnum; +} + +export function ProviderEnumToJSON(value?: ProviderEnum | null): any { + return value as any; +} + +export function ProviderEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ProviderEnum { + return value as ProviderEnum; +} + diff --git a/packages/client-ts/src/models/ProviderModelEnum.ts b/packages/client-ts/src/models/ProviderModelEnum.ts new file mode 100644 index 0000000000..7336aa7411 --- /dev/null +++ b/packages/client-ts/src/models/ProviderModelEnum.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ProviderModelEnum = { + AuthentikProvidersGoogleWorkspaceGoogleworkspaceprovider: 'authentik_providers_google_workspace.googleworkspaceprovider', + AuthentikProvidersLdapLdapprovider: 'authentik_providers_ldap.ldapprovider', + AuthentikProvidersMicrosoftEntraMicrosoftentraprovider: 'authentik_providers_microsoft_entra.microsoftentraprovider', + AuthentikProvidersOauth2Oauth2provider: 'authentik_providers_oauth2.oauth2provider', + AuthentikProvidersProxyProxyprovider: 'authentik_providers_proxy.proxyprovider', + AuthentikProvidersRacRacprovider: 'authentik_providers_rac.racprovider', + AuthentikProvidersRadiusRadiusprovider: 'authentik_providers_radius.radiusprovider', + AuthentikProvidersSamlSamlprovider: 'authentik_providers_saml.samlprovider', + AuthentikProvidersScimScimprovider: 'authentik_providers_scim.scimprovider', + AuthentikProvidersSsfSsfprovider: 'authentik_providers_ssf.ssfprovider', + AuthentikProvidersWsFederationWsfederationprovider: 'authentik_providers_ws_federation.wsfederationprovider', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProviderModelEnum = typeof ProviderModelEnum[keyof typeof ProviderModelEnum]; + + +export function instanceOfProviderModelEnum(value: any): boolean { + for (const key in ProviderModelEnum) { + if (Object.prototype.hasOwnProperty.call(ProviderModelEnum, key)) { + if (ProviderModelEnum[key as keyof typeof ProviderModelEnum] === value) { + return true; + } + } + } + return false; +} + +export function ProviderModelEnumFromJSON(json: any): ProviderModelEnum { + return ProviderModelEnumFromJSONTyped(json, false); +} + +export function ProviderModelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProviderModelEnum { + return json as ProviderModelEnum; +} + +export function ProviderModelEnumToJSON(value?: ProviderModelEnum | null): any { + return value as any; +} + +export function ProviderModelEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ProviderModelEnum { + return value as ProviderModelEnum; +} + diff --git a/packages/client-ts/src/models/ProviderTypeEnum.ts b/packages/client-ts/src/models/ProviderTypeEnum.ts new file mode 100644 index 0000000000..a026b63d73 --- /dev/null +++ b/packages/client-ts/src/models/ProviderTypeEnum.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ProviderTypeEnum = { + Apple: 'apple', + Openidconnect: 'openidconnect', + Entraid: 'entraid', + Azuread: 'azuread', + Discord: 'discord', + Facebook: 'facebook', + Github: 'github', + Gitlab: 'gitlab', + Google: 'google', + Mailcow: 'mailcow', + Okta: 'okta', + Patreon: 'patreon', + Reddit: 'reddit', + Slack: 'slack', + Twitch: 'twitch', + Twitter: 'twitter', + Wechat: 'wechat', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProviderTypeEnum = typeof ProviderTypeEnum[keyof typeof ProviderTypeEnum]; + + +export function instanceOfProviderTypeEnum(value: any): boolean { + for (const key in ProviderTypeEnum) { + if (Object.prototype.hasOwnProperty.call(ProviderTypeEnum, key)) { + if (ProviderTypeEnum[key as keyof typeof ProviderTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function ProviderTypeEnumFromJSON(json: any): ProviderTypeEnum { + return ProviderTypeEnumFromJSONTyped(json, false); +} + +export function ProviderTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProviderTypeEnum { + return json as ProviderTypeEnum; +} + +export function ProviderTypeEnumToJSON(value?: ProviderTypeEnum | null): any { + return value as any; +} + +export function ProviderTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): ProviderTypeEnum { + return value as ProviderTypeEnum; +} + diff --git a/packages/client-ts/src/models/ProxyMode.ts b/packages/client-ts/src/models/ProxyMode.ts new file mode 100644 index 0000000000..21f62aa0a1 --- /dev/null +++ b/packages/client-ts/src/models/ProxyMode.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ProxyMode = { + Proxy: 'proxy', + ForwardSingle: 'forward_single', + ForwardDomain: 'forward_domain', + UnknownDefaultOpenApi: '11184809' +} as const; +export type ProxyMode = typeof ProxyMode[keyof typeof ProxyMode]; + + +export function instanceOfProxyMode(value: any): boolean { + for (const key in ProxyMode) { + if (Object.prototype.hasOwnProperty.call(ProxyMode, key)) { + if (ProxyMode[key as keyof typeof ProxyMode] === value) { + return true; + } + } + } + return false; +} + +export function ProxyModeFromJSON(json: any): ProxyMode { + return ProxyModeFromJSONTyped(json, false); +} + +export function ProxyModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProxyMode { + return json as ProxyMode; +} + +export function ProxyModeToJSON(value?: ProxyMode | null): any { + return value as any; +} + +export function ProxyModeToJSONTyped(value: any, ignoreDiscriminator: boolean): ProxyMode { + return value as ProxyMode; +} + diff --git a/packages/client-ts/src/models/ProxyOutpostConfig.ts b/packages/client-ts/src/models/ProxyOutpostConfig.ts new file mode 100644 index 0000000000..94282d475d --- /dev/null +++ b/packages/client-ts/src/models/ProxyOutpostConfig.ts @@ -0,0 +1,245 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { OpenIDConnectConfiguration } from './OpenIDConnectConfiguration'; +import { + OpenIDConnectConfigurationFromJSON, + OpenIDConnectConfigurationFromJSONTyped, + OpenIDConnectConfigurationToJSON, + OpenIDConnectConfigurationToJSONTyped, +} from './OpenIDConnectConfiguration'; +import type { ProxyMode } from './ProxyMode'; +import { + ProxyModeFromJSON, + ProxyModeFromJSONTyped, + ProxyModeToJSON, + ProxyModeToJSONTyped, +} from './ProxyMode'; + +/** + * Proxy provider serializer for outposts + * @export + * @interface ProxyOutpostConfig + */ +export interface ProxyOutpostConfig { + /** + * + * @type {number} + * @memberof ProxyOutpostConfig + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + name: string; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + internalHost?: string; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + externalHost: string; + /** + * Validate SSL Certificates of upstream servers + * @type {boolean} + * @memberof ProxyOutpostConfig + */ + internalHostSslValidation?: boolean; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + clientId?: string; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + clientSecret?: string; + /** + * + * @type {OpenIDConnectConfiguration} + * @memberof ProxyOutpostConfig + */ + readonly oidcConfiguration: OpenIDConnectConfiguration; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + cookieSecret?: string; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + certificate?: string | null; + /** + * Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + * @type {string} + * @memberof ProxyOutpostConfig + */ + skipPathRegex?: string; + /** + * Set a custom HTTP-Basic Authentication header based on values from authentik. + * @type {boolean} + * @memberof ProxyOutpostConfig + */ + basicAuthEnabled?: boolean; + /** + * User/Group Attribute used for the password part of the HTTP-Basic Header. + * @type {string} + * @memberof ProxyOutpostConfig + */ + 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. + * @type {string} + * @memberof ProxyOutpostConfig + */ + basicAuthUserAttribute?: string; + /** + * Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. + * @type {ProxyMode} + * @memberof ProxyOutpostConfig + */ + mode?: ProxyMode; + /** + * + * @type {string} + * @memberof ProxyOutpostConfig + */ + cookieDomain?: string; + /** + * Get token validity as second count + * @type {number} + * @memberof ProxyOutpostConfig + */ + readonly accessTokenValidity: number | null; + /** + * When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + * @type {boolean} + * @memberof ProxyOutpostConfig + */ + interceptHeaderAuth?: boolean; + /** + * Get all the scope names the outpost should request, + * including custom-defined ones + * @type {Array} + * @memberof ProxyOutpostConfig + */ + readonly scopesToRequest: Array; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof ProxyOutpostConfig + */ + readonly assignedApplicationSlug: string; + /** + * Application's display Name. + * @type {string} + * @memberof ProxyOutpostConfig + */ + readonly assignedApplicationName: string; +} + + + +/** + * Check if a given object implements the ProxyOutpostConfig interface. + */ +export function instanceOfProxyOutpostConfig(value: object): value is ProxyOutpostConfig { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('externalHost' in value) || value['externalHost'] === undefined) return false; + if (!('oidcConfiguration' in value) || value['oidcConfiguration'] === undefined) return false; + if (!('accessTokenValidity' in value) || value['accessTokenValidity'] === undefined) return false; + if (!('scopesToRequest' in value) || value['scopesToRequest'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + return true; +} + +export function ProxyOutpostConfigFromJSON(json: any): ProxyOutpostConfig { + return ProxyOutpostConfigFromJSONTyped(json, false); +} + +export function ProxyOutpostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProxyOutpostConfig { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'internalHost': json['internal_host'] == null ? undefined : json['internal_host'], + 'externalHost': json['external_host'], + 'internalHostSslValidation': json['internal_host_ssl_validation'] == null ? undefined : json['internal_host_ssl_validation'], + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'], + 'oidcConfiguration': OpenIDConnectConfigurationFromJSON(json['oidc_configuration']), + 'cookieSecret': json['cookie_secret'] == null ? undefined : json['cookie_secret'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'skipPathRegex': json['skip_path_regex'] == null ? undefined : json['skip_path_regex'], + 'basicAuthEnabled': json['basic_auth_enabled'] == null ? undefined : json['basic_auth_enabled'], + 'basicAuthPasswordAttribute': json['basic_auth_password_attribute'] == null ? undefined : json['basic_auth_password_attribute'], + 'basicAuthUserAttribute': json['basic_auth_user_attribute'] == null ? undefined : json['basic_auth_user_attribute'], + 'mode': json['mode'] == null ? undefined : ProxyModeFromJSON(json['mode']), + 'cookieDomain': json['cookie_domain'] == null ? undefined : json['cookie_domain'], + 'accessTokenValidity': json['access_token_validity'], + 'interceptHeaderAuth': json['intercept_header_auth'] == null ? undefined : json['intercept_header_auth'], + 'scopesToRequest': json['scopes_to_request'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + }; +} + +export function ProxyOutpostConfigToJSON(json: any): ProxyOutpostConfig { + return ProxyOutpostConfigToJSONTyped(json, false); +} + +export function ProxyOutpostConfigToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'internal_host': value['internalHost'], + 'external_host': value['externalHost'], + 'internal_host_ssl_validation': value['internalHostSslValidation'], + 'client_id': value['clientId'], + 'client_secret': value['clientSecret'], + 'cookie_secret': value['cookieSecret'], + 'certificate': value['certificate'], + 'skip_path_regex': value['skipPathRegex'], + 'basic_auth_enabled': value['basicAuthEnabled'], + 'basic_auth_password_attribute': value['basicAuthPasswordAttribute'], + 'basic_auth_user_attribute': value['basicAuthUserAttribute'], + 'mode': ProxyModeToJSON(value['mode']), + 'cookie_domain': value['cookieDomain'], + 'intercept_header_auth': value['interceptHeaderAuth'], + }; +} + diff --git a/packages/client-ts/src/models/ProxyProvider.ts b/packages/client-ts/src/models/ProxyProvider.ts new file mode 100644 index 0000000000..115935b607 --- /dev/null +++ b/packages/client-ts/src/models/ProxyProvider.ts @@ -0,0 +1,334 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RedirectURI } from './RedirectURI'; +import { + RedirectURIFromJSON, + RedirectURIFromJSONTyped, + RedirectURIToJSON, + RedirectURIToJSONTyped, +} from './RedirectURI'; +import type { ProxyMode } from './ProxyMode'; +import { + ProxyModeFromJSON, + ProxyModeFromJSONTyped, + ProxyModeToJSON, + ProxyModeToJSONTyped, +} from './ProxyMode'; + +/** + * ProxyProvider Serializer + * @export + * @interface ProxyProvider + */ +export interface ProxyProvider { + /** + * + * @type {number} + * @memberof ProxyProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof ProxyProvider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof ProxyProvider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof ProxyProvider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof ProxyProvider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof ProxyProvider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof ProxyProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof ProxyProvider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof ProxyProvider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof ProxyProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof ProxyProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof ProxyProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof ProxyProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof ProxyProvider + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof ProxyProvider + */ + readonly clientId: string; + /** + * + * @type {string} + * @memberof ProxyProvider + */ + internalHost?: string; + /** + * + * @type {string} + * @memberof ProxyProvider + */ + externalHost: string; + /** + * Validate SSL Certificates of upstream servers + * @type {boolean} + * @memberof ProxyProvider + */ + internalHostSslValidation?: boolean; + /** + * + * @type {string} + * @memberof ProxyProvider + */ + certificate?: string | null; + /** + * Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + * @type {string} + * @memberof ProxyProvider + */ + skipPathRegex?: string; + /** + * Set a custom HTTP-Basic Authentication header based on values from authentik. + * @type {boolean} + * @memberof ProxyProvider + */ + basicAuthEnabled?: boolean; + /** + * User/Group Attribute used for the password part of the HTTP-Basic Header. + * @type {string} + * @memberof ProxyProvider + */ + 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. + * @type {string} + * @memberof ProxyProvider + */ + basicAuthUserAttribute?: string; + /** + * Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. + * @type {ProxyMode} + * @memberof ProxyProvider + */ + mode?: ProxyMode; + /** + * When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + * @type {boolean} + * @memberof ProxyProvider + */ + interceptHeaderAuth?: boolean; + /** + * + * @type {Array} + * @memberof ProxyProvider + */ + readonly redirectUris: Array; + /** + * + * @type {string} + * @memberof ProxyProvider + */ + cookieDomain?: string; + /** + * + * @type {Array} + * @memberof ProxyProvider + */ + jwtFederationSources?: Array; + /** + * + * @type {Array} + * @memberof ProxyProvider + */ + jwtFederationProviders?: Array; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof ProxyProvider + */ + accessTokenValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof ProxyProvider + */ + refreshTokenValidity?: string; + /** + * + * @type {Array} + * @memberof ProxyProvider + */ + readonly outpostSet: Array; +} + + + +/** + * Check if a given object implements the ProxyProvider interface. + */ +export function instanceOfProxyProvider(value: object): value is ProxyProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('externalHost' in value) || value['externalHost'] === undefined) return false; + if (!('redirectUris' in value) || value['redirectUris'] === undefined) return false; + if (!('outpostSet' in value) || value['outpostSet'] === undefined) return false; + return true; +} + +export function ProxyProviderFromJSON(json: any): ProxyProvider { + return ProxyProviderFromJSONTyped(json, false); +} + +export function ProxyProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProxyProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'clientId': json['client_id'], + 'internalHost': json['internal_host'] == null ? undefined : json['internal_host'], + 'externalHost': json['external_host'], + 'internalHostSslValidation': json['internal_host_ssl_validation'] == null ? undefined : json['internal_host_ssl_validation'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'skipPathRegex': json['skip_path_regex'] == null ? undefined : json['skip_path_regex'], + 'basicAuthEnabled': json['basic_auth_enabled'] == null ? undefined : json['basic_auth_enabled'], + 'basicAuthPasswordAttribute': json['basic_auth_password_attribute'] == null ? undefined : json['basic_auth_password_attribute'], + 'basicAuthUserAttribute': json['basic_auth_user_attribute'] == null ? undefined : json['basic_auth_user_attribute'], + 'mode': json['mode'] == null ? undefined : ProxyModeFromJSON(json['mode']), + 'interceptHeaderAuth': json['intercept_header_auth'] == null ? undefined : json['intercept_header_auth'], + 'redirectUris': ((json['redirect_uris'] as Array).map(RedirectURIFromJSON)), + 'cookieDomain': json['cookie_domain'] == null ? undefined : json['cookie_domain'], + 'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], + 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], + 'outpostSet': json['outpost_set'], + }; +} + +export function ProxyProviderToJSON(json: any): ProxyProvider { + return ProxyProviderToJSONTyped(json, false); +} + +export function ProxyProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'internal_host': value['internalHost'], + 'external_host': value['externalHost'], + 'internal_host_ssl_validation': value['internalHostSslValidation'], + 'certificate': value['certificate'], + 'skip_path_regex': value['skipPathRegex'], + 'basic_auth_enabled': value['basicAuthEnabled'], + 'basic_auth_password_attribute': value['basicAuthPasswordAttribute'], + 'basic_auth_user_attribute': value['basicAuthUserAttribute'], + 'mode': ProxyModeToJSON(value['mode']), + 'intercept_header_auth': value['interceptHeaderAuth'], + 'cookie_domain': value['cookieDomain'], + 'jwt_federation_sources': value['jwtFederationSources'], + 'jwt_federation_providers': value['jwtFederationProviders'], + 'access_token_validity': value['accessTokenValidity'], + 'refresh_token_validity': value['refreshTokenValidity'], + }; +} + diff --git a/packages/client-ts/src/models/ProxyProviderRequest.ts b/packages/client-ts/src/models/ProxyProviderRequest.ts new file mode 100644 index 0000000000..4dfb44719b --- /dev/null +++ b/packages/client-ts/src/models/ProxyProviderRequest.ts @@ -0,0 +1,231 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ProxyMode } from './ProxyMode'; +import { + ProxyModeFromJSON, + ProxyModeFromJSONTyped, + ProxyModeToJSON, + ProxyModeToJSONTyped, +} from './ProxyMode'; + +/** + * ProxyProvider Serializer + * @export + * @interface ProxyProviderRequest + */ +export interface ProxyProviderRequest { + /** + * + * @type {string} + * @memberof ProxyProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof ProxyProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof ProxyProviderRequest + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof ProxyProviderRequest + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof ProxyProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {string} + * @memberof ProxyProviderRequest + */ + internalHost?: string; + /** + * + * @type {string} + * @memberof ProxyProviderRequest + */ + externalHost: string; + /** + * Validate SSL Certificates of upstream servers + * @type {boolean} + * @memberof ProxyProviderRequest + */ + internalHostSslValidation?: boolean; + /** + * + * @type {string} + * @memberof ProxyProviderRequest + */ + certificate?: string | null; + /** + * Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression. + * @type {string} + * @memberof ProxyProviderRequest + */ + skipPathRegex?: string; + /** + * Set a custom HTTP-Basic Authentication header based on values from authentik. + * @type {boolean} + * @memberof ProxyProviderRequest + */ + basicAuthEnabled?: boolean; + /** + * User/Group Attribute used for the password part of the HTTP-Basic Header. + * @type {string} + * @memberof ProxyProviderRequest + */ + 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. + * @type {string} + * @memberof ProxyProviderRequest + */ + basicAuthUserAttribute?: string; + /** + * Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host. + * @type {ProxyMode} + * @memberof ProxyProviderRequest + */ + mode?: ProxyMode; + /** + * When enabled, this provider will intercept the authorization header and authenticate requests based on its value. + * @type {boolean} + * @memberof ProxyProviderRequest + */ + interceptHeaderAuth?: boolean; + /** + * + * @type {string} + * @memberof ProxyProviderRequest + */ + cookieDomain?: string; + /** + * + * @type {Array} + * @memberof ProxyProviderRequest + */ + jwtFederationSources?: Array; + /** + * + * @type {Array} + * @memberof ProxyProviderRequest + */ + jwtFederationProviders?: Array; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof ProxyProviderRequest + */ + accessTokenValidity?: string; + /** + * Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof ProxyProviderRequest + */ + refreshTokenValidity?: string; +} + + + +/** + * Check if a given object implements the ProxyProviderRequest interface. + */ +export function instanceOfProxyProviderRequest(value: object): value is ProxyProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('externalHost' in value) || value['externalHost'] === undefined) return false; + return true; +} + +export function ProxyProviderRequestFromJSON(json: any): ProxyProviderRequest { + return ProxyProviderRequestFromJSONTyped(json, false); +} + +export function ProxyProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProxyProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'internalHost': json['internal_host'] == null ? undefined : json['internal_host'], + 'externalHost': json['external_host'], + 'internalHostSslValidation': json['internal_host_ssl_validation'] == null ? undefined : json['internal_host_ssl_validation'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'skipPathRegex': json['skip_path_regex'] == null ? undefined : json['skip_path_regex'], + 'basicAuthEnabled': json['basic_auth_enabled'] == null ? undefined : json['basic_auth_enabled'], + 'basicAuthPasswordAttribute': json['basic_auth_password_attribute'] == null ? undefined : json['basic_auth_password_attribute'], + 'basicAuthUserAttribute': json['basic_auth_user_attribute'] == null ? undefined : json['basic_auth_user_attribute'], + 'mode': json['mode'] == null ? undefined : ProxyModeFromJSON(json['mode']), + 'interceptHeaderAuth': json['intercept_header_auth'] == null ? undefined : json['intercept_header_auth'], + 'cookieDomain': json['cookie_domain'] == null ? undefined : json['cookie_domain'], + 'jwtFederationSources': json['jwt_federation_sources'] == null ? undefined : json['jwt_federation_sources'], + 'jwtFederationProviders': json['jwt_federation_providers'] == null ? undefined : json['jwt_federation_providers'], + 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], + 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], + }; +} + +export function ProxyProviderRequestToJSON(json: any): ProxyProviderRequest { + return ProxyProviderRequestToJSONTyped(json, false); +} + +export function ProxyProviderRequestToJSONTyped(value?: ProxyProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'internal_host': value['internalHost'], + 'external_host': value['externalHost'], + 'internal_host_ssl_validation': value['internalHostSslValidation'], + 'certificate': value['certificate'], + 'skip_path_regex': value['skipPathRegex'], + 'basic_auth_enabled': value['basicAuthEnabled'], + 'basic_auth_password_attribute': value['basicAuthPasswordAttribute'], + 'basic_auth_user_attribute': value['basicAuthUserAttribute'], + 'mode': ProxyModeToJSON(value['mode']), + 'intercept_header_auth': value['interceptHeaderAuth'], + 'cookie_domain': value['cookieDomain'], + 'jwt_federation_sources': value['jwtFederationSources'], + 'jwt_federation_providers': value['jwtFederationProviders'], + 'access_token_validity': value['accessTokenValidity'], + 'refresh_token_validity': value['refreshTokenValidity'], + }; +} + diff --git a/packages/client-ts/src/models/RACPropertyMapping.ts b/packages/client-ts/src/models/RACPropertyMapping.ts new file mode 100644 index 0000000000..69576592e1 --- /dev/null +++ b/packages/client-ts/src/models/RACPropertyMapping.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RACPropertyMapping Serializer + * @export + * @interface RACPropertyMapping + */ +export interface RACPropertyMapping { + /** + * + * @type {string} + * @memberof RACPropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof RACPropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof RACPropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof RACPropertyMapping + */ + expression?: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof RACPropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof RACPropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof RACPropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof RACPropertyMapping + */ + readonly metaModelName: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof RACPropertyMapping + */ + staticSettings: { [key: string]: any; }; +} + +/** + * Check if a given object implements the RACPropertyMapping interface. + */ +export function instanceOfRACPropertyMapping(value: object): value is RACPropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('staticSettings' in value) || value['staticSettings'] === undefined) return false; + return true; +} + +export function RACPropertyMappingFromJSON(json: any): RACPropertyMapping { + return RACPropertyMappingFromJSONTyped(json, false); +} + +export function RACPropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): RACPropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'staticSettings': json['static_settings'], + }; +} + +export function RACPropertyMappingToJSON(json: any): RACPropertyMapping { + return RACPropertyMappingToJSONTyped(json, false); +} + +export function RACPropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'static_settings': value['staticSettings'], + }; +} + diff --git a/packages/client-ts/src/models/RACPropertyMappingRequest.ts b/packages/client-ts/src/models/RACPropertyMappingRequest.ts new file mode 100644 index 0000000000..97a75a79bf --- /dev/null +++ b/packages/client-ts/src/models/RACPropertyMappingRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RACPropertyMapping Serializer + * @export + * @interface RACPropertyMappingRequest + */ +export interface RACPropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof RACPropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof RACPropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof RACPropertyMappingRequest + */ + expression?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof RACPropertyMappingRequest + */ + staticSettings: { [key: string]: any; }; +} + +/** + * Check if a given object implements the RACPropertyMappingRequest interface. + */ +export function instanceOfRACPropertyMappingRequest(value: object): value is RACPropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('staticSettings' in value) || value['staticSettings'] === undefined) return false; + return true; +} + +export function RACPropertyMappingRequestFromJSON(json: any): RACPropertyMappingRequest { + return RACPropertyMappingRequestFromJSONTyped(json, false); +} + +export function RACPropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RACPropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + 'staticSettings': json['static_settings'], + }; +} + +export function RACPropertyMappingRequestToJSON(json: any): RACPropertyMappingRequest { + return RACPropertyMappingRequestToJSONTyped(json, false); +} + +export function RACPropertyMappingRequestToJSONTyped(value?: RACPropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'static_settings': value['staticSettings'], + }; +} + diff --git a/packages/client-ts/src/models/RACProvider.ts b/packages/client-ts/src/models/RACProvider.ts new file mode 100644 index 0000000000..a8eeccd80f --- /dev/null +++ b/packages/client-ts/src/models/RACProvider.ts @@ -0,0 +1,195 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RACProvider Serializer + * @export + * @interface RACProvider + */ +export interface RACProvider { + /** + * + * @type {number} + * @memberof RACProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof RACProvider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof RACProvider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof RACProvider + */ + authorizationFlow: string; + /** + * + * @type {Array} + * @memberof RACProvider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof RACProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof RACProvider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof RACProvider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof RACProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof RACProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof RACProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof RACProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof RACProvider + */ + readonly metaModelName: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof RACProvider + */ + settings?: { [key: string]: any; }; + /** + * + * @type {Array} + * @memberof RACProvider + */ + readonly outpostSet: Array; + /** + * 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) + * @type {string} + * @memberof RACProvider + */ + connectionExpiry?: string; + /** + * When set to true, connection tokens will be deleted upon disconnect. + * @type {boolean} + * @memberof RACProvider + */ + deleteTokenOnDisconnect?: boolean; +} + +/** + * Check if a given object implements the RACProvider interface. + */ +export function instanceOfRACProvider(value: object): value is RACProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('outpostSet' in value) || value['outpostSet'] === undefined) return false; + return true; +} + +export function RACProviderFromJSON(json: any): RACProvider { + return RACProviderFromJSONTyped(json, false); +} + +export function RACProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): RACProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'settings': json['settings'] == null ? undefined : json['settings'], + 'outpostSet': json['outpost_set'], + 'connectionExpiry': json['connection_expiry'] == null ? undefined : json['connection_expiry'], + 'deleteTokenOnDisconnect': json['delete_token_on_disconnect'] == null ? undefined : json['delete_token_on_disconnect'], + }; +} + +export function RACProviderToJSON(json: any): RACProvider { + return RACProviderToJSONTyped(json, false); +} + +export function RACProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'property_mappings': value['propertyMappings'], + 'settings': value['settings'], + 'connection_expiry': value['connectionExpiry'], + 'delete_token_on_disconnect': value['deleteTokenOnDisconnect'], + }; +} + diff --git a/packages/client-ts/src/models/RACProviderRequest.ts b/packages/client-ts/src/models/RACProviderRequest.ts new file mode 100644 index 0000000000..ea198ed9bd --- /dev/null +++ b/packages/client-ts/src/models/RACProviderRequest.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RACProvider Serializer + * @export + * @interface RACProviderRequest + */ +export interface RACProviderRequest { + /** + * + * @type {string} + * @memberof RACProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof RACProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof RACProviderRequest + */ + authorizationFlow: string; + /** + * + * @type {Array} + * @memberof RACProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {{ [key: string]: any; }} + * @memberof RACProviderRequest + */ + settings?: { [key: string]: any; }; + /** + * 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) + * @type {string} + * @memberof RACProviderRequest + */ + connectionExpiry?: string; + /** + * When set to true, connection tokens will be deleted upon disconnect. + * @type {boolean} + * @memberof RACProviderRequest + */ + deleteTokenOnDisconnect?: boolean; +} + +/** + * Check if a given object implements the RACProviderRequest interface. + */ +export function instanceOfRACProviderRequest(value: object): value is RACProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + return true; +} + +export function RACProviderRequestFromJSON(json: any): RACProviderRequest { + return RACProviderRequestFromJSONTyped(json, false); +} + +export function RACProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RACProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'settings': json['settings'] == null ? undefined : json['settings'], + 'connectionExpiry': json['connection_expiry'] == null ? undefined : json['connection_expiry'], + 'deleteTokenOnDisconnect': json['delete_token_on_disconnect'] == null ? undefined : json['delete_token_on_disconnect'], + }; +} + +export function RACProviderRequestToJSON(json: any): RACProviderRequest { + return RACProviderRequestToJSONTyped(json, false); +} + +export function RACProviderRequestToJSONTyped(value?: RACProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'property_mappings': value['propertyMappings'], + 'settings': value['settings'], + 'connection_expiry': value['connectionExpiry'], + 'delete_token_on_disconnect': value['deleteTokenOnDisconnect'], + }; +} + diff --git a/packages/client-ts/src/models/RadiusCheckAccess.ts b/packages/client-ts/src/models/RadiusCheckAccess.ts new file mode 100644 index 0000000000..997ae027ab --- /dev/null +++ b/packages/client-ts/src/models/RadiusCheckAccess.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyTestResult } from './PolicyTestResult'; +import { + PolicyTestResultFromJSON, + PolicyTestResultFromJSONTyped, + PolicyTestResultToJSON, + PolicyTestResultToJSONTyped, +} from './PolicyTestResult'; + +/** + * Base serializer class which doesn't implement create/update methods + * @export + * @interface RadiusCheckAccess + */ +export interface RadiusCheckAccess { + /** + * + * @type {string} + * @memberof RadiusCheckAccess + */ + attributes?: string; + /** + * + * @type {PolicyTestResult} + * @memberof RadiusCheckAccess + */ + access: PolicyTestResult; +} + +/** + * Check if a given object implements the RadiusCheckAccess interface. + */ +export function instanceOfRadiusCheckAccess(value: object): value is RadiusCheckAccess { + if (!('access' in value) || value['access'] === undefined) return false; + return true; +} + +export function RadiusCheckAccessFromJSON(json: any): RadiusCheckAccess { + return RadiusCheckAccessFromJSONTyped(json, false); +} + +export function RadiusCheckAccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusCheckAccess { + if (json == null) { + return json; + } + return { + + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'access': PolicyTestResultFromJSON(json['access']), + }; +} + +export function RadiusCheckAccessToJSON(json: any): RadiusCheckAccess { + return RadiusCheckAccessToJSONTyped(json, false); +} + +export function RadiusCheckAccessToJSONTyped(value?: RadiusCheckAccess | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'attributes': value['attributes'], + 'access': PolicyTestResultToJSON(value['access']), + }; +} + diff --git a/packages/client-ts/src/models/RadiusOutpostConfig.ts b/packages/client-ts/src/models/RadiusOutpostConfig.ts new file mode 100644 index 0000000000..bfd59a9069 --- /dev/null +++ b/packages/client-ts/src/models/RadiusOutpostConfig.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProvider Serializer + * @export + * @interface RadiusOutpostConfig + */ +export interface RadiusOutpostConfig { + /** + * + * @type {number} + * @memberof RadiusOutpostConfig + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof RadiusOutpostConfig + */ + name: string; + /** + * + * @type {string} + * @memberof RadiusOutpostConfig + */ + applicationSlug: string; + /** + * + * @type {string} + * @memberof RadiusOutpostConfig + */ + 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. + * @type {string} + * @memberof RadiusOutpostConfig + */ + clientNetworks?: string; + /** + * Shared secret between clients and server to hash packets. + * @type {string} + * @memberof RadiusOutpostConfig + */ + 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. + * @type {boolean} + * @memberof RadiusOutpostConfig + */ + mfaSupport?: boolean; + /** + * + * @type {string} + * @memberof RadiusOutpostConfig + */ + certificate?: string | null; +} + +/** + * Check if a given object implements the RadiusOutpostConfig interface. + */ +export function instanceOfRadiusOutpostConfig(value: object): value is RadiusOutpostConfig { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('applicationSlug' in value) || value['applicationSlug'] === undefined) return false; + if (!('authFlowSlug' in value) || value['authFlowSlug'] === undefined) return false; + return true; +} + +export function RadiusOutpostConfigFromJSON(json: any): RadiusOutpostConfig { + return RadiusOutpostConfigFromJSONTyped(json, false); +} + +export function RadiusOutpostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusOutpostConfig { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'applicationSlug': json['application_slug'], + 'authFlowSlug': json['auth_flow_slug'], + 'clientNetworks': json['client_networks'] == null ? undefined : json['client_networks'], + 'sharedSecret': json['shared_secret'] == null ? undefined : json['shared_secret'], + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + }; +} + +export function RadiusOutpostConfigToJSON(json: any): RadiusOutpostConfig { + return RadiusOutpostConfigToJSONTyped(json, false); +} + +export function RadiusOutpostConfigToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'application_slug': value['applicationSlug'], + 'auth_flow_slug': value['authFlowSlug'], + 'client_networks': value['clientNetworks'], + 'shared_secret': value['sharedSecret'], + 'mfa_support': value['mfaSupport'], + 'certificate': value['certificate'], + }; +} + diff --git a/packages/client-ts/src/models/RadiusProvider.ts b/packages/client-ts/src/models/RadiusProvider.ts new file mode 100644 index 0000000000..28e3dac91f --- /dev/null +++ b/packages/client-ts/src/models/RadiusProvider.ts @@ -0,0 +1,212 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProvider Serializer + * @export + * @interface RadiusProvider + */ +export interface RadiusProvider { + /** + * + * @type {number} + * @memberof RadiusProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof RadiusProvider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof RadiusProvider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof RadiusProvider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof RadiusProvider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof RadiusProvider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof RadiusProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof RadiusProvider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof RadiusProvider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof RadiusProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof RadiusProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof RadiusProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof RadiusProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof RadiusProvider + */ + readonly 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. + * @type {string} + * @memberof RadiusProvider + */ + clientNetworks?: string; + /** + * Shared secret between clients and server to hash packets. + * @type {string} + * @memberof RadiusProvider + */ + sharedSecret?: string; + /** + * + * @type {Array} + * @memberof RadiusProvider + */ + readonly outpostSet: Array; + /** + * 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. + * @type {boolean} + * @memberof RadiusProvider + */ + mfaSupport?: boolean; + /** + * + * @type {string} + * @memberof RadiusProvider + */ + certificate?: string | null; +} + +/** + * Check if a given object implements the RadiusProvider interface. + */ +export function instanceOfRadiusProvider(value: object): value is RadiusProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('outpostSet' in value) || value['outpostSet'] === undefined) return false; + return true; +} + +export function RadiusProviderFromJSON(json: any): RadiusProvider { + return RadiusProviderFromJSONTyped(json, false); +} + +export function RadiusProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'clientNetworks': json['client_networks'] == null ? undefined : json['client_networks'], + 'sharedSecret': json['shared_secret'] == null ? undefined : json['shared_secret'], + 'outpostSet': json['outpost_set'], + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + }; +} + +export function RadiusProviderToJSON(json: any): RadiusProvider { + return RadiusProviderToJSONTyped(json, false); +} + +export function RadiusProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'client_networks': value['clientNetworks'], + 'shared_secret': value['sharedSecret'], + 'mfa_support': value['mfaSupport'], + 'certificate': value['certificate'], + }; +} + diff --git a/packages/client-ts/src/models/RadiusProviderPropertyMapping.ts b/packages/client-ts/src/models/RadiusProviderPropertyMapping.ts new file mode 100644 index 0000000000..c54bc38591 --- /dev/null +++ b/packages/client-ts/src/models/RadiusProviderPropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProviderPropertyMapping Serializer + * @export + * @interface RadiusProviderPropertyMapping + */ +export interface RadiusProviderPropertyMapping { + /** + * + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof RadiusProviderPropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the RadiusProviderPropertyMapping interface. + */ +export function instanceOfRadiusProviderPropertyMapping(value: object): value is RadiusProviderPropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function RadiusProviderPropertyMappingFromJSON(json: any): RadiusProviderPropertyMapping { + return RadiusProviderPropertyMappingFromJSONTyped(json, false); +} + +export function RadiusProviderPropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusProviderPropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function RadiusProviderPropertyMappingToJSON(json: any): RadiusProviderPropertyMapping { + return RadiusProviderPropertyMappingToJSONTyped(json, false); +} + +export function RadiusProviderPropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/RadiusProviderPropertyMappingRequest.ts b/packages/client-ts/src/models/RadiusProviderPropertyMappingRequest.ts new file mode 100644 index 0000000000..a014f329d9 --- /dev/null +++ b/packages/client-ts/src/models/RadiusProviderPropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProviderPropertyMapping Serializer + * @export + * @interface RadiusProviderPropertyMappingRequest + */ +export interface RadiusProviderPropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof RadiusProviderPropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof RadiusProviderPropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof RadiusProviderPropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the RadiusProviderPropertyMappingRequest interface. + */ +export function instanceOfRadiusProviderPropertyMappingRequest(value: object): value is RadiusProviderPropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function RadiusProviderPropertyMappingRequestFromJSON(json: any): RadiusProviderPropertyMappingRequest { + return RadiusProviderPropertyMappingRequestFromJSONTyped(json, false); +} + +export function RadiusProviderPropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusProviderPropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function RadiusProviderPropertyMappingRequestToJSON(json: any): RadiusProviderPropertyMappingRequest { + return RadiusProviderPropertyMappingRequestToJSONTyped(json, false); +} + +export function RadiusProviderPropertyMappingRequestToJSONTyped(value?: RadiusProviderPropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/RadiusProviderRequest.ts b/packages/client-ts/src/models/RadiusProviderRequest.ts new file mode 100644 index 0000000000..fd98445f07 --- /dev/null +++ b/packages/client-ts/src/models/RadiusProviderRequest.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * RadiusProvider Serializer + * @export + * @interface RadiusProviderRequest + */ +export interface RadiusProviderRequest { + /** + * + * @type {string} + * @memberof RadiusProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof RadiusProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof RadiusProviderRequest + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof RadiusProviderRequest + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof RadiusProviderRequest + */ + propertyMappings?: Array; + /** + * 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. + * @type {string} + * @memberof RadiusProviderRequest + */ + clientNetworks?: string; + /** + * Shared secret between clients and server to hash packets. + * @type {string} + * @memberof RadiusProviderRequest + */ + 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. + * @type {boolean} + * @memberof RadiusProviderRequest + */ + mfaSupport?: boolean; + /** + * + * @type {string} + * @memberof RadiusProviderRequest + */ + certificate?: string | null; +} + +/** + * Check if a given object implements the RadiusProviderRequest interface. + */ +export function instanceOfRadiusProviderRequest(value: object): value is RadiusProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + return true; +} + +export function RadiusProviderRequestFromJSON(json: any): RadiusProviderRequest { + return RadiusProviderRequestFromJSONTyped(json, false); +} + +export function RadiusProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RadiusProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'clientNetworks': json['client_networks'] == null ? undefined : json['client_networks'], + 'sharedSecret': json['shared_secret'] == null ? undefined : json['shared_secret'], + 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + }; +} + +export function RadiusProviderRequestToJSON(json: any): RadiusProviderRequest { + return RadiusProviderRequestToJSONTyped(json, false); +} + +export function RadiusProviderRequestToJSONTyped(value?: RadiusProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'client_networks': value['clientNetworks'], + 'shared_secret': value['sharedSecret'], + 'mfa_support': value['mfaSupport'], + 'certificate': value['certificate'], + }; +} + diff --git a/packages/client-ts/src/models/RedirectChallenge.ts b/packages/client-ts/src/models/RedirectChallenge.ts new file mode 100644 index 0000000000..c50ac13350 --- /dev/null +++ b/packages/client-ts/src/models/RedirectChallenge.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge type to redirect the client + * @export + * @interface RedirectChallenge + */ +export interface RedirectChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof RedirectChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof RedirectChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof RedirectChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof RedirectChallenge + */ + to: string; +} + +/** + * Check if a given object implements the RedirectChallenge interface. + */ +export function instanceOfRedirectChallenge(value: object): value is RedirectChallenge { + if (!('to' in value) || value['to'] === undefined) return false; + return true; +} + +export function RedirectChallengeFromJSON(json: any): RedirectChallenge { + return RedirectChallengeFromJSONTyped(json, false); +} + +export function RedirectChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'to': json['to'], + }; +} + +export function RedirectChallengeToJSON(json: any): RedirectChallenge { + return RedirectChallengeToJSONTyped(json, false); +} + +export function RedirectChallengeToJSONTyped(value?: RedirectChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'to': value['to'], + }; +} + diff --git a/packages/client-ts/src/models/RedirectChallengeResponseRequest.ts b/packages/client-ts/src/models/RedirectChallengeResponseRequest.ts new file mode 100644 index 0000000000..9806bad14d --- /dev/null +++ b/packages/client-ts/src/models/RedirectChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Redirect challenge response + * @export + * @interface RedirectChallengeResponseRequest + */ +export interface RedirectChallengeResponseRequest { + /** + * + * @type {string} + * @memberof RedirectChallengeResponseRequest + */ + component?: string; + /** + * + * @type {string} + * @memberof RedirectChallengeResponseRequest + */ + to: string; +} + +/** + * Check if a given object implements the RedirectChallengeResponseRequest interface. + */ +export function instanceOfRedirectChallengeResponseRequest(value: object): value is RedirectChallengeResponseRequest { + if (!('to' in value) || value['to'] === undefined) return false; + return true; +} + +export function RedirectChallengeResponseRequestFromJSON(json: any): RedirectChallengeResponseRequest { + return RedirectChallengeResponseRequestFromJSONTyped(json, false); +} + +export function RedirectChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'to': json['to'], + }; +} + +export function RedirectChallengeResponseRequestToJSON(json: any): RedirectChallengeResponseRequest { + return RedirectChallengeResponseRequestToJSONTyped(json, false); +} + +export function RedirectChallengeResponseRequestToJSONTyped(value?: RedirectChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'to': value['to'], + }; +} + diff --git a/packages/client-ts/src/models/RedirectStage.ts b/packages/client-ts/src/models/RedirectStage.ts new file mode 100644 index 0000000000..8441d59e65 --- /dev/null +++ b/packages/client-ts/src/models/RedirectStage.ts @@ -0,0 +1,164 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; +import type { RedirectStageModeEnum } from './RedirectStageModeEnum'; +import { + RedirectStageModeEnumFromJSON, + RedirectStageModeEnumFromJSONTyped, + RedirectStageModeEnumToJSON, + RedirectStageModeEnumToJSONTyped, +} from './RedirectStageModeEnum'; + +/** + * RedirectStage Serializer + * @export + * @interface RedirectStage + */ +export interface RedirectStage { + /** + * + * @type {string} + * @memberof RedirectStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof RedirectStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof RedirectStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof RedirectStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof RedirectStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof RedirectStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof RedirectStage + */ + readonly flowSet: Array; + /** + * + * @type {boolean} + * @memberof RedirectStage + */ + keepContext?: boolean; + /** + * + * @type {RedirectStageModeEnum} + * @memberof RedirectStage + */ + mode: RedirectStageModeEnum; + /** + * + * @type {string} + * @memberof RedirectStage + */ + targetStatic?: string; + /** + * + * @type {string} + * @memberof RedirectStage + */ + targetFlow?: string | null; +} + + + +/** + * Check if a given object implements the RedirectStage interface. + */ +export function instanceOfRedirectStage(value: object): value is RedirectStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('mode' in value) || value['mode'] === undefined) return false; + return true; +} + +export function RedirectStageFromJSON(json: any): RedirectStage { + return RedirectStageFromJSONTyped(json, false); +} + +export function RedirectStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'keepContext': json['keep_context'] == null ? undefined : json['keep_context'], + 'mode': RedirectStageModeEnumFromJSON(json['mode']), + 'targetStatic': json['target_static'] == null ? undefined : json['target_static'], + 'targetFlow': json['target_flow'] == null ? undefined : json['target_flow'], + }; +} + +export function RedirectStageToJSON(json: any): RedirectStage { + return RedirectStageToJSONTyped(json, false); +} + +export function RedirectStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'keep_context': value['keepContext'], + 'mode': RedirectStageModeEnumToJSON(value['mode']), + 'target_static': value['targetStatic'], + 'target_flow': value['targetFlow'], + }; +} + diff --git a/packages/client-ts/src/models/RedirectStageModeEnum.ts b/packages/client-ts/src/models/RedirectStageModeEnum.ts new file mode 100644 index 0000000000..7c5cd47399 --- /dev/null +++ b/packages/client-ts/src/models/RedirectStageModeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const RedirectStageModeEnum = { + Static: 'static', + Flow: 'flow', + UnknownDefaultOpenApi: '11184809' +} as const; +export type RedirectStageModeEnum = typeof RedirectStageModeEnum[keyof typeof RedirectStageModeEnum]; + + +export function instanceOfRedirectStageModeEnum(value: any): boolean { + for (const key in RedirectStageModeEnum) { + if (Object.prototype.hasOwnProperty.call(RedirectStageModeEnum, key)) { + if (RedirectStageModeEnum[key as keyof typeof RedirectStageModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function RedirectStageModeEnumFromJSON(json: any): RedirectStageModeEnum { + return RedirectStageModeEnumFromJSONTyped(json, false); +} + +export function RedirectStageModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectStageModeEnum { + return json as RedirectStageModeEnum; +} + +export function RedirectStageModeEnumToJSON(value?: RedirectStageModeEnum | null): any { + return value as any; +} + +export function RedirectStageModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): RedirectStageModeEnum { + return value as RedirectStageModeEnum; +} + diff --git a/packages/client-ts/src/models/RedirectStageRequest.ts b/packages/client-ts/src/models/RedirectStageRequest.ts new file mode 100644 index 0000000000..06b288b65f --- /dev/null +++ b/packages/client-ts/src/models/RedirectStageRequest.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RedirectStageModeEnum } from './RedirectStageModeEnum'; +import { + RedirectStageModeEnumFromJSON, + RedirectStageModeEnumFromJSONTyped, + RedirectStageModeEnumToJSON, + RedirectStageModeEnumToJSONTyped, +} from './RedirectStageModeEnum'; + +/** + * RedirectStage Serializer + * @export + * @interface RedirectStageRequest + */ +export interface RedirectStageRequest { + /** + * + * @type {string} + * @memberof RedirectStageRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof RedirectStageRequest + */ + keepContext?: boolean; + /** + * + * @type {RedirectStageModeEnum} + * @memberof RedirectStageRequest + */ + mode: RedirectStageModeEnum; + /** + * + * @type {string} + * @memberof RedirectStageRequest + */ + targetStatic?: string; + /** + * + * @type {string} + * @memberof RedirectStageRequest + */ + targetFlow?: string | null; +} + + + +/** + * Check if a given object implements the RedirectStageRequest interface. + */ +export function instanceOfRedirectStageRequest(value: object): value is RedirectStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('mode' in value) || value['mode'] === undefined) return false; + return true; +} + +export function RedirectStageRequestFromJSON(json: any): RedirectStageRequest { + return RedirectStageRequestFromJSONTyped(json, false); +} + +export function RedirectStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'keepContext': json['keep_context'] == null ? undefined : json['keep_context'], + 'mode': RedirectStageModeEnumFromJSON(json['mode']), + 'targetStatic': json['target_static'] == null ? undefined : json['target_static'], + 'targetFlow': json['target_flow'] == null ? undefined : json['target_flow'], + }; +} + +export function RedirectStageRequestToJSON(json: any): RedirectStageRequest { + return RedirectStageRequestToJSONTyped(json, false); +} + +export function RedirectStageRequestToJSONTyped(value?: RedirectStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'keep_context': value['keepContext'], + 'mode': RedirectStageModeEnumToJSON(value['mode']), + 'target_static': value['targetStatic'], + 'target_flow': value['targetFlow'], + }; +} + diff --git a/packages/client-ts/src/models/RedirectURI.ts b/packages/client-ts/src/models/RedirectURI.ts new file mode 100644 index 0000000000..8ffd1e6340 --- /dev/null +++ b/packages/client-ts/src/models/RedirectURI.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { MatchingModeEnum } from './MatchingModeEnum'; +import { + MatchingModeEnumFromJSON, + MatchingModeEnumFromJSONTyped, + MatchingModeEnumToJSON, + MatchingModeEnumToJSONTyped, +} from './MatchingModeEnum'; + +/** + * A single allowed redirect URI entry + * @export + * @interface RedirectURI + */ +export interface RedirectURI { + /** + * + * @type {MatchingModeEnum} + * @memberof RedirectURI + */ + matchingMode: MatchingModeEnum; + /** + * + * @type {string} + * @memberof RedirectURI + */ + url: string; +} + + + +/** + * Check if a given object implements the RedirectURI interface. + */ +export function instanceOfRedirectURI(value: object): value is RedirectURI { + if (!('matchingMode' in value) || value['matchingMode'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function RedirectURIFromJSON(json: any): RedirectURI { + return RedirectURIFromJSONTyped(json, false); +} + +export function RedirectURIFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectURI { + if (json == null) { + return json; + } + return { + + 'matchingMode': MatchingModeEnumFromJSON(json['matching_mode']), + 'url': json['url'], + }; +} + +export function RedirectURIToJSON(json: any): RedirectURI { + return RedirectURIToJSONTyped(json, false); +} + +export function RedirectURIToJSONTyped(value?: RedirectURI | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'matching_mode': MatchingModeEnumToJSON(value['matchingMode']), + 'url': value['url'], + }; +} + diff --git a/packages/client-ts/src/models/RedirectURIRequest.ts b/packages/client-ts/src/models/RedirectURIRequest.ts new file mode 100644 index 0000000000..b6e8310b00 --- /dev/null +++ b/packages/client-ts/src/models/RedirectURIRequest.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { MatchingModeEnum } from './MatchingModeEnum'; +import { + MatchingModeEnumFromJSON, + MatchingModeEnumFromJSONTyped, + MatchingModeEnumToJSON, + MatchingModeEnumToJSONTyped, +} from './MatchingModeEnum'; + +/** + * A single allowed redirect URI entry + * @export + * @interface RedirectURIRequest + */ +export interface RedirectURIRequest { + /** + * + * @type {MatchingModeEnum} + * @memberof RedirectURIRequest + */ + matchingMode: MatchingModeEnum; + /** + * + * @type {string} + * @memberof RedirectURIRequest + */ + url: string; +} + + + +/** + * Check if a given object implements the RedirectURIRequest interface. + */ +export function instanceOfRedirectURIRequest(value: object): value is RedirectURIRequest { + if (!('matchingMode' in value) || value['matchingMode'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function RedirectURIRequestFromJSON(json: any): RedirectURIRequest { + return RedirectURIRequestFromJSONTyped(json, false); +} + +export function RedirectURIRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RedirectURIRequest { + if (json == null) { + return json; + } + return { + + 'matchingMode': MatchingModeEnumFromJSON(json['matching_mode']), + 'url': json['url'], + }; +} + +export function RedirectURIRequestToJSON(json: any): RedirectURIRequest { + return RedirectURIRequestToJSONTyped(json, false); +} + +export function RedirectURIRequestToJSONTyped(value?: RedirectURIRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'matching_mode': MatchingModeEnumToJSON(value['matchingMode']), + 'url': value['url'], + }; +} + diff --git a/packages/client-ts/src/models/RelatedGroup.ts b/packages/client-ts/src/models/RelatedGroup.ts new file mode 100644 index 0000000000..cdc0461d47 --- /dev/null +++ b/packages/client-ts/src/models/RelatedGroup.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Stripped down group serializer to show relevant children/parents for groups + * @export + * @interface RelatedGroup + */ +export interface RelatedGroup { + /** + * + * @type {string} + * @memberof RelatedGroup + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof RelatedGroup + */ + name: string; + /** + * Users added to this group will be superusers. + * @type {boolean} + * @memberof RelatedGroup + */ + isSuperuser?: boolean; + /** + * + * @type {{ [key: string]: any; }} + * @memberof RelatedGroup + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof RelatedGroup + */ + readonly groupUuid: string; +} + +/** + * Check if a given object implements the RelatedGroup interface. + */ +export function instanceOfRelatedGroup(value: object): value is RelatedGroup { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('groupUuid' in value) || value['groupUuid'] === undefined) return false; + return true; +} + +export function RelatedGroupFromJSON(json: any): RelatedGroup { + return RelatedGroupFromJSONTyped(json, false); +} + +export function RelatedGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): RelatedGroup { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'groupUuid': json['group_uuid'], + }; +} + +export function RelatedGroupToJSON(json: any): RelatedGroup { + return RelatedGroupToJSONTyped(json, false); +} + +export function RelatedGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'is_superuser': value['isSuperuser'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/Reputation.ts b/packages/client-ts/src/models/Reputation.ts new file mode 100644 index 0000000000..5a16ed87ca --- /dev/null +++ b/packages/client-ts/src/models/Reputation.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Reputation Serializer + * @export + * @interface Reputation + */ +export interface Reputation { + /** + * + * @type {string} + * @memberof Reputation + */ + pk?: string; + /** + * + * @type {string} + * @memberof Reputation + */ + identifier: string; + /** + * + * @type {string} + * @memberof Reputation + */ + ip: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Reputation + */ + ipGeoData?: { [key: string]: any; }; + /** + * + * @type {{ [key: string]: any; }} + * @memberof Reputation + */ + ipAsnData?: { [key: string]: any; }; + /** + * + * @type {number} + * @memberof Reputation + */ + score?: number; + /** + * + * @type {Date} + * @memberof Reputation + */ + readonly updated: Date; +} + +/** + * Check if a given object implements the Reputation interface. + */ +export function instanceOfReputation(value: object): value is Reputation { + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('ip' in value) || value['ip'] === undefined) return false; + if (!('updated' in value) || value['updated'] === undefined) return false; + return true; +} + +export function ReputationFromJSON(json: any): Reputation { + return ReputationFromJSONTyped(json, false); +} + +export function ReputationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reputation { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'] == null ? undefined : json['pk'], + 'identifier': json['identifier'], + 'ip': json['ip'], + 'ipGeoData': json['ip_geo_data'] == null ? undefined : json['ip_geo_data'], + 'ipAsnData': json['ip_asn_data'] == null ? undefined : json['ip_asn_data'], + 'score': json['score'] == null ? undefined : json['score'], + 'updated': (new Date(json['updated'])), + }; +} + +export function ReputationToJSON(json: any): Reputation { + return ReputationToJSONTyped(json, false); +} + +export function ReputationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'identifier': value['identifier'], + 'ip': value['ip'], + 'ip_geo_data': value['ipGeoData'], + 'ip_asn_data': value['ipAsnData'], + 'score': value['score'], + }; +} + diff --git a/packages/client-ts/src/models/ReputationPolicy.ts b/packages/client-ts/src/models/ReputationPolicy.ts new file mode 100644 index 0000000000..b913c11edc --- /dev/null +++ b/packages/client-ts/src/models/ReputationPolicy.ts @@ -0,0 +1,146 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Reputation Policy Serializer + * @export + * @interface ReputationPolicy + */ +export interface ReputationPolicy { + /** + * + * @type {string} + * @memberof ReputationPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof ReputationPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof ReputationPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof ReputationPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof ReputationPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof ReputationPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof ReputationPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof ReputationPolicy + */ + readonly boundTo: number; + /** + * + * @type {boolean} + * @memberof ReputationPolicy + */ + checkIp?: boolean; + /** + * + * @type {boolean} + * @memberof ReputationPolicy + */ + checkUsername?: boolean; + /** + * + * @type {number} + * @memberof ReputationPolicy + */ + threshold?: number; +} + +/** + * Check if a given object implements the ReputationPolicy interface. + */ +export function instanceOfReputationPolicy(value: object): value is ReputationPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + return true; +} + +export function ReputationPolicyFromJSON(json: any): ReputationPolicy { + return ReputationPolicyFromJSONTyped(json, false); +} + +export function ReputationPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReputationPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'checkIp': json['check_ip'] == null ? undefined : json['check_ip'], + 'checkUsername': json['check_username'] == null ? undefined : json['check_username'], + 'threshold': json['threshold'] == null ? undefined : json['threshold'], + }; +} + +export function ReputationPolicyToJSON(json: any): ReputationPolicy { + return ReputationPolicyToJSONTyped(json, false); +} + +export function ReputationPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'check_ip': value['checkIp'], + 'check_username': value['checkUsername'], + 'threshold': value['threshold'], + }; +} + diff --git a/packages/client-ts/src/models/ReputationPolicyRequest.ts b/packages/client-ts/src/models/ReputationPolicyRequest.ts new file mode 100644 index 0000000000..06177a84fd --- /dev/null +++ b/packages/client-ts/src/models/ReputationPolicyRequest.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Reputation Policy Serializer + * @export + * @interface ReputationPolicyRequest + */ +export interface ReputationPolicyRequest { + /** + * + * @type {string} + * @memberof ReputationPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof ReputationPolicyRequest + */ + executionLogging?: boolean; + /** + * + * @type {boolean} + * @memberof ReputationPolicyRequest + */ + checkIp?: boolean; + /** + * + * @type {boolean} + * @memberof ReputationPolicyRequest + */ + checkUsername?: boolean; + /** + * + * @type {number} + * @memberof ReputationPolicyRequest + */ + threshold?: number; +} + +/** + * Check if a given object implements the ReputationPolicyRequest interface. + */ +export function instanceOfReputationPolicyRequest(value: object): value is ReputationPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function ReputationPolicyRequestFromJSON(json: any): ReputationPolicyRequest { + return ReputationPolicyRequestFromJSONTyped(json, false); +} + +export function ReputationPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReputationPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'checkIp': json['check_ip'] == null ? undefined : json['check_ip'], + 'checkUsername': json['check_username'] == null ? undefined : json['check_username'], + 'threshold': json['threshold'] == null ? undefined : json['threshold'], + }; +} + +export function ReputationPolicyRequestToJSON(json: any): ReputationPolicyRequest { + return ReputationPolicyRequestToJSONTyped(json, false); +} + +export function ReputationPolicyRequestToJSONTyped(value?: ReputationPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'check_ip': value['checkIp'], + 'check_username': value['checkUsername'], + 'threshold': value['threshold'], + }; +} + diff --git a/packages/client-ts/src/models/Review.ts b/packages/client-ts/src/models/Review.ts new file mode 100644 index 0000000000..236d3d229c --- /dev/null +++ b/packages/client-ts/src/models/Review.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ReviewerUser } from './ReviewerUser'; +import { + ReviewerUserFromJSON, + ReviewerUserFromJSONTyped, + ReviewerUserToJSON, + ReviewerUserToJSONTyped, +} from './ReviewerUser'; + +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface Review + */ +export interface Review { + /** + * + * @type {string} + * @memberof Review + */ + readonly id: string; + /** + * + * @type {string} + * @memberof Review + */ + iteration: string; + /** + * + * @type {ReviewerUser} + * @memberof Review + */ + readonly reviewer: ReviewerUser; + /** + * + * @type {Date} + * @memberof Review + */ + readonly timestamp: Date; + /** + * + * @type {string} + * @memberof Review + */ + note?: string | null; +} + +/** + * Check if a given object implements the Review interface. + */ +export function instanceOfReview(value: object): value is Review { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('iteration' in value) || value['iteration'] === undefined) return false; + if (!('reviewer' in value) || value['reviewer'] === undefined) return false; + if (!('timestamp' in value) || value['timestamp'] === undefined) return false; + return true; +} + +export function ReviewFromJSON(json: any): Review { + return ReviewFromJSONTyped(json, false); +} + +export function ReviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): Review { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'iteration': json['iteration'], + 'reviewer': ReviewerUserFromJSON(json['reviewer']), + 'timestamp': (new Date(json['timestamp'])), + 'note': json['note'] == null ? undefined : json['note'], + }; +} + +export function ReviewToJSON(json: any): Review { + return ReviewToJSONTyped(json, false); +} + +export function ReviewToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'iteration': value['iteration'], + 'note': value['note'], + }; +} + diff --git a/packages/client-ts/src/models/ReviewRequest.ts b/packages/client-ts/src/models/ReviewRequest.ts new file mode 100644 index 0000000000..09cf401986 --- /dev/null +++ b/packages/client-ts/src/models/ReviewRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Mixin to validate that a valid enterprise license + * exists before allowing to save the object + * @export + * @interface ReviewRequest + */ +export interface ReviewRequest { + /** + * + * @type {string} + * @memberof ReviewRequest + */ + iteration: string; + /** + * + * @type {string} + * @memberof ReviewRequest + */ + note?: string | null; +} + +/** + * Check if a given object implements the ReviewRequest interface. + */ +export function instanceOfReviewRequest(value: object): value is ReviewRequest { + if (!('iteration' in value) || value['iteration'] === undefined) return false; + return true; +} + +export function ReviewRequestFromJSON(json: any): ReviewRequest { + return ReviewRequestFromJSONTyped(json, false); +} + +export function ReviewRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReviewRequest { + if (json == null) { + return json; + } + return { + + 'iteration': json['iteration'], + 'note': json['note'] == null ? undefined : json['note'], + }; +} + +export function ReviewRequestToJSON(json: any): ReviewRequest { + return ReviewRequestToJSONTyped(json, false); +} + +export function ReviewRequestToJSONTyped(value?: ReviewRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'iteration': value['iteration'], + 'note': value['note'], + }; +} + diff --git a/packages/client-ts/src/models/ReviewerGroup.ts b/packages/client-ts/src/models/ReviewerGroup.ts new file mode 100644 index 0000000000..8143318bf5 --- /dev/null +++ b/packages/client-ts/src/models/ReviewerGroup.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ReviewerGroup + */ +export interface ReviewerGroup { + /** + * + * @type {string} + * @memberof ReviewerGroup + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof ReviewerGroup + */ + name: string; +} + +/** + * Check if a given object implements the ReviewerGroup interface. + */ +export function instanceOfReviewerGroup(value: object): value is ReviewerGroup { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function ReviewerGroupFromJSON(json: any): ReviewerGroup { + return ReviewerGroupFromJSONTyped(json, false); +} + +export function ReviewerGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReviewerGroup { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + }; +} + +export function ReviewerGroupToJSON(json: any): ReviewerGroup { + return ReviewerGroupToJSONTyped(json, false); +} + +export function ReviewerGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/ReviewerUser.ts b/packages/client-ts/src/models/ReviewerUser.ts new file mode 100644 index 0000000000..26390f1f10 --- /dev/null +++ b/packages/client-ts/src/models/ReviewerUser.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ReviewerUser + */ +export interface ReviewerUser { + /** + * + * @type {number} + * @memberof ReviewerUser + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof ReviewerUser + */ + readonly uuid: string; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof ReviewerUser + */ + username: string; + /** + * User's display name. + * @type {string} + * @memberof ReviewerUser + */ + name: string; +} + +/** + * Check if a given object implements the ReviewerUser interface. + */ +export function instanceOfReviewerUser(value: object): value is ReviewerUser { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('uuid' in value) || value['uuid'] === undefined) return false; + if (!('username' in value) || value['username'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function ReviewerUserFromJSON(json: any): ReviewerUser { + return ReviewerUserFromJSONTyped(json, false); +} + +export function ReviewerUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReviewerUser { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'uuid': json['uuid'], + 'username': json['username'], + 'name': json['name'], + }; +} + +export function ReviewerUserToJSON(json: any): ReviewerUser { + return ReviewerUserToJSONTyped(json, false); +} + +export function ReviewerUserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/Role.ts b/packages/client-ts/src/models/Role.ts new file mode 100644 index 0000000000..a044dc2e73 --- /dev/null +++ b/packages/client-ts/src/models/Role.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Role serializer + * @export + * @interface Role + */ +export interface Role { + /** + * + * @type {string} + * @memberof Role + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Role + */ + name: string; +} + +/** + * Check if a given object implements the Role interface. + */ +export function instanceOfRole(value: object): value is Role { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function RoleFromJSON(json: any): Role { + return RoleFromJSONTyped(json, false); +} + +export function RoleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Role { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + }; +} + +export function RoleToJSON(json: any): Role { + return RoleToJSONTyped(json, false); +} + +export function RoleToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/RoleAssignedObjectPermission.ts b/packages/client-ts/src/models/RoleAssignedObjectPermission.ts new file mode 100644 index 0000000000..d081bd5454 --- /dev/null +++ b/packages/client-ts/src/models/RoleAssignedObjectPermission.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { RoleModelPermission } from './RoleModelPermission'; +import { + RoleModelPermissionFromJSON, + RoleModelPermissionFromJSONTyped, + RoleModelPermissionToJSON, + RoleModelPermissionToJSONTyped, +} from './RoleModelPermission'; +import type { RoleObjectPermission } from './RoleObjectPermission'; +import { + RoleObjectPermissionFromJSON, + RoleObjectPermissionFromJSONTyped, + RoleObjectPermissionToJSON, + RoleObjectPermissionToJSONTyped, +} from './RoleObjectPermission'; + +/** + * Roles assigned object permission serializer + * @export + * @interface RoleAssignedObjectPermission + */ +export interface RoleAssignedObjectPermission { + /** + * + * @type {string} + * @memberof RoleAssignedObjectPermission + */ + readonly rolePk: string; + /** + * + * @type {string} + * @memberof RoleAssignedObjectPermission + */ + readonly name: string; + /** + * + * @type {Array} + * @memberof RoleAssignedObjectPermission + */ + objectPermissions: Array; + /** + * + * @type {Array} + * @memberof RoleAssignedObjectPermission + */ + modelPermissions: Array; +} + +/** + * Check if a given object implements the RoleAssignedObjectPermission interface. + */ +export function instanceOfRoleAssignedObjectPermission(value: object): value is RoleAssignedObjectPermission { + if (!('rolePk' in value) || value['rolePk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('objectPermissions' in value) || value['objectPermissions'] === undefined) return false; + if (!('modelPermissions' in value) || value['modelPermissions'] === undefined) return false; + return true; +} + +export function RoleAssignedObjectPermissionFromJSON(json: any): RoleAssignedObjectPermission { + return RoleAssignedObjectPermissionFromJSONTyped(json, false); +} + +export function RoleAssignedObjectPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleAssignedObjectPermission { + if (json == null) { + return json; + } + return { + + 'rolePk': json['role_pk'], + 'name': json['name'], + 'objectPermissions': ((json['object_permissions'] as Array).map(RoleObjectPermissionFromJSON)), + 'modelPermissions': ((json['model_permissions'] as Array).map(RoleModelPermissionFromJSON)), + }; +} + +export function RoleAssignedObjectPermissionToJSON(json: any): RoleAssignedObjectPermission { + return RoleAssignedObjectPermissionToJSONTyped(json, false); +} + +export function RoleAssignedObjectPermissionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'object_permissions': ((value['objectPermissions'] as Array).map(RoleObjectPermissionToJSON)), + 'model_permissions': ((value['modelPermissions'] as Array).map(RoleModelPermissionToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/RoleModelPermission.ts b/packages/client-ts/src/models/RoleModelPermission.ts new file mode 100644 index 0000000000..996e52eda8 --- /dev/null +++ b/packages/client-ts/src/models/RoleModelPermission.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Role-bound object level permission + * @export + * @interface RoleModelPermission + */ +export interface RoleModelPermission { + /** + * + * @type {number} + * @memberof RoleModelPermission + */ + readonly id: number; + /** + * + * @type {string} + * @memberof RoleModelPermission + */ + readonly codename: string; + /** + * + * @type {string} + * @memberof RoleModelPermission + */ + readonly model: string; + /** + * + * @type {string} + * @memberof RoleModelPermission + */ + readonly appLabel: string; + /** + * + * @type {string} + * @memberof RoleModelPermission + */ + readonly name: string; +} + +/** + * Check if a given object implements the RoleModelPermission interface. + */ +export function instanceOfRoleModelPermission(value: object): value is RoleModelPermission { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('codename' in value) || value['codename'] === undefined) return false; + if (!('model' in value) || value['model'] === undefined) return false; + if (!('appLabel' in value) || value['appLabel'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function RoleModelPermissionFromJSON(json: any): RoleModelPermission { + return RoleModelPermissionFromJSONTyped(json, false); +} + +export function RoleModelPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleModelPermission { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'codename': json['codename'], + 'model': json['model'], + 'appLabel': json['app_label'], + 'name': json['name'], + }; +} + +export function RoleModelPermissionToJSON(json: any): RoleModelPermission { + return RoleModelPermissionToJSONTyped(json, false); +} + +export function RoleModelPermissionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/RoleObjectPermission.ts b/packages/client-ts/src/models/RoleObjectPermission.ts new file mode 100644 index 0000000000..9807a683ae --- /dev/null +++ b/packages/client-ts/src/models/RoleObjectPermission.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Role-bound object level permission + * @export + * @interface RoleObjectPermission + */ +export interface RoleObjectPermission { + /** + * + * @type {number} + * @memberof RoleObjectPermission + */ + readonly id: number; + /** + * + * @type {string} + * @memberof RoleObjectPermission + */ + readonly codename: string; + /** + * + * @type {string} + * @memberof RoleObjectPermission + */ + readonly model: string; + /** + * + * @type {string} + * @memberof RoleObjectPermission + */ + readonly appLabel: string; + /** + * + * @type {string} + * @memberof RoleObjectPermission + */ + objectPk: string; + /** + * + * @type {string} + * @memberof RoleObjectPermission + */ + readonly name: string; +} + +/** + * Check if a given object implements the RoleObjectPermission interface. + */ +export function instanceOfRoleObjectPermission(value: object): value is RoleObjectPermission { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('codename' in value) || value['codename'] === undefined) return false; + if (!('model' in value) || value['model'] === undefined) return false; + if (!('appLabel' in value) || value['appLabel'] === undefined) return false; + if (!('objectPk' in value) || value['objectPk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function RoleObjectPermissionFromJSON(json: any): RoleObjectPermission { + return RoleObjectPermissionFromJSONTyped(json, false); +} + +export function RoleObjectPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleObjectPermission { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'codename': json['codename'], + 'model': json['model'], + 'appLabel': json['app_label'], + 'objectPk': json['object_pk'], + 'name': json['name'], + }; +} + +export function RoleObjectPermissionToJSON(json: any): RoleObjectPermission { + return RoleObjectPermissionToJSONTyped(json, false); +} + +export function RoleObjectPermissionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'object_pk': value['objectPk'], + }; +} + diff --git a/packages/client-ts/src/models/RoleRequest.ts b/packages/client-ts/src/models/RoleRequest.ts new file mode 100644 index 0000000000..70ae3ad452 --- /dev/null +++ b/packages/client-ts/src/models/RoleRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Role serializer + * @export + * @interface RoleRequest + */ +export interface RoleRequest { + /** + * + * @type {string} + * @memberof RoleRequest + */ + name: string; +} + +/** + * Check if a given object implements the RoleRequest interface. + */ +export function instanceOfRoleRequest(value: object): value is RoleRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function RoleRequestFromJSON(json: any): RoleRequest { + return RoleRequestFromJSONTyped(json, false); +} + +export function RoleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function RoleRequestToJSON(json: any): RoleRequest { + return RoleRequestToJSONTyped(json, false); +} + +export function RoleRequestToJSONTyped(value?: RoleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/SAMLBindingsEnum.ts b/packages/client-ts/src/models/SAMLBindingsEnum.ts new file mode 100644 index 0000000000..dd57262fbf --- /dev/null +++ b/packages/client-ts/src/models/SAMLBindingsEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SAMLBindingsEnum = { + Redirect: 'redirect', + Post: 'post', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SAMLBindingsEnum = typeof SAMLBindingsEnum[keyof typeof SAMLBindingsEnum]; + + +export function instanceOfSAMLBindingsEnum(value: any): boolean { + for (const key in SAMLBindingsEnum) { + if (Object.prototype.hasOwnProperty.call(SAMLBindingsEnum, key)) { + if (SAMLBindingsEnum[key as keyof typeof SAMLBindingsEnum] === value) { + return true; + } + } + } + return false; +} + +export function SAMLBindingsEnumFromJSON(json: any): SAMLBindingsEnum { + return SAMLBindingsEnumFromJSONTyped(json, false); +} + +export function SAMLBindingsEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLBindingsEnum { + return json as SAMLBindingsEnum; +} + +export function SAMLBindingsEnumToJSON(value?: SAMLBindingsEnum | null): any { + return value as any; +} + +export function SAMLBindingsEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SAMLBindingsEnum { + return value as SAMLBindingsEnum; +} + diff --git a/packages/client-ts/src/models/SAMLLogoutMethods.ts b/packages/client-ts/src/models/SAMLLogoutMethods.ts new file mode 100644 index 0000000000..43cb66b232 --- /dev/null +++ b/packages/client-ts/src/models/SAMLLogoutMethods.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SAMLLogoutMethods = { + FrontchannelIframe: 'frontchannel_iframe', + FrontchannelNative: 'frontchannel_native', + Backchannel: 'backchannel', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SAMLLogoutMethods = typeof SAMLLogoutMethods[keyof typeof SAMLLogoutMethods]; + + +export function instanceOfSAMLLogoutMethods(value: any): boolean { + for (const key in SAMLLogoutMethods) { + if (Object.prototype.hasOwnProperty.call(SAMLLogoutMethods, key)) { + if (SAMLLogoutMethods[key as keyof typeof SAMLLogoutMethods] === value) { + return true; + } + } + } + return false; +} + +export function SAMLLogoutMethodsFromJSON(json: any): SAMLLogoutMethods { + return SAMLLogoutMethodsFromJSONTyped(json, false); +} + +export function SAMLLogoutMethodsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLLogoutMethods { + return json as SAMLLogoutMethods; +} + +export function SAMLLogoutMethodsToJSON(value?: SAMLLogoutMethods | null): any { + return value as any; +} + +export function SAMLLogoutMethodsToJSONTyped(value: any, ignoreDiscriminator: boolean): SAMLLogoutMethods { + return value as SAMLLogoutMethods; +} + diff --git a/packages/client-ts/src/models/SAMLMetadata.ts b/packages/client-ts/src/models/SAMLMetadata.ts new file mode 100644 index 0000000000..23a8ab1217 --- /dev/null +++ b/packages/client-ts/src/models/SAMLMetadata.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAML Provider Metadata serializer + * @export + * @interface SAMLMetadata + */ +export interface SAMLMetadata { + /** + * + * @type {string} + * @memberof SAMLMetadata + */ + readonly metadata: string; + /** + * + * @type {string} + * @memberof SAMLMetadata + */ + readonly downloadUrl: string; +} + +/** + * Check if a given object implements the SAMLMetadata interface. + */ +export function instanceOfSAMLMetadata(value: object): value is SAMLMetadata { + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('downloadUrl' in value) || value['downloadUrl'] === undefined) return false; + return true; +} + +export function SAMLMetadataFromJSON(json: any): SAMLMetadata { + return SAMLMetadataFromJSONTyped(json, false); +} + +export function SAMLMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLMetadata { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'], + 'downloadUrl': json['download_url'], + }; +} + +export function SAMLMetadataToJSON(json: any): SAMLMetadata { + return SAMLMetadataToJSONTyped(json, false); +} + +export function SAMLMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/SAMLNameIDPolicyEnum.ts b/packages/client-ts/src/models/SAMLNameIDPolicyEnum.ts new file mode 100644 index 0000000000..8e9d61919e --- /dev/null +++ b/packages/client-ts/src/models/SAMLNameIDPolicyEnum.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SAMLNameIDPolicyEnum = { + UrnOasisNamesTcSaml11NameidFormatEmailAddress: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', + UrnOasisNamesTcSaml20NameidFormatPersistent: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', + UrnOasisNamesTcSaml11NameidFormatX509SubjectName: 'urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName', + UrnOasisNamesTcSaml20NameidFormatWindowsDomainQualifiedName: 'urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName', + UrnOasisNamesTcSaml20NameidFormatTransient: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', + UrnOasisNamesTcSaml11NameidFormatUnspecified: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SAMLNameIDPolicyEnum = typeof SAMLNameIDPolicyEnum[keyof typeof SAMLNameIDPolicyEnum]; + + +export function instanceOfSAMLNameIDPolicyEnum(value: any): boolean { + for (const key in SAMLNameIDPolicyEnum) { + if (Object.prototype.hasOwnProperty.call(SAMLNameIDPolicyEnum, key)) { + if (SAMLNameIDPolicyEnum[key as keyof typeof SAMLNameIDPolicyEnum] === value) { + return true; + } + } + } + return false; +} + +export function SAMLNameIDPolicyEnumFromJSON(json: any): SAMLNameIDPolicyEnum { + return SAMLNameIDPolicyEnumFromJSONTyped(json, false); +} + +export function SAMLNameIDPolicyEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLNameIDPolicyEnum { + return json as SAMLNameIDPolicyEnum; +} + +export function SAMLNameIDPolicyEnumToJSON(value?: SAMLNameIDPolicyEnum | null): any { + return value as any; +} + +export function SAMLNameIDPolicyEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SAMLNameIDPolicyEnum { + return value as SAMLNameIDPolicyEnum; +} + diff --git a/packages/client-ts/src/models/SAMLPropertyMapping.ts b/packages/client-ts/src/models/SAMLPropertyMapping.ts new file mode 100644 index 0000000000..b15dc7a136 --- /dev/null +++ b/packages/client-ts/src/models/SAMLPropertyMapping.ts @@ -0,0 +1,140 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAMLPropertyMapping Serializer + * @export + * @interface SAMLPropertyMapping + */ +export interface SAMLPropertyMapping { + /** + * + * @type {string} + * @memberof SAMLPropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof SAMLPropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SAMLPropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof SAMLPropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof SAMLPropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SAMLPropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SAMLPropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SAMLPropertyMapping + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof SAMLPropertyMapping + */ + samlName: string; + /** + * + * @type {string} + * @memberof SAMLPropertyMapping + */ + friendlyName?: string | null; +} + +/** + * Check if a given object implements the SAMLPropertyMapping interface. + */ +export function instanceOfSAMLPropertyMapping(value: object): value is SAMLPropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('samlName' in value) || value['samlName'] === undefined) return false; + return true; +} + +export function SAMLPropertyMappingFromJSON(json: any): SAMLPropertyMapping { + return SAMLPropertyMappingFromJSONTyped(json, false); +} + +export function SAMLPropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLPropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'samlName': json['saml_name'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + }; +} + +export function SAMLPropertyMappingToJSON(json: any): SAMLPropertyMapping { + return SAMLPropertyMappingToJSONTyped(json, false); +} + +export function SAMLPropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'saml_name': value['samlName'], + 'friendly_name': value['friendlyName'], + }; +} + diff --git a/packages/client-ts/src/models/SAMLPropertyMappingRequest.ts b/packages/client-ts/src/models/SAMLPropertyMappingRequest.ts new file mode 100644 index 0000000000..6cdae467e3 --- /dev/null +++ b/packages/client-ts/src/models/SAMLPropertyMappingRequest.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAMLPropertyMapping Serializer + * @export + * @interface SAMLPropertyMappingRequest + */ +export interface SAMLPropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof SAMLPropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SAMLPropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof SAMLPropertyMappingRequest + */ + expression: string; + /** + * + * @type {string} + * @memberof SAMLPropertyMappingRequest + */ + samlName: string; + /** + * + * @type {string} + * @memberof SAMLPropertyMappingRequest + */ + friendlyName?: string | null; +} + +/** + * Check if a given object implements the SAMLPropertyMappingRequest interface. + */ +export function instanceOfSAMLPropertyMappingRequest(value: object): value is SAMLPropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('samlName' in value) || value['samlName'] === undefined) return false; + return true; +} + +export function SAMLPropertyMappingRequestFromJSON(json: any): SAMLPropertyMappingRequest { + return SAMLPropertyMappingRequestFromJSONTyped(json, false); +} + +export function SAMLPropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLPropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'samlName': json['saml_name'], + 'friendlyName': json['friendly_name'] == null ? undefined : json['friendly_name'], + }; +} + +export function SAMLPropertyMappingRequestToJSON(json: any): SAMLPropertyMappingRequest { + return SAMLPropertyMappingRequestToJSONTyped(json, false); +} + +export function SAMLPropertyMappingRequestToJSONTyped(value?: SAMLPropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'saml_name': value['samlName'], + 'friendly_name': value['friendlyName'], + }; +} + diff --git a/packages/client-ts/src/models/SAMLProvider.ts b/packages/client-ts/src/models/SAMLProvider.ts new file mode 100644 index 0000000000..f157efaa6a --- /dev/null +++ b/packages/client-ts/src/models/SAMLProvider.ts @@ -0,0 +1,443 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; +import type { SAMLLogoutMethods } from './SAMLLogoutMethods'; +import { + SAMLLogoutMethodsFromJSON, + SAMLLogoutMethodsFromJSONTyped, + SAMLLogoutMethodsToJSON, + SAMLLogoutMethodsToJSONTyped, +} from './SAMLLogoutMethods'; +import type { SAMLBindingsEnum } from './SAMLBindingsEnum'; +import { + SAMLBindingsEnumFromJSON, + SAMLBindingsEnumFromJSONTyped, + SAMLBindingsEnumToJSON, + SAMLBindingsEnumToJSONTyped, +} from './SAMLBindingsEnum'; + +/** + * SAMLProvider Serializer + * @export + * @interface SAMLProvider + */ +export interface SAMLProvider { + /** + * + * @type {number} + * @memberof SAMLProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof SAMLProvider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof SAMLProvider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof SAMLProvider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof SAMLProvider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof SAMLProvider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof SAMLProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof SAMLProvider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof SAMLProvider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof SAMLProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof SAMLProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof SAMLProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SAMLProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SAMLProvider + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof SAMLProvider + */ + acsUrl: string; + /** + * Single Logout Service URL where the logout response should be sent. + * @type {string} + * @memberof SAMLProvider + */ + slsUrl?: string; + /** + * Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. + * @type {string} + * @memberof SAMLProvider + */ + audience?: string; + /** + * Also known as EntityID + * @type {string} + * @memberof SAMLProvider + */ + issuer?: string; + /** + * Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + * @type {string} + * @memberof SAMLProvider + */ + assertionValidNotBefore?: string; + /** + * Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof SAMLProvider + */ + assertionValidNotOnOrAfter?: string; + /** + * Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof SAMLProvider + */ + sessionValidNotOnOrAfter?: string; + /** + * Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + * @type {string} + * @memberof SAMLProvider + */ + nameIdMapping?: string | null; + /** + * Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate. + * @type {string} + * @memberof SAMLProvider + */ + authnContextClassRefMapping?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof SAMLProvider + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof SAMLProvider + */ + signatureAlgorithm?: SignatureAlgorithmEnum; + /** + * Keypair used to sign outgoing Responses going to the Service Provider. + * @type {string} + * @memberof SAMLProvider + */ + signingKp?: string | null; + /** + * When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + * @type {string} + * @memberof SAMLProvider + */ + verificationKp?: string | null; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof SAMLProvider + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof SAMLProvider + */ + signAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLProvider + */ + signResponse?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLProvider + */ + signLogoutRequest?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLProvider + */ + signLogoutResponse?: boolean; + /** + * This determines how authentik sends the response back to the Service Provider. + * @type {SAMLBindingsEnum} + * @memberof SAMLProvider + */ + spBinding?: SAMLBindingsEnum; + /** + * This determines how authentik sends the logout response back to the Service Provider. + * @type {SAMLBindingsEnum} + * @memberof SAMLProvider + */ + slsBinding?: SAMLBindingsEnum; + /** + * Method to use for logout. Front-channel iframe loads all logout URLs simultaneously in hidden iframes. Front-channel native uses your active browser tab to send post requests and redirect to providers. Back-channel sends logout requests directly from the server without user interaction (requires POST SLS binding). + * @type {SAMLLogoutMethods} + * @memberof SAMLProvider + */ + logoutMethod?: SAMLLogoutMethods; + /** + * Default relay_state value for IDP-initiated logins + * @type {string} + * @memberof SAMLProvider + */ + defaultRelayState?: string; + /** + * + * @type {SAMLNameIDPolicyEnum} + * @memberof SAMLProvider + */ + defaultNameIdPolicy?: SAMLNameIDPolicyEnum; + /** + * Get metadata download URL + * @type {string} + * @memberof SAMLProvider + */ + readonly urlDownloadMetadata: string; + /** + * Get SSO Post URL + * @type {string} + * @memberof SAMLProvider + */ + readonly urlSsoPost: string; + /** + * Get SSO Redirect URL + * @type {string} + * @memberof SAMLProvider + */ + readonly urlSsoRedirect: string; + /** + * Get SSO IDP-Initiated URL + * @type {string} + * @memberof SAMLProvider + */ + readonly urlSsoInit: string; + /** + * Get SLO POST URL + * @type {string} + * @memberof SAMLProvider + */ + readonly urlSloPost: string; + /** + * Get SLO redirect URL + * @type {string} + * @memberof SAMLProvider + */ + readonly urlSloRedirect: string; +} + + + +/** + * Check if a given object implements the SAMLProvider interface. + */ +export function instanceOfSAMLProvider(value: object): value is SAMLProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('acsUrl' in value) || value['acsUrl'] === undefined) return false; + if (!('urlDownloadMetadata' in value) || value['urlDownloadMetadata'] === undefined) return false; + if (!('urlSsoPost' in value) || value['urlSsoPost'] === undefined) return false; + if (!('urlSsoRedirect' in value) || value['urlSsoRedirect'] === undefined) return false; + if (!('urlSsoInit' in value) || value['urlSsoInit'] === undefined) return false; + if (!('urlSloPost' in value) || value['urlSloPost'] === undefined) return false; + if (!('urlSloRedirect' in value) || value['urlSloRedirect'] === undefined) return false; + return true; +} + +export function SAMLProviderFromJSON(json: any): SAMLProvider { + return SAMLProviderFromJSONTyped(json, false); +} + +export function SAMLProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'acsUrl': json['acs_url'], + 'slsUrl': json['sls_url'] == null ? undefined : json['sls_url'], + 'audience': json['audience'] == null ? undefined : json['audience'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'], + 'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'], + 'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'], + 'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'], + 'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'], + 'signResponse': json['sign_response'] == null ? undefined : json['sign_response'], + 'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'], + 'signLogoutResponse': json['sign_logout_response'] == null ? undefined : json['sign_logout_response'], + 'spBinding': json['sp_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['sp_binding']), + 'slsBinding': json['sls_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['sls_binding']), + 'logoutMethod': json['logout_method'] == null ? undefined : SAMLLogoutMethodsFromJSON(json['logout_method']), + 'defaultRelayState': json['default_relay_state'] == null ? undefined : json['default_relay_state'], + 'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['default_name_id_policy']), + 'urlDownloadMetadata': json['url_download_metadata'], + 'urlSsoPost': json['url_sso_post'], + 'urlSsoRedirect': json['url_sso_redirect'], + 'urlSsoInit': json['url_sso_init'], + 'urlSloPost': json['url_slo_post'], + 'urlSloRedirect': json['url_slo_redirect'], + }; +} + +export function SAMLProviderToJSON(json: any): SAMLProvider { + return SAMLProviderToJSONTyped(json, false); +} + +export function SAMLProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'acs_url': value['acsUrl'], + 'sls_url': value['slsUrl'], + 'audience': value['audience'], + 'issuer': value['issuer'], + 'assertion_valid_not_before': value['assertionValidNotBefore'], + 'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'], + 'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'], + 'name_id_mapping': value['nameIdMapping'], + 'authn_context_class_ref_mapping': value['authnContextClassRefMapping'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'signing_kp': value['signingKp'], + 'verification_kp': value['verificationKp'], + 'encryption_kp': value['encryptionKp'], + 'sign_assertion': value['signAssertion'], + 'sign_response': value['signResponse'], + 'sign_logout_request': value['signLogoutRequest'], + 'sign_logout_response': value['signLogoutResponse'], + 'sp_binding': SAMLBindingsEnumToJSON(value['spBinding']), + 'sls_binding': SAMLBindingsEnumToJSON(value['slsBinding']), + 'logout_method': SAMLLogoutMethodsToJSON(value['logoutMethod']), + 'default_relay_state': value['defaultRelayState'], + 'default_name_id_policy': SAMLNameIDPolicyEnumToJSON(value['defaultNameIdPolicy']), + }; +} + diff --git a/packages/client-ts/src/models/SAMLProviderRequest.ts b/packages/client-ts/src/models/SAMLProviderRequest.ts new file mode 100644 index 0000000000..90cd473140 --- /dev/null +++ b/packages/client-ts/src/models/SAMLProviderRequest.ts @@ -0,0 +1,323 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; +import type { SAMLLogoutMethods } from './SAMLLogoutMethods'; +import { + SAMLLogoutMethodsFromJSON, + SAMLLogoutMethodsFromJSONTyped, + SAMLLogoutMethodsToJSON, + SAMLLogoutMethodsToJSONTyped, +} from './SAMLLogoutMethods'; +import type { SAMLBindingsEnum } from './SAMLBindingsEnum'; +import { + SAMLBindingsEnumFromJSON, + SAMLBindingsEnumFromJSONTyped, + SAMLBindingsEnumToJSON, + SAMLBindingsEnumToJSONTyped, +} from './SAMLBindingsEnum'; + +/** + * SAMLProvider Serializer + * @export + * @interface SAMLProviderRequest + */ +export interface SAMLProviderRequest { + /** + * + * @type {string} + * @memberof SAMLProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof SAMLProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof SAMLProviderRequest + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof SAMLProviderRequest + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof SAMLProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {string} + * @memberof SAMLProviderRequest + */ + acsUrl: string; + /** + * Single Logout Service URL where the logout response should be sent. + * @type {string} + * @memberof SAMLProviderRequest + */ + slsUrl?: string; + /** + * Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added. + * @type {string} + * @memberof SAMLProviderRequest + */ + audience?: string; + /** + * Also known as EntityID + * @type {string} + * @memberof SAMLProviderRequest + */ + issuer?: string; + /** + * Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + * @type {string} + * @memberof SAMLProviderRequest + */ + assertionValidNotBefore?: string; + /** + * Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof SAMLProviderRequest + */ + assertionValidNotOnOrAfter?: string; + /** + * Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof SAMLProviderRequest + */ + sessionValidNotOnOrAfter?: string; + /** + * Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + * @type {string} + * @memberof SAMLProviderRequest + */ + nameIdMapping?: string | null; + /** + * Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate. + * @type {string} + * @memberof SAMLProviderRequest + */ + authnContextClassRefMapping?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof SAMLProviderRequest + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof SAMLProviderRequest + */ + signatureAlgorithm?: SignatureAlgorithmEnum; + /** + * Keypair used to sign outgoing Responses going to the Service Provider. + * @type {string} + * @memberof SAMLProviderRequest + */ + signingKp?: string | null; + /** + * When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + * @type {string} + * @memberof SAMLProviderRequest + */ + verificationKp?: string | null; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof SAMLProviderRequest + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof SAMLProviderRequest + */ + signAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLProviderRequest + */ + signResponse?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLProviderRequest + */ + signLogoutRequest?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLProviderRequest + */ + signLogoutResponse?: boolean; + /** + * This determines how authentik sends the response back to the Service Provider. + * @type {SAMLBindingsEnum} + * @memberof SAMLProviderRequest + */ + spBinding?: SAMLBindingsEnum; + /** + * This determines how authentik sends the logout response back to the Service Provider. + * @type {SAMLBindingsEnum} + * @memberof SAMLProviderRequest + */ + slsBinding?: SAMLBindingsEnum; + /** + * Method to use for logout. Front-channel iframe loads all logout URLs simultaneously in hidden iframes. Front-channel native uses your active browser tab to send post requests and redirect to providers. Back-channel sends logout requests directly from the server without user interaction (requires POST SLS binding). + * @type {SAMLLogoutMethods} + * @memberof SAMLProviderRequest + */ + logoutMethod?: SAMLLogoutMethods; + /** + * Default relay_state value for IDP-initiated logins + * @type {string} + * @memberof SAMLProviderRequest + */ + defaultRelayState?: string; + /** + * + * @type {SAMLNameIDPolicyEnum} + * @memberof SAMLProviderRequest + */ + defaultNameIdPolicy?: SAMLNameIDPolicyEnum; +} + + + +/** + * Check if a given object implements the SAMLProviderRequest interface. + */ +export function instanceOfSAMLProviderRequest(value: object): value is SAMLProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('acsUrl' in value) || value['acsUrl'] === undefined) return false; + return true; +} + +export function SAMLProviderRequestFromJSON(json: any): SAMLProviderRequest { + return SAMLProviderRequestFromJSONTyped(json, false); +} + +export function SAMLProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'acsUrl': json['acs_url'], + 'slsUrl': json['sls_url'] == null ? undefined : json['sls_url'], + 'audience': json['audience'] == null ? undefined : json['audience'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'], + 'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'], + 'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'], + 'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'], + 'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'], + 'signResponse': json['sign_response'] == null ? undefined : json['sign_response'], + 'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'], + 'signLogoutResponse': json['sign_logout_response'] == null ? undefined : json['sign_logout_response'], + 'spBinding': json['sp_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['sp_binding']), + 'slsBinding': json['sls_binding'] == null ? undefined : SAMLBindingsEnumFromJSON(json['sls_binding']), + 'logoutMethod': json['logout_method'] == null ? undefined : SAMLLogoutMethodsFromJSON(json['logout_method']), + 'defaultRelayState': json['default_relay_state'] == null ? undefined : json['default_relay_state'], + 'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['default_name_id_policy']), + }; +} + +export function SAMLProviderRequestToJSON(json: any): SAMLProviderRequest { + return SAMLProviderRequestToJSONTyped(json, false); +} + +export function SAMLProviderRequestToJSONTyped(value?: SAMLProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'acs_url': value['acsUrl'], + 'sls_url': value['slsUrl'], + 'audience': value['audience'], + 'issuer': value['issuer'], + 'assertion_valid_not_before': value['assertionValidNotBefore'], + 'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'], + 'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'], + 'name_id_mapping': value['nameIdMapping'], + 'authn_context_class_ref_mapping': value['authnContextClassRefMapping'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'signing_kp': value['signingKp'], + 'verification_kp': value['verificationKp'], + 'encryption_kp': value['encryptionKp'], + 'sign_assertion': value['signAssertion'], + 'sign_response': value['signResponse'], + 'sign_logout_request': value['signLogoutRequest'], + 'sign_logout_response': value['signLogoutResponse'], + 'sp_binding': SAMLBindingsEnumToJSON(value['spBinding']), + 'sls_binding': SAMLBindingsEnumToJSON(value['slsBinding']), + 'logout_method': SAMLLogoutMethodsToJSON(value['logoutMethod']), + 'default_relay_state': value['defaultRelayState'], + 'default_name_id_policy': SAMLNameIDPolicyEnumToJSON(value['defaultNameIdPolicy']), + }; +} + diff --git a/packages/client-ts/src/models/SAMLSource.ts b/packages/client-ts/src/models/SAMLSource.ts new file mode 100644 index 0000000000..ee9522a4c2 --- /dev/null +++ b/packages/client-ts/src/models/SAMLSource.ts @@ -0,0 +1,408 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { BindingTypeEnum } from './BindingTypeEnum'; +import { + BindingTypeEnumFromJSON, + BindingTypeEnumFromJSONTyped, + BindingTypeEnumToJSON, + BindingTypeEnumToJSONTyped, +} from './BindingTypeEnum'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * SAMLSource Serializer + * @export + * @interface SAMLSource + */ +export interface SAMLSource { + /** + * + * @type {string} + * @memberof SAMLSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof SAMLSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof SAMLSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof SAMLSource + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof SAMLSource + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof SAMLSource + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof SAMLSource + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof SAMLSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof SAMLSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof SAMLSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SAMLSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SAMLSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SAMLSource + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof SAMLSource + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof SAMLSource + */ + 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. + * @type {string} + * @memberof SAMLSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof SAMLSource + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof SAMLSource + */ + icon?: string; + /** + * + * @type {string} + * @memberof SAMLSource + */ + readonly iconUrl: string; + /** + * + * @type {ThemedUrls} + * @memberof SAMLSource + */ + readonly iconThemedUrls: ThemedUrls | null; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof SAMLSource + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Flow used before authentication. + * @type {string} + * @memberof SAMLSource + */ + preAuthenticationFlow: string; + /** + * Also known as Entity ID. Defaults the Metadata URL. + * @type {string} + * @memberof SAMLSource + */ + issuer?: string; + /** + * URL that the initial Login request is sent to. + * @type {string} + * @memberof SAMLSource + */ + ssoUrl: string; + /** + * Optional URL if your IDP supports Single-Logout. + * @type {string} + * @memberof SAMLSource + */ + sloUrl?: string | null; + /** + * Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. + * @type {boolean} + * @memberof SAMLSource + */ + allowIdpInitiated?: boolean; + /** + * NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + * @type {SAMLNameIDPolicyEnum} + * @memberof SAMLSource + */ + nameIdPolicy?: SAMLNameIDPolicyEnum; + /** + * + * @type {BindingTypeEnum} + * @memberof SAMLSource + */ + bindingType?: BindingTypeEnum; + /** + * When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + * @type {string} + * @memberof SAMLSource + */ + verificationKp?: string | null; + /** + * Keypair used to sign outgoing Responses going to the Identity Provider. + * @type {string} + * @memberof SAMLSource + */ + signingKp?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof SAMLSource + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof SAMLSource + */ + 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). + * @type {string} + * @memberof SAMLSource + */ + temporaryUserDeleteAfter?: string; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof SAMLSource + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof SAMLSource + */ + signedAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLSource + */ + signedResponse?: boolean; +} + + + +/** + * Check if a given object implements the SAMLSource interface. + */ +export function instanceOfSAMLSource(value: object): value is SAMLSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + if (!('preAuthenticationFlow' in value) || value['preAuthenticationFlow'] === undefined) return false; + if (!('ssoUrl' in value) || value['ssoUrl'] === undefined) return false; + return true; +} + +export function SAMLSourceFromJSON(json: any): SAMLSource { + return SAMLSourceFromJSONTyped(json, false); +} + +export function SAMLSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'preAuthenticationFlow': json['pre_authentication_flow'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'ssoUrl': json['sso_url'], + 'sloUrl': json['slo_url'] == null ? undefined : json['slo_url'], + 'allowIdpInitiated': json['allow_idp_initiated'] == null ? undefined : json['allow_idp_initiated'], + 'nameIdPolicy': json['name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['name_id_policy']), + 'bindingType': json['binding_type'] == null ? undefined : BindingTypeEnumFromJSON(json['binding_type']), + 'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'], + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'temporaryUserDeleteAfter': json['temporary_user_delete_after'] == null ? undefined : json['temporary_user_delete_after'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signedAssertion': json['signed_assertion'] == null ? undefined : json['signed_assertion'], + 'signedResponse': json['signed_response'] == null ? undefined : json['signed_response'], + }; +} + +export function SAMLSourceToJSON(json: any): SAMLSource { + return SAMLSourceToJSONTyped(json, false); +} + +export function SAMLSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'pre_authentication_flow': value['preAuthenticationFlow'], + 'issuer': value['issuer'], + 'sso_url': value['ssoUrl'], + 'slo_url': value['sloUrl'], + 'allow_idp_initiated': value['allowIdpInitiated'], + 'name_id_policy': SAMLNameIDPolicyEnumToJSON(value['nameIdPolicy']), + 'binding_type': BindingTypeEnumToJSON(value['bindingType']), + 'verification_kp': value['verificationKp'], + 'signing_kp': value['signingKp'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'temporary_user_delete_after': value['temporaryUserDeleteAfter'], + 'encryption_kp': value['encryptionKp'], + 'signed_assertion': value['signedAssertion'], + 'signed_response': value['signedResponse'], + }; +} + diff --git a/packages/client-ts/src/models/SAMLSourcePropertyMapping.ts b/packages/client-ts/src/models/SAMLSourcePropertyMapping.ts new file mode 100644 index 0000000000..f7251ea3df --- /dev/null +++ b/packages/client-ts/src/models/SAMLSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAMLSourcePropertyMapping Serializer + * @export + * @interface SAMLSourcePropertyMapping + */ +export interface SAMLSourcePropertyMapping { + /** + * + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SAMLSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the SAMLSourcePropertyMapping interface. + */ +export function instanceOfSAMLSourcePropertyMapping(value: object): value is SAMLSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function SAMLSourcePropertyMappingFromJSON(json: any): SAMLSourcePropertyMapping { + return SAMLSourcePropertyMappingFromJSONTyped(json, false); +} + +export function SAMLSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function SAMLSourcePropertyMappingToJSON(json: any): SAMLSourcePropertyMapping { + return SAMLSourcePropertyMappingToJSONTyped(json, false); +} + +export function SAMLSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/SAMLSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/SAMLSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..98ae915cfe --- /dev/null +++ b/packages/client-ts/src/models/SAMLSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SAMLSourcePropertyMapping Serializer + * @export + * @interface SAMLSourcePropertyMappingRequest + */ +export interface SAMLSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof SAMLSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SAMLSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof SAMLSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the SAMLSourcePropertyMappingRequest interface. + */ +export function instanceOfSAMLSourcePropertyMappingRequest(value: object): value is SAMLSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function SAMLSourcePropertyMappingRequestFromJSON(json: any): SAMLSourcePropertyMappingRequest { + return SAMLSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function SAMLSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function SAMLSourcePropertyMappingRequestToJSON(json: any): SAMLSourcePropertyMappingRequest { + return SAMLSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function SAMLSourcePropertyMappingRequestToJSONTyped(value?: SAMLSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/SAMLSourceRequest.ts b/packages/client-ts/src/models/SAMLSourceRequest.ts new file mode 100644 index 0000000000..bacca9d86e --- /dev/null +++ b/packages/client-ts/src/models/SAMLSourceRequest.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { BindingTypeEnum } from './BindingTypeEnum'; +import { + BindingTypeEnumFromJSON, + BindingTypeEnumFromJSONTyped, + BindingTypeEnumToJSON, + BindingTypeEnumToJSONTyped, +} from './BindingTypeEnum'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; +import type { GroupMatchingModeEnum } from './GroupMatchingModeEnum'; +import { + GroupMatchingModeEnumFromJSON, + GroupMatchingModeEnumFromJSONTyped, + GroupMatchingModeEnumToJSON, + GroupMatchingModeEnumToJSONTyped, +} from './GroupMatchingModeEnum'; + +/** + * SAMLSource Serializer + * @export + * @interface SAMLSourceRequest + */ +export interface SAMLSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof SAMLSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof SAMLSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof SAMLSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof SAMLSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof SAMLSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof SAMLSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof SAMLSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof SAMLSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof SAMLSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof SAMLSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof SAMLSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof SAMLSourceRequest + */ + icon?: string; + /** + * How the source determines if an existing group should be used or a new group created. + * @type {GroupMatchingModeEnum} + * @memberof SAMLSourceRequest + */ + groupMatchingMode?: GroupMatchingModeEnum; + /** + * Flow used before authentication. + * @type {string} + * @memberof SAMLSourceRequest + */ + preAuthenticationFlow: string; + /** + * Also known as Entity ID. Defaults the Metadata URL. + * @type {string} + * @memberof SAMLSourceRequest + */ + issuer?: string; + /** + * URL that the initial Login request is sent to. + * @type {string} + * @memberof SAMLSourceRequest + */ + ssoUrl: string; + /** + * Optional URL if your IDP supports Single-Logout. + * @type {string} + * @memberof SAMLSourceRequest + */ + sloUrl?: string | null; + /** + * Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done. + * @type {boolean} + * @memberof SAMLSourceRequest + */ + allowIdpInitiated?: boolean; + /** + * NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent. + * @type {SAMLNameIDPolicyEnum} + * @memberof SAMLSourceRequest + */ + nameIdPolicy?: SAMLNameIDPolicyEnum; + /** + * + * @type {BindingTypeEnum} + * @memberof SAMLSourceRequest + */ + bindingType?: BindingTypeEnum; + /** + * When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default. + * @type {string} + * @memberof SAMLSourceRequest + */ + verificationKp?: string | null; + /** + * Keypair used to sign outgoing Responses going to the Identity Provider. + * @type {string} + * @memberof SAMLSourceRequest + */ + signingKp?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof SAMLSourceRequest + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof SAMLSourceRequest + */ + 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). + * @type {string} + * @memberof SAMLSourceRequest + */ + temporaryUserDeleteAfter?: string; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof SAMLSourceRequest + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof SAMLSourceRequest + */ + signedAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof SAMLSourceRequest + */ + signedResponse?: boolean; +} + + + +/** + * Check if a given object implements the SAMLSourceRequest interface. + */ +export function instanceOfSAMLSourceRequest(value: object): value is SAMLSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('preAuthenticationFlow' in value) || value['preAuthenticationFlow'] === undefined) return false; + if (!('ssoUrl' in value) || value['ssoUrl'] === undefined) return false; + return true; +} + +export function SAMLSourceRequestFromJSON(json: any): SAMLSourceRequest { + return SAMLSourceRequestFromJSONTyped(json, false); +} + +export function SAMLSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SAMLSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'groupMatchingMode': json['group_matching_mode'] == null ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']), + 'preAuthenticationFlow': json['pre_authentication_flow'], + 'issuer': json['issuer'] == null ? undefined : json['issuer'], + 'ssoUrl': json['sso_url'], + 'sloUrl': json['slo_url'] == null ? undefined : json['slo_url'], + 'allowIdpInitiated': json['allow_idp_initiated'] == null ? undefined : json['allow_idp_initiated'], + 'nameIdPolicy': json['name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['name_id_policy']), + 'bindingType': json['binding_type'] == null ? undefined : BindingTypeEnumFromJSON(json['binding_type']), + 'verificationKp': json['verification_kp'] == null ? undefined : json['verification_kp'], + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'temporaryUserDeleteAfter': json['temporary_user_delete_after'] == null ? undefined : json['temporary_user_delete_after'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signedAssertion': json['signed_assertion'] == null ? undefined : json['signed_assertion'], + 'signedResponse': json['signed_response'] == null ? undefined : json['signed_response'], + }; +} + +export function SAMLSourceRequestToJSON(json: any): SAMLSourceRequest { + return SAMLSourceRequestToJSONTyped(json, false); +} + +export function SAMLSourceRequestToJSONTyped(value?: SAMLSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'group_matching_mode': GroupMatchingModeEnumToJSON(value['groupMatchingMode']), + 'pre_authentication_flow': value['preAuthenticationFlow'], + 'issuer': value['issuer'], + 'sso_url': value['ssoUrl'], + 'slo_url': value['sloUrl'], + 'allow_idp_initiated': value['allowIdpInitiated'], + 'name_id_policy': SAMLNameIDPolicyEnumToJSON(value['nameIdPolicy']), + 'binding_type': BindingTypeEnumToJSON(value['bindingType']), + 'verification_kp': value['verificationKp'], + 'signing_kp': value['signingKp'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'temporary_user_delete_after': value['temporaryUserDeleteAfter'], + 'encryption_kp': value['encryptionKp'], + 'signed_assertion': value['signedAssertion'], + 'signed_response': value['signedResponse'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMAuthenticationModeEnum.ts b/packages/client-ts/src/models/SCIMAuthenticationModeEnum.ts new file mode 100644 index 0000000000..45660c8c2d --- /dev/null +++ b/packages/client-ts/src/models/SCIMAuthenticationModeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SCIMAuthenticationModeEnum = { + Token: 'token', + Oauth: 'oauth', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SCIMAuthenticationModeEnum = typeof SCIMAuthenticationModeEnum[keyof typeof SCIMAuthenticationModeEnum]; + + +export function instanceOfSCIMAuthenticationModeEnum(value: any): boolean { + for (const key in SCIMAuthenticationModeEnum) { + if (Object.prototype.hasOwnProperty.call(SCIMAuthenticationModeEnum, key)) { + if (SCIMAuthenticationModeEnum[key as keyof typeof SCIMAuthenticationModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SCIMAuthenticationModeEnumFromJSON(json: any): SCIMAuthenticationModeEnum { + return SCIMAuthenticationModeEnumFromJSONTyped(json, false); +} + +export function SCIMAuthenticationModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMAuthenticationModeEnum { + return json as SCIMAuthenticationModeEnum; +} + +export function SCIMAuthenticationModeEnumToJSON(value?: SCIMAuthenticationModeEnum | null): any { + return value as any; +} + +export function SCIMAuthenticationModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SCIMAuthenticationModeEnum { + return value as SCIMAuthenticationModeEnum; +} + diff --git a/packages/client-ts/src/models/SCIMMapping.ts b/packages/client-ts/src/models/SCIMMapping.ts new file mode 100644 index 0000000000..c6a76245ee --- /dev/null +++ b/packages/client-ts/src/models/SCIMMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMMapping Serializer + * @export + * @interface SCIMMapping + */ +export interface SCIMMapping { + /** + * + * @type {string} + * @memberof SCIMMapping + */ + readonly pk: 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. + * @type {string} + * @memberof SCIMMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SCIMMapping + */ + name: string; + /** + * + * @type {string} + * @memberof SCIMMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof SCIMMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SCIMMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SCIMMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SCIMMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the SCIMMapping interface. + */ +export function instanceOfSCIMMapping(value: object): value is SCIMMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function SCIMMappingFromJSON(json: any): SCIMMapping { + return SCIMMappingFromJSONTyped(json, false); +} + +export function SCIMMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function SCIMMappingToJSON(json: any): SCIMMapping { + return SCIMMappingToJSONTyped(json, false); +} + +export function SCIMMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMMappingRequest.ts b/packages/client-ts/src/models/SCIMMappingRequest.ts new file mode 100644 index 0000000000..dc041fe874 --- /dev/null +++ b/packages/client-ts/src/models/SCIMMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMMapping Serializer + * @export + * @interface SCIMMappingRequest + */ +export interface SCIMMappingRequest { + /** + * 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. + * @type {string} + * @memberof SCIMMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SCIMMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof SCIMMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the SCIMMappingRequest interface. + */ +export function instanceOfSCIMMappingRequest(value: object): value is SCIMMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function SCIMMappingRequestFromJSON(json: any): SCIMMappingRequest { + return SCIMMappingRequestFromJSONTyped(json, false); +} + +export function SCIMMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function SCIMMappingRequestToJSON(json: any): SCIMMappingRequest { + return SCIMMappingRequestToJSONTyped(json, false); +} + +export function SCIMMappingRequestToJSONTyped(value?: SCIMMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMProvider.ts b/packages/client-ts/src/models/SCIMProvider.ts new file mode 100644 index 0000000000..06c04883a3 --- /dev/null +++ b/packages/client-ts/src/models/SCIMProvider.ts @@ -0,0 +1,260 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CompatibilityModeEnum } from './CompatibilityModeEnum'; +import { + CompatibilityModeEnumFromJSON, + CompatibilityModeEnumFromJSONTyped, + CompatibilityModeEnumToJSON, + CompatibilityModeEnumToJSONTyped, +} from './CompatibilityModeEnum'; +import type { SCIMAuthenticationModeEnum } from './SCIMAuthenticationModeEnum'; +import { + SCIMAuthenticationModeEnumFromJSON, + SCIMAuthenticationModeEnumFromJSONTyped, + SCIMAuthenticationModeEnumToJSON, + SCIMAuthenticationModeEnumToJSONTyped, +} from './SCIMAuthenticationModeEnum'; + +/** + * SCIMProvider Serializer + * @export + * @interface SCIMProvider + */ +export interface SCIMProvider { + /** + * + * @type {number} + * @memberof SCIMProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof SCIMProvider + */ + name: string; + /** + * + * @type {Array} + * @memberof SCIMProvider + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof SCIMProvider + */ + propertyMappingsGroup?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof SCIMProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof SCIMProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof SCIMProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof SCIMProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SCIMProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SCIMProvider + */ + readonly metaModelName: string; + /** + * Base URL to SCIM requests, usually ends in /v2 + * @type {string} + * @memberof SCIMProvider + */ + url: string; + /** + * + * @type {boolean} + * @memberof SCIMProvider + */ + verifyCertificates?: boolean; + /** + * Authentication token + * @type {string} + * @memberof SCIMProvider + */ + token?: string; + /** + * + * @type {SCIMAuthenticationModeEnum} + * @memberof SCIMProvider + */ + authMode?: SCIMAuthenticationModeEnum; + /** + * OAuth Source used for authentication + * @type {string} + * @memberof SCIMProvider + */ + authOauth?: string | null; + /** + * Additional OAuth parameters, such as grant_type + * @type {{ [key: string]: any; }} + * @memberof SCIMProvider + */ + authOauthParams?: { [key: string]: any; }; + /** + * Alter authentik behavior for vendor-specific SCIM implementations. + * @type {CompatibilityModeEnum} + * @memberof SCIMProvider + */ + compatibilityMode?: CompatibilityModeEnum; + /** + * Cache duration for ServiceProviderConfig responses. Set minutes=0 to disable. + * @type {string} + * @memberof SCIMProvider + */ + serviceProviderConfigCacheTimeout?: string; + /** + * + * @type {boolean} + * @memberof SCIMProvider + */ + excludeUsersServiceAccount?: boolean; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof SCIMProvider + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof SCIMProvider + */ + syncPageTimeout?: string; + /** + * Group filters used to define sync-scope for groups. + * @type {Array} + * @memberof SCIMProvider + */ + groupFilters?: Array; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof SCIMProvider + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the SCIMProvider interface. + */ +export function instanceOfSCIMProvider(value: object): value is SCIMProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function SCIMProviderFromJSON(json: any): SCIMProvider { + return SCIMProviderFromJSONTyped(json, false); +} + +export function SCIMProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'component': json['component'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'url': json['url'], + 'verifyCertificates': json['verify_certificates'] == null ? undefined : json['verify_certificates'], + 'token': json['token'] == null ? undefined : json['token'], + 'authMode': json['auth_mode'] == null ? undefined : SCIMAuthenticationModeEnumFromJSON(json['auth_mode']), + 'authOauth': json['auth_oauth'] == null ? undefined : json['auth_oauth'], + 'authOauthParams': json['auth_oauth_params'] == null ? undefined : json['auth_oauth_params'], + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : CompatibilityModeEnumFromJSON(json['compatibility_mode']), + 'serviceProviderConfigCacheTimeout': json['service_provider_config_cache_timeout'] == null ? undefined : json['service_provider_config_cache_timeout'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'groupFilters': json['group_filters'] == null ? undefined : json['group_filters'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function SCIMProviderToJSON(json: any): SCIMProvider { + return SCIMProviderToJSONTyped(json, false); +} + +export function SCIMProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'url': value['url'], + 'verify_certificates': value['verifyCertificates'], + 'token': value['token'], + 'auth_mode': SCIMAuthenticationModeEnumToJSON(value['authMode']), + 'auth_oauth': value['authOauth'], + 'auth_oauth_params': value['authOauthParams'], + 'compatibility_mode': CompatibilityModeEnumToJSON(value['compatibilityMode']), + 'service_provider_config_cache_timeout': value['serviceProviderConfigCacheTimeout'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'group_filters': value['groupFilters'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMProviderGroup.ts b/packages/client-ts/src/models/SCIMProviderGroup.ts new file mode 100644 index 0000000000..f678723dd5 --- /dev/null +++ b/packages/client-ts/src/models/SCIMProviderGroup.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * SCIMProviderGroup Serializer + * @export + * @interface SCIMProviderGroup + */ +export interface SCIMProviderGroup { + /** + * + * @type {string} + * @memberof SCIMProviderGroup + */ + readonly id: string; + /** + * + * @type {string} + * @memberof SCIMProviderGroup + */ + scimId: string; + /** + * + * @type {string} + * @memberof SCIMProviderGroup + */ + group: string; + /** + * + * @type {PartialGroup} + * @memberof SCIMProviderGroup + */ + readonly groupObj: PartialGroup; + /** + * + * @type {number} + * @memberof SCIMProviderGroup + */ + provider: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof SCIMProviderGroup + */ + readonly attributes: { [key: string]: any; }; +} + +/** + * Check if a given object implements the SCIMProviderGroup interface. + */ +export function instanceOfSCIMProviderGroup(value: object): value is SCIMProviderGroup { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('scimId' in value) || value['scimId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('groupObj' in value) || value['groupObj'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function SCIMProviderGroupFromJSON(json: any): SCIMProviderGroup { + return SCIMProviderGroupFromJSONTyped(json, false); +} + +export function SCIMProviderGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProviderGroup { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'scimId': json['scim_id'], + 'group': json['group'], + 'groupObj': PartialGroupFromJSON(json['group_obj']), + 'provider': json['provider'], + 'attributes': json['attributes'], + }; +} + +export function SCIMProviderGroupToJSON(json: any): SCIMProviderGroup { + return SCIMProviderGroupToJSONTyped(json, false); +} + +export function SCIMProviderGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scim_id': value['scimId'], + 'group': value['group'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMProviderGroupRequest.ts b/packages/client-ts/src/models/SCIMProviderGroupRequest.ts new file mode 100644 index 0000000000..960c2c978b --- /dev/null +++ b/packages/client-ts/src/models/SCIMProviderGroupRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMProviderGroup Serializer + * @export + * @interface SCIMProviderGroupRequest + */ +export interface SCIMProviderGroupRequest { + /** + * + * @type {string} + * @memberof SCIMProviderGroupRequest + */ + scimId: string; + /** + * + * @type {string} + * @memberof SCIMProviderGroupRequest + */ + group: string; + /** + * + * @type {number} + * @memberof SCIMProviderGroupRequest + */ + provider: number; +} + +/** + * Check if a given object implements the SCIMProviderGroupRequest interface. + */ +export function instanceOfSCIMProviderGroupRequest(value: object): value is SCIMProviderGroupRequest { + if (!('scimId' in value) || value['scimId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function SCIMProviderGroupRequestFromJSON(json: any): SCIMProviderGroupRequest { + return SCIMProviderGroupRequestFromJSONTyped(json, false); +} + +export function SCIMProviderGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProviderGroupRequest { + if (json == null) { + return json; + } + return { + + 'scimId': json['scim_id'], + 'group': json['group'], + 'provider': json['provider'], + }; +} + +export function SCIMProviderGroupRequestToJSON(json: any): SCIMProviderGroupRequest { + return SCIMProviderGroupRequestToJSONTyped(json, false); +} + +export function SCIMProviderGroupRequestToJSONTyped(value?: SCIMProviderGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scim_id': value['scimId'], + 'group': value['group'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMProviderRequest.ts b/packages/client-ts/src/models/SCIMProviderRequest.ts new file mode 100644 index 0000000000..c2ad7067c9 --- /dev/null +++ b/packages/client-ts/src/models/SCIMProviderRequest.ts @@ -0,0 +1,204 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CompatibilityModeEnum } from './CompatibilityModeEnum'; +import { + CompatibilityModeEnumFromJSON, + CompatibilityModeEnumFromJSONTyped, + CompatibilityModeEnumToJSON, + CompatibilityModeEnumToJSONTyped, +} from './CompatibilityModeEnum'; +import type { SCIMAuthenticationModeEnum } from './SCIMAuthenticationModeEnum'; +import { + SCIMAuthenticationModeEnumFromJSON, + SCIMAuthenticationModeEnumFromJSONTyped, + SCIMAuthenticationModeEnumToJSON, + SCIMAuthenticationModeEnumToJSONTyped, +} from './SCIMAuthenticationModeEnum'; + +/** + * SCIMProvider Serializer + * @export + * @interface SCIMProviderRequest + */ +export interface SCIMProviderRequest { + /** + * + * @type {string} + * @memberof SCIMProviderRequest + */ + name: string; + /** + * + * @type {Array} + * @memberof SCIMProviderRequest + */ + propertyMappings?: Array; + /** + * Property mappings used for group creation/updating. + * @type {Array} + * @memberof SCIMProviderRequest + */ + propertyMappingsGroup?: Array; + /** + * Base URL to SCIM requests, usually ends in /v2 + * @type {string} + * @memberof SCIMProviderRequest + */ + url: string; + /** + * + * @type {boolean} + * @memberof SCIMProviderRequest + */ + verifyCertificates?: boolean; + /** + * Authentication token + * @type {string} + * @memberof SCIMProviderRequest + */ + token?: string; + /** + * + * @type {SCIMAuthenticationModeEnum} + * @memberof SCIMProviderRequest + */ + authMode?: SCIMAuthenticationModeEnum; + /** + * OAuth Source used for authentication + * @type {string} + * @memberof SCIMProviderRequest + */ + authOauth?: string | null; + /** + * Additional OAuth parameters, such as grant_type + * @type {{ [key: string]: any; }} + * @memberof SCIMProviderRequest + */ + authOauthParams?: { [key: string]: any; }; + /** + * Alter authentik behavior for vendor-specific SCIM implementations. + * @type {CompatibilityModeEnum} + * @memberof SCIMProviderRequest + */ + compatibilityMode?: CompatibilityModeEnum; + /** + * Cache duration for ServiceProviderConfig responses. Set minutes=0 to disable. + * @type {string} + * @memberof SCIMProviderRequest + */ + serviceProviderConfigCacheTimeout?: string; + /** + * + * @type {boolean} + * @memberof SCIMProviderRequest + */ + excludeUsersServiceAccount?: boolean; + /** + * Controls the number of objects synced in a single task + * @type {number} + * @memberof SCIMProviderRequest + */ + syncPageSize?: number; + /** + * Timeout for synchronization of a single page + * @type {string} + * @memberof SCIMProviderRequest + */ + syncPageTimeout?: string; + /** + * Group filters used to define sync-scope for groups. + * @type {Array} + * @memberof SCIMProviderRequest + */ + groupFilters?: Array; + /** + * When enabled, provider will not modify or create objects in the remote system. + * @type {boolean} + * @memberof SCIMProviderRequest + */ + dryRun?: boolean; +} + + + +/** + * Check if a given object implements the SCIMProviderRequest interface. + */ +export function instanceOfSCIMProviderRequest(value: object): value is SCIMProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function SCIMProviderRequestFromJSON(json: any): SCIMProviderRequest { + return SCIMProviderRequestFromJSONTyped(json, false); +} + +export function SCIMProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'], + 'url': json['url'], + 'verifyCertificates': json['verify_certificates'] == null ? undefined : json['verify_certificates'], + 'token': json['token'] == null ? undefined : json['token'], + 'authMode': json['auth_mode'] == null ? undefined : SCIMAuthenticationModeEnumFromJSON(json['auth_mode']), + 'authOauth': json['auth_oauth'] == null ? undefined : json['auth_oauth'], + 'authOauthParams': json['auth_oauth_params'] == null ? undefined : json['auth_oauth_params'], + 'compatibilityMode': json['compatibility_mode'] == null ? undefined : CompatibilityModeEnumFromJSON(json['compatibility_mode']), + 'serviceProviderConfigCacheTimeout': json['service_provider_config_cache_timeout'] == null ? undefined : json['service_provider_config_cache_timeout'], + 'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'], + 'syncPageSize': json['sync_page_size'] == null ? undefined : json['sync_page_size'], + 'syncPageTimeout': json['sync_page_timeout'] == null ? undefined : json['sync_page_timeout'], + 'groupFilters': json['group_filters'] == null ? undefined : json['group_filters'], + 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], + }; +} + +export function SCIMProviderRequestToJSON(json: any): SCIMProviderRequest { + return SCIMProviderRequestToJSONTyped(json, false); +} + +export function SCIMProviderRequestToJSONTyped(value?: SCIMProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'property_mappings': value['propertyMappings'], + 'property_mappings_group': value['propertyMappingsGroup'], + 'url': value['url'], + 'verify_certificates': value['verifyCertificates'], + 'token': value['token'], + 'auth_mode': SCIMAuthenticationModeEnumToJSON(value['authMode']), + 'auth_oauth': value['authOauth'], + 'auth_oauth_params': value['authOauthParams'], + 'compatibility_mode': CompatibilityModeEnumToJSON(value['compatibilityMode']), + 'service_provider_config_cache_timeout': value['serviceProviderConfigCacheTimeout'], + 'exclude_users_service_account': value['excludeUsersServiceAccount'], + 'sync_page_size': value['syncPageSize'], + 'sync_page_timeout': value['syncPageTimeout'], + 'group_filters': value['groupFilters'], + 'dry_run': value['dryRun'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMProviderUser.ts b/packages/client-ts/src/models/SCIMProviderUser.ts new file mode 100644 index 0000000000..81a6de9022 --- /dev/null +++ b/packages/client-ts/src/models/SCIMProviderUser.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * SCIMProviderUser Serializer + * @export + * @interface SCIMProviderUser + */ +export interface SCIMProviderUser { + /** + * + * @type {string} + * @memberof SCIMProviderUser + */ + readonly id: string; + /** + * + * @type {string} + * @memberof SCIMProviderUser + */ + scimId: string; + /** + * + * @type {number} + * @memberof SCIMProviderUser + */ + user: number; + /** + * + * @type {PartialUser} + * @memberof SCIMProviderUser + */ + readonly userObj: PartialUser; + /** + * + * @type {number} + * @memberof SCIMProviderUser + */ + provider: number; + /** + * + * @type {{ [key: string]: any; }} + * @memberof SCIMProviderUser + */ + readonly attributes: { [key: string]: any; }; +} + +/** + * Check if a given object implements the SCIMProviderUser interface. + */ +export function instanceOfSCIMProviderUser(value: object): value is SCIMProviderUser { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('scimId' in value) || value['scimId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('attributes' in value) || value['attributes'] === undefined) return false; + return true; +} + +export function SCIMProviderUserFromJSON(json: any): SCIMProviderUser { + return SCIMProviderUserFromJSONTyped(json, false); +} + +export function SCIMProviderUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProviderUser { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'scimId': json['scim_id'], + 'user': json['user'], + 'userObj': PartialUserFromJSON(json['user_obj']), + 'provider': json['provider'], + 'attributes': json['attributes'], + }; +} + +export function SCIMProviderUserToJSON(json: any): SCIMProviderUser { + return SCIMProviderUserToJSONTyped(json, false); +} + +export function SCIMProviderUserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scim_id': value['scimId'], + 'user': value['user'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMProviderUserRequest.ts b/packages/client-ts/src/models/SCIMProviderUserRequest.ts new file mode 100644 index 0000000000..326336be3c --- /dev/null +++ b/packages/client-ts/src/models/SCIMProviderUserRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMProviderUser Serializer + * @export + * @interface SCIMProviderUserRequest + */ +export interface SCIMProviderUserRequest { + /** + * + * @type {string} + * @memberof SCIMProviderUserRequest + */ + scimId: string; + /** + * + * @type {number} + * @memberof SCIMProviderUserRequest + */ + user: number; + /** + * + * @type {number} + * @memberof SCIMProviderUserRequest + */ + provider: number; +} + +/** + * Check if a given object implements the SCIMProviderUserRequest interface. + */ +export function instanceOfSCIMProviderUserRequest(value: object): value is SCIMProviderUserRequest { + if (!('scimId' in value) || value['scimId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function SCIMProviderUserRequestFromJSON(json: any): SCIMProviderUserRequest { + return SCIMProviderUserRequestFromJSONTyped(json, false); +} + +export function SCIMProviderUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMProviderUserRequest { + if (json == null) { + return json; + } + return { + + 'scimId': json['scim_id'], + 'user': json['user'], + 'provider': json['provider'], + }; +} + +export function SCIMProviderUserRequestToJSON(json: any): SCIMProviderUserRequest { + return SCIMProviderUserRequestToJSONTyped(json, false); +} + +export function SCIMProviderUserRequestToJSONTyped(value?: SCIMProviderUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scim_id': value['scimId'], + 'user': value['user'], + 'provider': value['provider'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSource.ts b/packages/client-ts/src/models/SCIMSource.ts new file mode 100644 index 0000000000..5e277040f7 --- /dev/null +++ b/packages/client-ts/src/models/SCIMSource.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Token } from './Token'; +import { + TokenFromJSON, + TokenFromJSONTyped, + TokenToJSON, + TokenToJSONTyped, +} from './Token'; + +/** + * SCIMSource Serializer + * @export + * @interface SCIMSource + */ +export interface SCIMSource { + /** + * + * @type {string} + * @memberof SCIMSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof SCIMSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof SCIMSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof SCIMSource + */ + enabled?: boolean; + /** + * + * @type {Array} + * @memberof SCIMSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof SCIMSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof SCIMSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SCIMSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SCIMSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SCIMSource + */ + readonly metaModelName: 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. + * @type {string} + * @memberof SCIMSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof SCIMSource + */ + userPathTemplate?: string; + /** + * Get Root URL + * @type {string} + * @memberof SCIMSource + */ + readonly rootUrl: string; + /** + * + * @type {Token} + * @memberof SCIMSource + */ + readonly tokenObj: Token; +} + +/** + * Check if a given object implements the SCIMSource interface. + */ +export function instanceOfSCIMSource(value: object): value is SCIMSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('rootUrl' in value) || value['rootUrl'] === undefined) return false; + if (!('tokenObj' in value) || value['tokenObj'] === undefined) return false; + return true; +} + +export function SCIMSourceFromJSON(json: any): SCIMSource { + return SCIMSourceFromJSONTyped(json, false); +} + +export function SCIMSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'rootUrl': json['root_url'], + 'tokenObj': TokenFromJSON(json['token_obj']), + }; +} + +export function SCIMSourceToJSON(json: any): SCIMSource { + return SCIMSourceToJSONTyped(json, false); +} + +export function SCIMSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'user_path_template': value['userPathTemplate'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourceGroup.ts b/packages/client-ts/src/models/SCIMSourceGroup.ts new file mode 100644 index 0000000000..43b1872ffd --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourceGroup.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * SCIMSourceGroup Serializer + * @export + * @interface SCIMSourceGroup + */ +export interface SCIMSourceGroup { + /** + * + * @type {string} + * @memberof SCIMSourceGroup + */ + id?: string; + /** + * + * @type {string} + * @memberof SCIMSourceGroup + */ + externalId: string; + /** + * + * @type {string} + * @memberof SCIMSourceGroup + */ + group: string; + /** + * + * @type {PartialGroup} + * @memberof SCIMSourceGroup + */ + readonly groupObj: PartialGroup; + /** + * + * @type {string} + * @memberof SCIMSourceGroup + */ + source: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof SCIMSourceGroup + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the SCIMSourceGroup interface. + */ +export function instanceOfSCIMSourceGroup(value: object): value is SCIMSourceGroup { + if (!('externalId' in value) || value['externalId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('groupObj' in value) || value['groupObj'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SCIMSourceGroupFromJSON(json: any): SCIMSourceGroup { + return SCIMSourceGroupFromJSONTyped(json, false); +} + +export function SCIMSourceGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourceGroup { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'externalId': json['external_id'], + 'group': json['group'], + 'groupObj': PartialGroupFromJSON(json['group_obj']), + 'source': json['source'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function SCIMSourceGroupToJSON(json: any): SCIMSourceGroup { + return SCIMSourceGroupToJSONTyped(json, false); +} + +export function SCIMSourceGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'external_id': value['externalId'], + 'group': value['group'], + 'source': value['source'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourceGroupRequest.ts b/packages/client-ts/src/models/SCIMSourceGroupRequest.ts new file mode 100644 index 0000000000..883034576b --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourceGroupRequest.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourceGroup Serializer + * @export + * @interface SCIMSourceGroupRequest + */ +export interface SCIMSourceGroupRequest { + /** + * + * @type {string} + * @memberof SCIMSourceGroupRequest + */ + id?: string; + /** + * + * @type {string} + * @memberof SCIMSourceGroupRequest + */ + externalId: string; + /** + * + * @type {string} + * @memberof SCIMSourceGroupRequest + */ + group: string; + /** + * + * @type {string} + * @memberof SCIMSourceGroupRequest + */ + source: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof SCIMSourceGroupRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the SCIMSourceGroupRequest interface. + */ +export function instanceOfSCIMSourceGroupRequest(value: object): value is SCIMSourceGroupRequest { + if (!('externalId' in value) || value['externalId'] === undefined) return false; + if (!('group' in value) || value['group'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SCIMSourceGroupRequestFromJSON(json: any): SCIMSourceGroupRequest { + return SCIMSourceGroupRequestFromJSONTyped(json, false); +} + +export function SCIMSourceGroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourceGroupRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'externalId': json['external_id'], + 'group': json['group'], + 'source': json['source'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function SCIMSourceGroupRequestToJSON(json: any): SCIMSourceGroupRequest { + return SCIMSourceGroupRequestToJSONTyped(json, false); +} + +export function SCIMSourceGroupRequestToJSONTyped(value?: SCIMSourceGroupRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'external_id': value['externalId'], + 'group': value['group'], + 'source': value['source'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourcePropertyMapping.ts b/packages/client-ts/src/models/SCIMSourcePropertyMapping.ts new file mode 100644 index 0000000000..7c673e7f7e --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourcePropertyMapping Serializer + * @export + * @interface SCIMSourcePropertyMapping + */ +export interface SCIMSourcePropertyMapping { + /** + * + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SCIMSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the SCIMSourcePropertyMapping interface. + */ +export function instanceOfSCIMSourcePropertyMapping(value: object): value is SCIMSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function SCIMSourcePropertyMappingFromJSON(json: any): SCIMSourcePropertyMapping { + return SCIMSourcePropertyMappingFromJSONTyped(json, false); +} + +export function SCIMSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function SCIMSourcePropertyMappingToJSON(json: any): SCIMSourcePropertyMapping { + return SCIMSourcePropertyMappingToJSONTyped(json, false); +} + +export function SCIMSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/SCIMSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..1228513e11 --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourcePropertyMapping Serializer + * @export + * @interface SCIMSourcePropertyMappingRequest + */ +export interface SCIMSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof SCIMSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof SCIMSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof SCIMSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the SCIMSourcePropertyMappingRequest interface. + */ +export function instanceOfSCIMSourcePropertyMappingRequest(value: object): value is SCIMSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function SCIMSourcePropertyMappingRequestFromJSON(json: any): SCIMSourcePropertyMappingRequest { + return SCIMSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function SCIMSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function SCIMSourcePropertyMappingRequestToJSON(json: any): SCIMSourcePropertyMappingRequest { + return SCIMSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function SCIMSourcePropertyMappingRequestToJSONTyped(value?: SCIMSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourceRequest.ts b/packages/client-ts/src/models/SCIMSourceRequest.ts new file mode 100644 index 0000000000..3158572822 --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourceRequest.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSource Serializer + * @export + * @interface SCIMSourceRequest + */ +export interface SCIMSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof SCIMSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof SCIMSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof SCIMSourceRequest + */ + enabled?: boolean; + /** + * + * @type {Array} + * @memberof SCIMSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof SCIMSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {string} + * @memberof SCIMSourceRequest + */ + userPathTemplate?: string; +} + +/** + * Check if a given object implements the SCIMSourceRequest interface. + */ +export function instanceOfSCIMSourceRequest(value: object): value is SCIMSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + return true; +} + +export function SCIMSourceRequestFromJSON(json: any): SCIMSourceRequest { + return SCIMSourceRequestFromJSONTyped(json, false); +} + +export function SCIMSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + }; +} + +export function SCIMSourceRequestToJSON(json: any): SCIMSourceRequest { + return SCIMSourceRequestToJSONTyped(json, false); +} + +export function SCIMSourceRequestToJSONTyped(value?: SCIMSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'user_path_template': value['userPathTemplate'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourceUser.ts b/packages/client-ts/src/models/SCIMSourceUser.ts new file mode 100644 index 0000000000..4c96072e02 --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourceUser.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * SCIMSourceUser Serializer + * @export + * @interface SCIMSourceUser + */ +export interface SCIMSourceUser { + /** + * + * @type {string} + * @memberof SCIMSourceUser + */ + id?: string; + /** + * + * @type {string} + * @memberof SCIMSourceUser + */ + externalId: string; + /** + * + * @type {number} + * @memberof SCIMSourceUser + */ + user: number; + /** + * + * @type {PartialUser} + * @memberof SCIMSourceUser + */ + readonly userObj: PartialUser; + /** + * + * @type {string} + * @memberof SCIMSourceUser + */ + source: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof SCIMSourceUser + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the SCIMSourceUser interface. + */ +export function instanceOfSCIMSourceUser(value: object): value is SCIMSourceUser { + if (!('externalId' in value) || value['externalId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SCIMSourceUserFromJSON(json: any): SCIMSourceUser { + return SCIMSourceUserFromJSONTyped(json, false); +} + +export function SCIMSourceUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourceUser { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'externalId': json['external_id'], + 'user': json['user'], + 'userObj': PartialUserFromJSON(json['user_obj']), + 'source': json['source'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function SCIMSourceUserToJSON(json: any): SCIMSourceUser { + return SCIMSourceUserToJSONTyped(json, false); +} + +export function SCIMSourceUserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'external_id': value['externalId'], + 'user': value['user'], + 'source': value['source'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/SCIMSourceUserRequest.ts b/packages/client-ts/src/models/SCIMSourceUserRequest.ts new file mode 100644 index 0000000000..2bcda67be6 --- /dev/null +++ b/packages/client-ts/src/models/SCIMSourceUserRequest.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SCIMSourceUser Serializer + * @export + * @interface SCIMSourceUserRequest + */ +export interface SCIMSourceUserRequest { + /** + * + * @type {string} + * @memberof SCIMSourceUserRequest + */ + id?: string; + /** + * + * @type {string} + * @memberof SCIMSourceUserRequest + */ + externalId: string; + /** + * + * @type {number} + * @memberof SCIMSourceUserRequest + */ + user: number; + /** + * + * @type {string} + * @memberof SCIMSourceUserRequest + */ + source: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof SCIMSourceUserRequest + */ + attributes?: { [key: string]: any; }; +} + +/** + * Check if a given object implements the SCIMSourceUserRequest interface. + */ +export function instanceOfSCIMSourceUserRequest(value: object): value is SCIMSourceUserRequest { + if (!('externalId' in value) || value['externalId'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SCIMSourceUserRequestFromJSON(json: any): SCIMSourceUserRequest { + return SCIMSourceUserRequestFromJSONTyped(json, false); +} + +export function SCIMSourceUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SCIMSourceUserRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'externalId': json['external_id'], + 'user': json['user'], + 'source': json['source'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function SCIMSourceUserRequestToJSON(json: any): SCIMSourceUserRequest { + return SCIMSourceUserRequestToJSONTyped(json, false); +} + +export function SCIMSourceUserRequestToJSONTyped(value?: SCIMSourceUserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'external_id': value['externalId'], + 'user': value['user'], + 'source': value['source'], + 'attributes': value['attributes'], + }; +} + diff --git a/packages/client-ts/src/models/SMSDevice.ts b/packages/client-ts/src/models/SMSDevice.ts new file mode 100644 index 0000000000..19ed569eb7 --- /dev/null +++ b/packages/client-ts/src/models/SMSDevice.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * Serializer for sms authenticator devices + * @export + * @interface SMSDevice + */ +export interface SMSDevice { + /** + * The human-readable name of this device. + * @type {string} + * @memberof SMSDevice + */ + name: string; + /** + * + * @type {number} + * @memberof SMSDevice + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof SMSDevice + */ + readonly phoneNumber: string; + /** + * + * @type {PartialUser} + * @memberof SMSDevice + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the SMSDevice interface. + */ +export function instanceOfSMSDevice(value: object): value is SMSDevice { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('phoneNumber' in value) || value['phoneNumber'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function SMSDeviceFromJSON(json: any): SMSDevice { + return SMSDeviceFromJSONTyped(json, false); +} + +export function SMSDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SMSDevice { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'pk': json['pk'], + 'phoneNumber': json['phone_number'], + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function SMSDeviceToJSON(json: any): SMSDevice { + return SMSDeviceToJSONTyped(json, false); +} + +export function SMSDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/SMSDeviceRequest.ts b/packages/client-ts/src/models/SMSDeviceRequest.ts new file mode 100644 index 0000000000..88851fb373 --- /dev/null +++ b/packages/client-ts/src/models/SMSDeviceRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for sms authenticator devices + * @export + * @interface SMSDeviceRequest + */ +export interface SMSDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof SMSDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the SMSDeviceRequest interface. + */ +export function instanceOfSMSDeviceRequest(value: object): value is SMSDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function SMSDeviceRequestFromJSON(json: any): SMSDeviceRequest { + return SMSDeviceRequestFromJSONTyped(json, false); +} + +export function SMSDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SMSDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function SMSDeviceRequestToJSON(json: any): SMSDeviceRequest { + return SMSDeviceRequestToJSONTyped(json, false); +} + +export function SMSDeviceRequestToJSONTyped(value?: SMSDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/SSFProvider.ts b/packages/client-ts/src/models/SSFProvider.ts new file mode 100644 index 0000000000..ff782534b7 --- /dev/null +++ b/packages/client-ts/src/models/SSFProvider.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Token } from './Token'; +import { + TokenFromJSON, + TokenFromJSONTyped, + TokenToJSON, + TokenToJSONTyped, +} from './Token'; + +/** + * SSFProvider Serializer + * @export + * @interface SSFProvider + */ +export interface SSFProvider { + /** + * + * @type {number} + * @memberof SSFProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof SSFProvider + */ + name: string; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof SSFProvider + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SSFProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SSFProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SSFProvider + */ + readonly metaModelName: string; + /** + * Key used to sign the SSF Events. + * @type {string} + * @memberof SSFProvider + */ + signingKey: string; + /** + * + * @type {Token} + * @memberof SSFProvider + */ + readonly tokenObj: Token; + /** + * + * @type {Array} + * @memberof SSFProvider + */ + oidcAuthProviders?: Array; + /** + * + * @type {string} + * @memberof SSFProvider + */ + readonly ssfUrl: string | null; + /** + * + * @type {string} + * @memberof SSFProvider + */ + eventRetention?: string; +} + +/** + * Check if a given object implements the SSFProvider interface. + */ +export function instanceOfSSFProvider(value: object): value is SSFProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('signingKey' in value) || value['signingKey'] === undefined) return false; + if (!('tokenObj' in value) || value['tokenObj'] === undefined) return false; + if (!('ssfUrl' in value) || value['ssfUrl'] === undefined) return false; + return true; +} + +export function SSFProviderFromJSON(json: any): SSFProvider { + return SSFProviderFromJSONTyped(json, false); +} + +export function SSFProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SSFProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'signingKey': json['signing_key'], + 'tokenObj': TokenFromJSON(json['token_obj']), + 'oidcAuthProviders': json['oidc_auth_providers'] == null ? undefined : json['oidc_auth_providers'], + 'ssfUrl': json['ssf_url'], + 'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'], + }; +} + +export function SSFProviderToJSON(json: any): SSFProvider { + return SSFProviderToJSONTyped(json, false); +} + +export function SSFProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'signing_key': value['signingKey'], + 'oidc_auth_providers': value['oidcAuthProviders'], + 'event_retention': value['eventRetention'], + }; +} + diff --git a/packages/client-ts/src/models/SSFProviderRequest.ts b/packages/client-ts/src/models/SSFProviderRequest.ts new file mode 100644 index 0000000000..83dcb626fd --- /dev/null +++ b/packages/client-ts/src/models/SSFProviderRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SSFProvider Serializer + * @export + * @interface SSFProviderRequest + */ +export interface SSFProviderRequest { + /** + * + * @type {string} + * @memberof SSFProviderRequest + */ + name: string; + /** + * Key used to sign the SSF Events. + * @type {string} + * @memberof SSFProviderRequest + */ + signingKey: string; + /** + * + * @type {Array} + * @memberof SSFProviderRequest + */ + oidcAuthProviders?: Array; + /** + * + * @type {string} + * @memberof SSFProviderRequest + */ + eventRetention?: string; +} + +/** + * Check if a given object implements the SSFProviderRequest interface. + */ +export function instanceOfSSFProviderRequest(value: object): value is SSFProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('signingKey' in value) || value['signingKey'] === undefined) return false; + return true; +} + +export function SSFProviderRequestFromJSON(json: any): SSFProviderRequest { + return SSFProviderRequestFromJSONTyped(json, false); +} + +export function SSFProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SSFProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'signingKey': json['signing_key'], + 'oidcAuthProviders': json['oidc_auth_providers'] == null ? undefined : json['oidc_auth_providers'], + 'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'], + }; +} + +export function SSFProviderRequestToJSON(json: any): SSFProviderRequest { + return SSFProviderRequestToJSONTyped(json, false); +} + +export function SSFProviderRequestToJSONTyped(value?: SSFProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'signing_key': value['signingKey'], + 'oidc_auth_providers': value['oidcAuthProviders'], + 'event_retention': value['eventRetention'], + }; +} + diff --git a/packages/client-ts/src/models/SSFStream.ts b/packages/client-ts/src/models/SSFStream.ts new file mode 100644 index 0000000000..3ec9953f8e --- /dev/null +++ b/packages/client-ts/src/models/SSFStream.ts @@ -0,0 +1,157 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DeliveryMethodEnum } from './DeliveryMethodEnum'; +import { + DeliveryMethodEnumFromJSON, + DeliveryMethodEnumFromJSONTyped, + DeliveryMethodEnumToJSON, + DeliveryMethodEnumToJSONTyped, +} from './DeliveryMethodEnum'; +import type { EventsRequestedEnum } from './EventsRequestedEnum'; +import { + EventsRequestedEnumFromJSON, + EventsRequestedEnumFromJSONTyped, + EventsRequestedEnumToJSON, + EventsRequestedEnumToJSONTyped, +} from './EventsRequestedEnum'; +import type { SSFProvider } from './SSFProvider'; +import { + SSFProviderFromJSON, + SSFProviderFromJSONTyped, + SSFProviderToJSON, + SSFProviderToJSONTyped, +} from './SSFProvider'; + +/** + * SSFStream Serializer + * @export + * @interface SSFStream + */ +export interface SSFStream { + /** + * + * @type {string} + * @memberof SSFStream + */ + readonly pk: string; + /** + * + * @type {number} + * @memberof SSFStream + */ + provider: number; + /** + * + * @type {SSFProvider} + * @memberof SSFStream + */ + readonly providerObj: SSFProvider; + /** + * + * @type {DeliveryMethodEnum} + * @memberof SSFStream + */ + deliveryMethod: DeliveryMethodEnum; + /** + * + * @type {string} + * @memberof SSFStream + */ + endpointUrl?: string | null; + /** + * + * @type {Array} + * @memberof SSFStream + */ + eventsRequested?: Array; + /** + * + * @type {string} + * @memberof SSFStream + */ + format: string; + /** + * + * @type {Array} + * @memberof SSFStream + */ + aud?: Array; + /** + * + * @type {string} + * @memberof SSFStream + */ + iss: string; +} + + + +/** + * Check if a given object implements the SSFStream interface. + */ +export function instanceOfSSFStream(value: object): value is SSFStream { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('providerObj' in value) || value['providerObj'] === undefined) return false; + if (!('deliveryMethod' in value) || value['deliveryMethod'] === undefined) return false; + if (!('format' in value) || value['format'] === undefined) return false; + if (!('iss' in value) || value['iss'] === undefined) return false; + return true; +} + +export function SSFStreamFromJSON(json: any): SSFStream { + return SSFStreamFromJSONTyped(json, false); +} + +export function SSFStreamFromJSONTyped(json: any, ignoreDiscriminator: boolean): SSFStream { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'provider': json['provider'], + 'providerObj': SSFProviderFromJSON(json['provider_obj']), + 'deliveryMethod': DeliveryMethodEnumFromJSON(json['delivery_method']), + 'endpointUrl': json['endpoint_url'] == null ? undefined : json['endpoint_url'], + 'eventsRequested': json['events_requested'] == null ? undefined : ((json['events_requested'] as Array).map(EventsRequestedEnumFromJSON)), + 'format': json['format'], + 'aud': json['aud'] == null ? undefined : json['aud'], + 'iss': json['iss'], + }; +} + +export function SSFStreamToJSON(json: any): SSFStream { + return SSFStreamToJSONTyped(json, false); +} + +export function SSFStreamToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'provider': value['provider'], + 'delivery_method': DeliveryMethodEnumToJSON(value['deliveryMethod']), + 'endpoint_url': value['endpointUrl'], + 'events_requested': value['eventsRequested'] == null ? undefined : ((value['eventsRequested'] as Array).map(EventsRequestedEnumToJSON)), + 'format': value['format'], + 'aud': value['aud'], + 'iss': value['iss'], + }; +} + diff --git a/packages/client-ts/src/models/Schedule.ts b/packages/client-ts/src/models/Schedule.ts new file mode 100644 index 0000000000..fdd852a9b9 --- /dev/null +++ b/packages/client-ts/src/models/Schedule.ts @@ -0,0 +1,164 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LastTaskStatusEnum } from './LastTaskStatusEnum'; +import { + LastTaskStatusEnumFromJSON, + LastTaskStatusEnumFromJSONTyped, + LastTaskStatusEnumToJSON, + LastTaskStatusEnumToJSONTyped, +} from './LastTaskStatusEnum'; + +/** + * + * @export + * @interface Schedule + */ +export interface Schedule { + /** + * + * @type {string} + * @memberof Schedule + */ + readonly id: string; + /** + * Unique schedule identifier + * @type {string} + * @memberof Schedule + */ + readonly identifier: string | null; + /** + * + * @type {string} + * @memberof Schedule + */ + readonly uid: string; + /** + * Dramatiq actor to call + * @type {string} + * @memberof Schedule + */ + readonly actorName: string; + /** + * + * @type {string} + * @memberof Schedule + */ + readonly relObjAppLabel: string; + /** + * + * @type {string} + * @memberof Schedule + */ + readonly relObjModel: string; + /** + * + * @type {string} + * @memberof Schedule + */ + relObjId?: string | null; + /** + * When to schedule tasks + * @type {string} + * @memberof Schedule + */ + crontab: string; + /** + * Pause this schedule + * @type {boolean} + * @memberof Schedule + */ + paused?: boolean; + /** + * + * @type {Date} + * @memberof Schedule + */ + readonly nextRun: Date; + /** + * + * @type {string} + * @memberof Schedule + */ + readonly description: string | null; + /** + * + * @type {LastTaskStatusEnum} + * @memberof Schedule + */ + readonly lastTaskStatus: LastTaskStatusEnum | null; +} + + + +/** + * Check if a given object implements the Schedule interface. + */ +export function instanceOfSchedule(value: object): value is Schedule { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('uid' in value) || value['uid'] === undefined) return false; + if (!('actorName' in value) || value['actorName'] === undefined) return false; + if (!('relObjAppLabel' in value) || value['relObjAppLabel'] === undefined) return false; + if (!('relObjModel' in value) || value['relObjModel'] === undefined) return false; + if (!('crontab' in value) || value['crontab'] === undefined) return false; + if (!('nextRun' in value) || value['nextRun'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + if (!('lastTaskStatus' in value) || value['lastTaskStatus'] === undefined) return false; + return true; +} + +export function ScheduleFromJSON(json: any): Schedule { + return ScheduleFromJSONTyped(json, false); +} + +export function ScheduleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Schedule { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'identifier': json['identifier'], + 'uid': json['uid'], + 'actorName': json['actor_name'], + 'relObjAppLabel': json['rel_obj_app_label'], + 'relObjModel': json['rel_obj_model'], + 'relObjId': json['rel_obj_id'] == null ? undefined : json['rel_obj_id'], + 'crontab': json['crontab'], + 'paused': json['paused'] == null ? undefined : json['paused'], + 'nextRun': (new Date(json['next_run'])), + 'description': json['description'], + 'lastTaskStatus': LastTaskStatusEnumFromJSON(json['last_task_status']), + }; +} + +export function ScheduleToJSON(json: any): Schedule { + return ScheduleToJSONTyped(json, false); +} + +export function ScheduleToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'rel_obj_id': value['relObjId'], + 'crontab': value['crontab'], + 'paused': value['paused'], + }; +} + diff --git a/packages/client-ts/src/models/ScheduleRequest.ts b/packages/client-ts/src/models/ScheduleRequest.ts new file mode 100644 index 0000000000..db081417ff --- /dev/null +++ b/packages/client-ts/src/models/ScheduleRequest.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ScheduleRequest + */ +export interface ScheduleRequest { + /** + * + * @type {string} + * @memberof ScheduleRequest + */ + relObjId?: string | null; + /** + * When to schedule tasks + * @type {string} + * @memberof ScheduleRequest + */ + crontab: string; + /** + * Pause this schedule + * @type {boolean} + * @memberof ScheduleRequest + */ + paused?: boolean; +} + +/** + * Check if a given object implements the ScheduleRequest interface. + */ +export function instanceOfScheduleRequest(value: object): value is ScheduleRequest { + if (!('crontab' in value) || value['crontab'] === undefined) return false; + return true; +} + +export function ScheduleRequestFromJSON(json: any): ScheduleRequest { + return ScheduleRequestFromJSONTyped(json, false); +} + +export function ScheduleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduleRequest { + if (json == null) { + return json; + } + return { + + 'relObjId': json['rel_obj_id'] == null ? undefined : json['rel_obj_id'], + 'crontab': json['crontab'], + 'paused': json['paused'] == null ? undefined : json['paused'], + }; +} + +export function ScheduleRequestToJSON(json: any): ScheduleRequest { + return ScheduleRequestToJSONTyped(json, false); +} + +export function ScheduleRequestToJSONTyped(value?: ScheduleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'rel_obj_id': value['relObjId'], + 'crontab': value['crontab'], + 'paused': value['paused'], + }; +} + diff --git a/packages/client-ts/src/models/ScopeMapping.ts b/packages/client-ts/src/models/ScopeMapping.ts new file mode 100644 index 0000000000..92dd73cc14 --- /dev/null +++ b/packages/client-ts/src/models/ScopeMapping.ts @@ -0,0 +1,140 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ScopeMapping Serializer + * @export + * @interface ScopeMapping + */ +export interface ScopeMapping { + /** + * + * @type {string} + * @memberof ScopeMapping + */ + readonly pk: 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. + * @type {string} + * @memberof ScopeMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof ScopeMapping + */ + name: string; + /** + * + * @type {string} + * @memberof ScopeMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof ScopeMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof ScopeMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof ScopeMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof ScopeMapping + */ + readonly metaModelName: string; + /** + * Scope name requested by the client + * @type {string} + * @memberof ScopeMapping + */ + scopeName: string; + /** + * Description shown to the user when consenting. If left empty, the user won't be informed. + * @type {string} + * @memberof ScopeMapping + */ + description?: string; +} + +/** + * Check if a given object implements the ScopeMapping interface. + */ +export function instanceOfScopeMapping(value: object): value is ScopeMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('scopeName' in value) || value['scopeName'] === undefined) return false; + return true; +} + +export function ScopeMappingFromJSON(json: any): ScopeMapping { + return ScopeMappingFromJSONTyped(json, false); +} + +export function ScopeMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScopeMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'scopeName': json['scope_name'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function ScopeMappingToJSON(json: any): ScopeMapping { + return ScopeMappingToJSONTyped(json, false); +} + +export function ScopeMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'scope_name': value['scopeName'], + 'description': value['description'], + }; +} + diff --git a/packages/client-ts/src/models/ScopeMappingRequest.ts b/packages/client-ts/src/models/ScopeMappingRequest.ts new file mode 100644 index 0000000000..1321e47cc1 --- /dev/null +++ b/packages/client-ts/src/models/ScopeMappingRequest.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ScopeMapping Serializer + * @export + * @interface ScopeMappingRequest + */ +export interface ScopeMappingRequest { + /** + * 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. + * @type {string} + * @memberof ScopeMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof ScopeMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof ScopeMappingRequest + */ + expression: string; + /** + * Scope name requested by the client + * @type {string} + * @memberof ScopeMappingRequest + */ + scopeName: string; + /** + * Description shown to the user when consenting. If left empty, the user won't be informed. + * @type {string} + * @memberof ScopeMappingRequest + */ + description?: string; +} + +/** + * Check if a given object implements the ScopeMappingRequest interface. + */ +export function instanceOfScopeMappingRequest(value: object): value is ScopeMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('scopeName' in value) || value['scopeName'] === undefined) return false; + return true; +} + +export function ScopeMappingRequestFromJSON(json: any): ScopeMappingRequest { + return ScopeMappingRequestFromJSONTyped(json, false); +} + +export function ScopeMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScopeMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'scopeName': json['scope_name'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function ScopeMappingRequestToJSON(json: any): ScopeMappingRequest { + return ScopeMappingRequestToJSONTyped(json, false); +} + +export function ScopeMappingRequestToJSONTyped(value?: ScopeMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + 'scope_name': value['scopeName'], + 'description': value['description'], + }; +} + diff --git a/packages/client-ts/src/models/SelectableStage.ts b/packages/client-ts/src/models/SelectableStage.ts new file mode 100644 index 0000000000..e620a76c19 --- /dev/null +++ b/packages/client-ts/src/models/SelectableStage.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for stages which can be selected by users + * @export + * @interface SelectableStage + */ +export interface SelectableStage { + /** + * + * @type {string} + * @memberof SelectableStage + */ + pk: string; + /** + * + * @type {string} + * @memberof SelectableStage + */ + name: string; + /** + * + * @type {string} + * @memberof SelectableStage + */ + verboseName: string; + /** + * + * @type {string} + * @memberof SelectableStage + */ + metaModelName: string; +} + +/** + * Check if a given object implements the SelectableStage interface. + */ +export function instanceOfSelectableStage(value: object): value is SelectableStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function SelectableStageFromJSON(json: any): SelectableStage { + return SelectableStageFromJSONTyped(json, false); +} + +export function SelectableStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SelectableStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'verboseName': json['verbose_name'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function SelectableStageToJSON(json: any): SelectableStage { + return SelectableStageToJSONTyped(json, false); +} + +export function SelectableStageToJSONTyped(value?: SelectableStage | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + 'name': value['name'], + 'verbose_name': value['verboseName'], + 'meta_model_name': value['metaModelName'], + }; +} + diff --git a/packages/client-ts/src/models/ServiceConnection.ts b/packages/client-ts/src/models/ServiceConnection.ts new file mode 100644 index 0000000000..4ec7b82741 --- /dev/null +++ b/packages/client-ts/src/models/ServiceConnection.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ServiceConnection Serializer + * @export + * @interface ServiceConnection + */ +export interface ServiceConnection { + /** + * + * @type {string} + * @memberof ServiceConnection + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof ServiceConnection + */ + name: string; + /** + * If enabled, use the local connection. Required Docker socket/Kubernetes Integration + * @type {boolean} + * @memberof ServiceConnection + */ + local?: boolean; + /** + * Return component used to edit this object + * @type {string} + * @memberof ServiceConnection + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof ServiceConnection + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof ServiceConnection + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof ServiceConnection + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the ServiceConnection interface. + */ +export function instanceOfServiceConnection(value: object): value is ServiceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function ServiceConnectionFromJSON(json: any): ServiceConnection { + return ServiceConnectionFromJSONTyped(json, false); +} + +export function ServiceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'local': json['local'] == null ? undefined : json['local'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function ServiceConnectionToJSON(json: any): ServiceConnection { + return ServiceConnectionToJSONTyped(json, false); +} + +export function ServiceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'local': value['local'], + }; +} + diff --git a/packages/client-ts/src/models/ServiceConnectionState.ts b/packages/client-ts/src/models/ServiceConnectionState.ts new file mode 100644 index 0000000000..44d932f424 --- /dev/null +++ b/packages/client-ts/src/models/ServiceConnectionState.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for Service connection state + * @export + * @interface ServiceConnectionState + */ +export interface ServiceConnectionState { + /** + * + * @type {boolean} + * @memberof ServiceConnectionState + */ + readonly healthy: boolean; + /** + * + * @type {string} + * @memberof ServiceConnectionState + */ + readonly version: string; +} + +/** + * Check if a given object implements the ServiceConnectionState interface. + */ +export function instanceOfServiceConnectionState(value: object): value is ServiceConnectionState { + if (!('healthy' in value) || value['healthy'] === undefined) return false; + if (!('version' in value) || value['version'] === undefined) return false; + return true; +} + +export function ServiceConnectionStateFromJSON(json: any): ServiceConnectionState { + return ServiceConnectionStateFromJSONTyped(json, false); +} + +export function ServiceConnectionStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceConnectionState { + if (json == null) { + return json; + } + return { + + 'healthy': json['healthy'], + 'version': json['version'], + }; +} + +export function ServiceConnectionStateToJSON(json: any): ServiceConnectionState { + return ServiceConnectionStateToJSONTyped(json, false); +} + +export function ServiceConnectionStateToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/SessionEndChallenge.ts b/packages/client-ts/src/models/SessionEndChallenge.ts new file mode 100644 index 0000000000..27b8e42087 --- /dev/null +++ b/packages/client-ts/src/models/SessionEndChallenge.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Challenge for ending a session + * @export + * @interface SessionEndChallenge + */ +export interface SessionEndChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof SessionEndChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof SessionEndChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + pendingUserAvatar: string; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + applicationName?: string; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + applicationLaunchUrl?: string; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + invalidationFlowUrl?: string; + /** + * + * @type {string} + * @memberof SessionEndChallenge + */ + brandName: string; +} + +/** + * Check if a given object implements the SessionEndChallenge interface. + */ +export function instanceOfSessionEndChallenge(value: object): value is SessionEndChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + if (!('brandName' in value) || value['brandName'] === undefined) return false; + return true; +} + +export function SessionEndChallengeFromJSON(json: any): SessionEndChallenge { + return SessionEndChallengeFromJSONTyped(json, false); +} + +export function SessionEndChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SessionEndChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + 'applicationName': json['application_name'] == null ? undefined : json['application_name'], + 'applicationLaunchUrl': json['application_launch_url'] == null ? undefined : json['application_launch_url'], + 'invalidationFlowUrl': json['invalidation_flow_url'] == null ? undefined : json['invalidation_flow_url'], + 'brandName': json['brand_name'], + }; +} + +export function SessionEndChallengeToJSON(json: any): SessionEndChallenge { + return SessionEndChallengeToJSONTyped(json, false); +} + +export function SessionEndChallengeToJSONTyped(value?: SessionEndChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + 'application_name': value['applicationName'], + 'application_launch_url': value['applicationLaunchUrl'], + 'invalidation_flow_url': value['invalidationFlowUrl'], + 'brand_name': value['brandName'], + }; +} + diff --git a/packages/client-ts/src/models/SessionUser.ts b/packages/client-ts/src/models/SessionUser.ts new file mode 100644 index 0000000000..4e39a184d3 --- /dev/null +++ b/packages/client-ts/src/models/SessionUser.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserSelf } from './UserSelf'; +import { + UserSelfFromJSON, + UserSelfFromJSONTyped, + UserSelfToJSON, + UserSelfToJSONTyped, +} from './UserSelf'; + +/** + * 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. + * @export + * @interface SessionUser + */ +export interface SessionUser { + /** + * + * @type {UserSelf} + * @memberof SessionUser + */ + user: UserSelf; + /** + * + * @type {UserSelf} + * @memberof SessionUser + */ + original?: UserSelf; +} + +/** + * Check if a given object implements the SessionUser interface. + */ +export function instanceOfSessionUser(value: object): value is SessionUser { + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function SessionUserFromJSON(json: any): SessionUser { + return SessionUserFromJSONTyped(json, false); +} + +export function SessionUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): SessionUser { + if (json == null) { + return json; + } + return { + + 'user': UserSelfFromJSON(json['user']), + 'original': json['original'] == null ? undefined : UserSelfFromJSON(json['original']), + }; +} + +export function SessionUserToJSON(json: any): SessionUser { + return SessionUserToJSONTyped(json, false); +} + +export function SessionUserToJSONTyped(value?: SessionUser | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': UserSelfToJSON(value['user']), + 'original': UserSelfToJSON(value['original']), + }; +} + diff --git a/packages/client-ts/src/models/Settings.ts b/packages/client-ts/src/models/Settings.ts new file mode 100644 index 0000000000..22c1cfac9d --- /dev/null +++ b/packages/client-ts/src/models/Settings.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PatchedSettingsRequestFlags } from './PatchedSettingsRequestFlags'; +import { + PatchedSettingsRequestFlagsFromJSON, + PatchedSettingsRequestFlagsFromJSONTyped, + PatchedSettingsRequestFlagsToJSON, + PatchedSettingsRequestFlagsToJSONTyped, +} from './PatchedSettingsRequestFlags'; + +/** + * Settings Serializer + * @export + * @interface Settings + */ +export interface Settings { + /** + * Configure how authentik should show avatars for users. + * @type {string} + * @memberof Settings + */ + avatars?: string; + /** + * Enable the ability for users to change their name. + * @type {boolean} + * @memberof Settings + */ + defaultUserChangeName?: boolean; + /** + * Enable the ability for users to change their email address. + * @type {boolean} + * @memberof Settings + */ + defaultUserChangeEmail?: boolean; + /** + * Enable the ability for users to change their username. + * @type {boolean} + * @memberof Settings + */ + defaultUserChangeUsername?: boolean; + /** + * Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). + * @type {string} + * @memberof Settings + */ + eventRetention?: string; + /** + * Reputation cannot decrease lower than this value. Zero or negative. + * @type {number} + * @memberof Settings + */ + reputationLowerLimit?: number; + /** + * Reputation cannot increase higher than this value. Zero or positive. + * @type {number} + * @memberof Settings + */ + reputationUpperLimit?: number; + /** + * + * @type {any} + * @memberof Settings + */ + footerLinks?: any | null; + /** + * When enabled, all the events caused by a user will be deleted upon the user's deletion. + * @type {boolean} + * @memberof Settings + */ + gdprCompliance?: boolean; + /** + * Globally enable/disable impersonation. + * @type {boolean} + * @memberof Settings + */ + impersonation?: boolean; + /** + * Require administrators to provide a reason for impersonating a user. + * @type {boolean} + * @memberof Settings + */ + impersonationRequireReason?: boolean; + /** + * Default token duration + * @type {string} + * @memberof Settings + */ + defaultTokenDuration?: string; + /** + * Default token length + * @type {number} + * @memberof Settings + */ + defaultTokenLength?: number; + /** + * Default page size for API responses, if no size was requested. + * @type {number} + * @memberof Settings + */ + paginationDefaultPageSize?: number; + /** + * Maximum page size + * @type {number} + * @memberof Settings + */ + paginationMaxPageSize?: number; + /** + * + * @type {PatchedSettingsRequestFlags} + * @memberof Settings + */ + flags: PatchedSettingsRequestFlags; +} + +/** + * Check if a given object implements the Settings interface. + */ +export function instanceOfSettings(value: object): value is Settings { + if (!('flags' in value) || value['flags'] === undefined) return false; + return true; +} + +export function SettingsFromJSON(json: any): Settings { + return SettingsFromJSONTyped(json, false); +} + +export function SettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Settings { + if (json == null) { + return json; + } + return { + + 'avatars': json['avatars'] == null ? undefined : json['avatars'], + 'defaultUserChangeName': json['default_user_change_name'] == null ? undefined : json['default_user_change_name'], + 'defaultUserChangeEmail': json['default_user_change_email'] == null ? undefined : json['default_user_change_email'], + 'defaultUserChangeUsername': json['default_user_change_username'] == null ? undefined : json['default_user_change_username'], + 'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'], + 'reputationLowerLimit': json['reputation_lower_limit'] == null ? undefined : json['reputation_lower_limit'], + 'reputationUpperLimit': json['reputation_upper_limit'] == null ? undefined : json['reputation_upper_limit'], + 'footerLinks': json['footer_links'] == null ? undefined : json['footer_links'], + 'gdprCompliance': json['gdpr_compliance'] == null ? undefined : json['gdpr_compliance'], + 'impersonation': json['impersonation'] == null ? undefined : json['impersonation'], + 'impersonationRequireReason': json['impersonation_require_reason'] == null ? undefined : json['impersonation_require_reason'], + 'defaultTokenDuration': json['default_token_duration'] == null ? undefined : json['default_token_duration'], + 'defaultTokenLength': json['default_token_length'] == null ? undefined : json['default_token_length'], + 'paginationDefaultPageSize': json['pagination_default_page_size'] == null ? undefined : json['pagination_default_page_size'], + 'paginationMaxPageSize': json['pagination_max_page_size'] == null ? undefined : json['pagination_max_page_size'], + 'flags': PatchedSettingsRequestFlagsFromJSON(json['flags']), + }; +} + +export function SettingsToJSON(json: any): Settings { + return SettingsToJSONTyped(json, false); +} + +export function SettingsToJSONTyped(value?: Settings | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'avatars': value['avatars'], + 'default_user_change_name': value['defaultUserChangeName'], + 'default_user_change_email': value['defaultUserChangeEmail'], + 'default_user_change_username': value['defaultUserChangeUsername'], + 'event_retention': value['eventRetention'], + 'reputation_lower_limit': value['reputationLowerLimit'], + 'reputation_upper_limit': value['reputationUpperLimit'], + 'footer_links': value['footerLinks'], + 'gdpr_compliance': value['gdprCompliance'], + 'impersonation': value['impersonation'], + 'impersonation_require_reason': value['impersonationRequireReason'], + 'default_token_duration': value['defaultTokenDuration'], + 'default_token_length': value['defaultTokenLength'], + 'pagination_default_page_size': value['paginationDefaultPageSize'], + 'pagination_max_page_size': value['paginationMaxPageSize'], + 'flags': PatchedSettingsRequestFlagsToJSON(value['flags']), + }; +} + diff --git a/packages/client-ts/src/models/SettingsRequest.ts b/packages/client-ts/src/models/SettingsRequest.ts new file mode 100644 index 0000000000..aa5b26cc36 --- /dev/null +++ b/packages/client-ts/src/models/SettingsRequest.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PatchedSettingsRequestFlags } from './PatchedSettingsRequestFlags'; +import { + PatchedSettingsRequestFlagsFromJSON, + PatchedSettingsRequestFlagsFromJSONTyped, + PatchedSettingsRequestFlagsToJSON, + PatchedSettingsRequestFlagsToJSONTyped, +} from './PatchedSettingsRequestFlags'; + +/** + * Settings Serializer + * @export + * @interface SettingsRequest + */ +export interface SettingsRequest { + /** + * Configure how authentik should show avatars for users. + * @type {string} + * @memberof SettingsRequest + */ + avatars?: string; + /** + * Enable the ability for users to change their name. + * @type {boolean} + * @memberof SettingsRequest + */ + defaultUserChangeName?: boolean; + /** + * Enable the ability for users to change their email address. + * @type {boolean} + * @memberof SettingsRequest + */ + defaultUserChangeEmail?: boolean; + /** + * Enable the ability for users to change their username. + * @type {boolean} + * @memberof SettingsRequest + */ + defaultUserChangeUsername?: boolean; + /** + * Events will be deleted after this duration.(Format: weeks=3;days=2;hours=3,seconds=2). + * @type {string} + * @memberof SettingsRequest + */ + eventRetention?: string; + /** + * Reputation cannot decrease lower than this value. Zero or negative. + * @type {number} + * @memberof SettingsRequest + */ + reputationLowerLimit?: number; + /** + * Reputation cannot increase higher than this value. Zero or positive. + * @type {number} + * @memberof SettingsRequest + */ + reputationUpperLimit?: number; + /** + * + * @type {any} + * @memberof SettingsRequest + */ + footerLinks?: any | null; + /** + * When enabled, all the events caused by a user will be deleted upon the user's deletion. + * @type {boolean} + * @memberof SettingsRequest + */ + gdprCompliance?: boolean; + /** + * Globally enable/disable impersonation. + * @type {boolean} + * @memberof SettingsRequest + */ + impersonation?: boolean; + /** + * Require administrators to provide a reason for impersonating a user. + * @type {boolean} + * @memberof SettingsRequest + */ + impersonationRequireReason?: boolean; + /** + * Default token duration + * @type {string} + * @memberof SettingsRequest + */ + defaultTokenDuration?: string; + /** + * Default token length + * @type {number} + * @memberof SettingsRequest + */ + defaultTokenLength?: number; + /** + * Default page size for API responses, if no size was requested. + * @type {number} + * @memberof SettingsRequest + */ + paginationDefaultPageSize?: number; + /** + * Maximum page size + * @type {number} + * @memberof SettingsRequest + */ + paginationMaxPageSize?: number; + /** + * + * @type {PatchedSettingsRequestFlags} + * @memberof SettingsRequest + */ + flags: PatchedSettingsRequestFlags; +} + +/** + * Check if a given object implements the SettingsRequest interface. + */ +export function instanceOfSettingsRequest(value: object): value is SettingsRequest { + if (!('flags' in value) || value['flags'] === undefined) return false; + return true; +} + +export function SettingsRequestFromJSON(json: any): SettingsRequest { + return SettingsRequestFromJSONTyped(json, false); +} + +export function SettingsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SettingsRequest { + if (json == null) { + return json; + } + return { + + 'avatars': json['avatars'] == null ? undefined : json['avatars'], + 'defaultUserChangeName': json['default_user_change_name'] == null ? undefined : json['default_user_change_name'], + 'defaultUserChangeEmail': json['default_user_change_email'] == null ? undefined : json['default_user_change_email'], + 'defaultUserChangeUsername': json['default_user_change_username'] == null ? undefined : json['default_user_change_username'], + 'eventRetention': json['event_retention'] == null ? undefined : json['event_retention'], + 'reputationLowerLimit': json['reputation_lower_limit'] == null ? undefined : json['reputation_lower_limit'], + 'reputationUpperLimit': json['reputation_upper_limit'] == null ? undefined : json['reputation_upper_limit'], + 'footerLinks': json['footer_links'] == null ? undefined : json['footer_links'], + 'gdprCompliance': json['gdpr_compliance'] == null ? undefined : json['gdpr_compliance'], + 'impersonation': json['impersonation'] == null ? undefined : json['impersonation'], + 'impersonationRequireReason': json['impersonation_require_reason'] == null ? undefined : json['impersonation_require_reason'], + 'defaultTokenDuration': json['default_token_duration'] == null ? undefined : json['default_token_duration'], + 'defaultTokenLength': json['default_token_length'] == null ? undefined : json['default_token_length'], + 'paginationDefaultPageSize': json['pagination_default_page_size'] == null ? undefined : json['pagination_default_page_size'], + 'paginationMaxPageSize': json['pagination_max_page_size'] == null ? undefined : json['pagination_max_page_size'], + 'flags': PatchedSettingsRequestFlagsFromJSON(json['flags']), + }; +} + +export function SettingsRequestToJSON(json: any): SettingsRequest { + return SettingsRequestToJSONTyped(json, false); +} + +export function SettingsRequestToJSONTyped(value?: SettingsRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'avatars': value['avatars'], + 'default_user_change_name': value['defaultUserChangeName'], + 'default_user_change_email': value['defaultUserChangeEmail'], + 'default_user_change_username': value['defaultUserChangeUsername'], + 'event_retention': value['eventRetention'], + 'reputation_lower_limit': value['reputationLowerLimit'], + 'reputation_upper_limit': value['reputationUpperLimit'], + 'footer_links': value['footerLinks'], + 'gdpr_compliance': value['gdprCompliance'], + 'impersonation': value['impersonation'], + 'impersonation_require_reason': value['impersonationRequireReason'], + 'default_token_duration': value['defaultTokenDuration'], + 'default_token_length': value['defaultTokenLength'], + 'pagination_default_page_size': value['paginationDefaultPageSize'], + 'pagination_max_page_size': value['paginationMaxPageSize'], + 'flags': PatchedSettingsRequestFlagsToJSON(value['flags']), + }; +} + diff --git a/packages/client-ts/src/models/SeverityEnum.ts b/packages/client-ts/src/models/SeverityEnum.ts new file mode 100644 index 0000000000..e7d76a073b --- /dev/null +++ b/packages/client-ts/src/models/SeverityEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SeverityEnum = { + Notice: 'notice', + Warning: 'warning', + Alert: 'alert', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SeverityEnum = typeof SeverityEnum[keyof typeof SeverityEnum]; + + +export function instanceOfSeverityEnum(value: any): boolean { + for (const key in SeverityEnum) { + if (Object.prototype.hasOwnProperty.call(SeverityEnum, key)) { + if (SeverityEnum[key as keyof typeof SeverityEnum] === value) { + return true; + } + } + } + return false; +} + +export function SeverityEnumFromJSON(json: any): SeverityEnum { + return SeverityEnumFromJSONTyped(json, false); +} + +export function SeverityEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SeverityEnum { + return json as SeverityEnum; +} + +export function SeverityEnumToJSON(value?: SeverityEnum | null): any { + return value as any; +} + +export function SeverityEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SeverityEnum { + return value as SeverityEnum; +} + diff --git a/packages/client-ts/src/models/ShellChallenge.ts b/packages/client-ts/src/models/ShellChallenge.ts new file mode 100644 index 0000000000..d7fed960d5 --- /dev/null +++ b/packages/client-ts/src/models/ShellChallenge.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * challenge type to render HTML as-is + * @export + * @interface ShellChallenge + */ +export interface ShellChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof ShellChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof ShellChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof ShellChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof ShellChallenge + */ + body: string; +} + +/** + * Check if a given object implements the ShellChallenge interface. + */ +export function instanceOfShellChallenge(value: object): value is ShellChallenge { + if (!('body' in value) || value['body'] === undefined) return false; + return true; +} + +export function ShellChallengeFromJSON(json: any): ShellChallenge { + return ShellChallengeFromJSONTyped(json, false); +} + +export function ShellChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShellChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'body': json['body'], + }; +} + +export function ShellChallengeToJSON(json: any): ShellChallenge { + return ShellChallengeToJSONTyped(json, false); +} + +export function ShellChallengeToJSONTyped(value?: ShellChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'body': value['body'], + }; +} + diff --git a/packages/client-ts/src/models/SignatureAlgorithmEnum.ts b/packages/client-ts/src/models/SignatureAlgorithmEnum.ts new file mode 100644 index 0000000000..b2864db057 --- /dev/null +++ b/packages/client-ts/src/models/SignatureAlgorithmEnum.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SignatureAlgorithmEnum = { + HttpWwwW3Org200009XmldsigrsaSha1: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1', + HttpWwwW3Org200104XmldsigMorersaSha256: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', + HttpWwwW3Org200104XmldsigMorersaSha384: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384', + HttpWwwW3Org200104XmldsigMorersaSha512: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512', + HttpWwwW3Org200104XmldsigMoreecdsaSha1: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1', + HttpWwwW3Org200104XmldsigMoreecdsaSha256: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256', + HttpWwwW3Org200104XmldsigMoreecdsaSha384: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384', + HttpWwwW3Org200104XmldsigMoreecdsaSha512: 'http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512', + HttpWwwW3Org200009XmldsigdsaSha1: 'http://www.w3.org/2000/09/xmldsig#dsa-sha1', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SignatureAlgorithmEnum = typeof SignatureAlgorithmEnum[keyof typeof SignatureAlgorithmEnum]; + + +export function instanceOfSignatureAlgorithmEnum(value: any): boolean { + for (const key in SignatureAlgorithmEnum) { + if (Object.prototype.hasOwnProperty.call(SignatureAlgorithmEnum, key)) { + if (SignatureAlgorithmEnum[key as keyof typeof SignatureAlgorithmEnum] === value) { + return true; + } + } + } + return false; +} + +export function SignatureAlgorithmEnumFromJSON(json: any): SignatureAlgorithmEnum { + return SignatureAlgorithmEnumFromJSONTyped(json, false); +} + +export function SignatureAlgorithmEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignatureAlgorithmEnum { + return json as SignatureAlgorithmEnum; +} + +export function SignatureAlgorithmEnumToJSON(value?: SignatureAlgorithmEnum | null): any { + return value as any; +} + +export function SignatureAlgorithmEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SignatureAlgorithmEnum { + return value as SignatureAlgorithmEnum; +} + diff --git a/packages/client-ts/src/models/Software.ts b/packages/client-ts/src/models/Software.ts new file mode 100644 index 0000000000..430300e781 --- /dev/null +++ b/packages/client-ts/src/models/Software.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Software + */ +export interface Software { + /** + * + * @type {string} + * @memberof Software + */ + name: string; + /** + * + * @type {string} + * @memberof Software + */ + version?: string; + /** + * + * @type {string} + * @memberof Software + */ + source: string; + /** + * + * @type {string} + * @memberof Software + */ + path?: string; +} + +/** + * Check if a given object implements the Software interface. + */ +export function instanceOfSoftware(value: object): value is Software { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SoftwareFromJSON(json: any): Software { + return SoftwareFromJSONTyped(json, false); +} + +export function SoftwareFromJSONTyped(json: any, ignoreDiscriminator: boolean): Software { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'version': json['version'] == null ? undefined : json['version'], + 'source': json['source'], + 'path': json['path'] == null ? undefined : json['path'], + }; +} + +export function SoftwareToJSON(json: any): Software { + return SoftwareToJSONTyped(json, false); +} + +export function SoftwareToJSONTyped(value?: Software | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'version': value['version'], + 'source': value['source'], + 'path': value['path'], + }; +} + diff --git a/packages/client-ts/src/models/SoftwareRequest.ts b/packages/client-ts/src/models/SoftwareRequest.ts new file mode 100644 index 0000000000..5c1a14091b --- /dev/null +++ b/packages/client-ts/src/models/SoftwareRequest.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SoftwareRequest + */ +export interface SoftwareRequest { + /** + * + * @type {string} + * @memberof SoftwareRequest + */ + name: string; + /** + * + * @type {string} + * @memberof SoftwareRequest + */ + version?: string; + /** + * + * @type {string} + * @memberof SoftwareRequest + */ + source: string; + /** + * + * @type {string} + * @memberof SoftwareRequest + */ + path?: string; +} + +/** + * Check if a given object implements the SoftwareRequest interface. + */ +export function instanceOfSoftwareRequest(value: object): value is SoftwareRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SoftwareRequestFromJSON(json: any): SoftwareRequest { + return SoftwareRequestFromJSONTyped(json, false); +} + +export function SoftwareRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SoftwareRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'version': json['version'] == null ? undefined : json['version'], + 'source': json['source'], + 'path': json['path'] == null ? undefined : json['path'], + }; +} + +export function SoftwareRequestToJSON(json: any): SoftwareRequest { + return SoftwareRequestToJSONTyped(json, false); +} + +export function SoftwareRequestToJSONTyped(value?: SoftwareRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'version': value['version'], + 'source': value['source'], + 'path': value['path'], + }; +} + diff --git a/packages/client-ts/src/models/Source.ts b/packages/client-ts/src/models/Source.ts new file mode 100644 index 0000000000..26090d2c4e --- /dev/null +++ b/packages/client-ts/src/models/Source.ts @@ -0,0 +1,243 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; + +/** + * Source Serializer + * @export + * @interface Source + */ +export interface Source { + /** + * + * @type {string} + * @memberof Source + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof Source + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof Source + */ + slug: string; + /** + * + * @type {boolean} + * @memberof Source + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof Source + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof Source + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof Source + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof Source + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof Source + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof Source + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof Source + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof Source + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof Source + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof Source + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof Source + */ + 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. + * @type {string} + * @memberof Source + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof Source + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof Source + */ + icon?: string; + /** + * Get the URL to the source icon + * @type {string} + * @memberof Source + */ + readonly iconUrl: string | null; + /** + * + * @type {ThemedUrls} + * @memberof Source + */ + readonly iconThemedUrls: ThemedUrls | null; +} + + + +/** + * Check if a given object implements the Source interface. + */ +export function instanceOfSource(value: object): value is Source { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + return true; +} + +export function SourceFromJSON(json: any): Source { + return SourceFromJSONTyped(json, false); +} + +export function SourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Source { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + }; +} + +export function SourceToJSON(json: any): Source { + return SourceToJSONTyped(json, false); +} + +export function SourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + }; +} + diff --git a/packages/client-ts/src/models/SourceStage.ts b/packages/client-ts/src/models/SourceStage.ts new file mode 100644 index 0000000000..0e2cc7f925 --- /dev/null +++ b/packages/client-ts/src/models/SourceStage.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * SourceStage Serializer + * @export + * @interface SourceStage + */ +export interface SourceStage { + /** + * + * @type {string} + * @memberof SourceStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof SourceStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof SourceStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof SourceStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof SourceStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof SourceStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof SourceStage + */ + readonly flowSet: Array; + /** + * + * @type {string} + * @memberof SourceStage + */ + source: string; + /** + * Amount of time a user can take to return from the source to continue the flow (Format: hours=-1;minutes=-2;seconds=-3) + * @type {string} + * @memberof SourceStage + */ + resumeTimeout?: string; +} + +/** + * Check if a given object implements the SourceStage interface. + */ +export function instanceOfSourceStage(value: object): value is SourceStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SourceStageFromJSON(json: any): SourceStage { + return SourceStageFromJSONTyped(json, false); +} + +export function SourceStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'source': json['source'], + 'resumeTimeout': json['resume_timeout'] == null ? undefined : json['resume_timeout'], + }; +} + +export function SourceStageToJSON(json: any): SourceStage { + return SourceStageToJSONTyped(json, false); +} + +export function SourceStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'source': value['source'], + 'resume_timeout': value['resumeTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/SourceStageRequest.ts b/packages/client-ts/src/models/SourceStageRequest.ts new file mode 100644 index 0000000000..3c4c1401c3 --- /dev/null +++ b/packages/client-ts/src/models/SourceStageRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * SourceStage Serializer + * @export + * @interface SourceStageRequest + */ +export interface SourceStageRequest { + /** + * + * @type {string} + * @memberof SourceStageRequest + */ + name: string; + /** + * + * @type {string} + * @memberof SourceStageRequest + */ + source: string; + /** + * Amount of time a user can take to return from the source to continue the flow (Format: hours=-1;minutes=-2;seconds=-3) + * @type {string} + * @memberof SourceStageRequest + */ + resumeTimeout?: string; +} + +/** + * Check if a given object implements the SourceStageRequest interface. + */ +export function instanceOfSourceStageRequest(value: object): value is SourceStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; +} + +export function SourceStageRequestFromJSON(json: any): SourceStageRequest { + return SourceStageRequestFromJSONTyped(json, false); +} + +export function SourceStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'source': json['source'], + 'resumeTimeout': json['resume_timeout'] == null ? undefined : json['resume_timeout'], + }; +} + +export function SourceStageRequestToJSON(json: any): SourceStageRequest { + return SourceStageRequestToJSONTyped(json, false); +} + +export function SourceStageRequestToJSONTyped(value?: SourceStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'source': value['source'], + 'resume_timeout': value['resumeTimeout'], + }; +} + diff --git a/packages/client-ts/src/models/SourceType.ts b/packages/client-ts/src/models/SourceType.ts new file mode 100644 index 0000000000..3116f5e168 --- /dev/null +++ b/packages/client-ts/src/models/SourceType.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for SourceType + * @export + * @interface SourceType + */ +export interface SourceType { + /** + * + * @type {string} + * @memberof SourceType + */ + name: string; + /** + * + * @type {string} + * @memberof SourceType + */ + verboseName: string; + /** + * + * @type {boolean} + * @memberof SourceType + */ + urlsCustomizable: boolean; + /** + * + * @type {string} + * @memberof SourceType + */ + readonly requestTokenUrl: string | null; + /** + * + * @type {string} + * @memberof SourceType + */ + readonly authorizationUrl: string | null; + /** + * + * @type {string} + * @memberof SourceType + */ + readonly accessTokenUrl: string | null; + /** + * + * @type {string} + * @memberof SourceType + */ + readonly profileUrl: string | null; + /** + * + * @type {string} + * @memberof SourceType + */ + readonly oidcWellKnownUrl: string | null; + /** + * + * @type {string} + * @memberof SourceType + */ + readonly oidcJwksUrl: string | null; +} + +/** + * Check if a given object implements the SourceType interface. + */ +export function instanceOfSourceType(value: object): value is SourceType { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('urlsCustomizable' in value) || value['urlsCustomizable'] === undefined) return false; + if (!('requestTokenUrl' in value) || value['requestTokenUrl'] === undefined) return false; + if (!('authorizationUrl' in value) || value['authorizationUrl'] === undefined) return false; + if (!('accessTokenUrl' in value) || value['accessTokenUrl'] === undefined) return false; + if (!('profileUrl' in value) || value['profileUrl'] === undefined) return false; + if (!('oidcWellKnownUrl' in value) || value['oidcWellKnownUrl'] === undefined) return false; + if (!('oidcJwksUrl' in value) || value['oidcJwksUrl'] === undefined) return false; + return true; +} + +export function SourceTypeFromJSON(json: any): SourceType { + return SourceTypeFromJSONTyped(json, false); +} + +export function SourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceType { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'verboseName': json['verbose_name'], + 'urlsCustomizable': json['urls_customizable'], + 'requestTokenUrl': json['request_token_url'], + 'authorizationUrl': json['authorization_url'], + 'accessTokenUrl': json['access_token_url'], + 'profileUrl': json['profile_url'], + 'oidcWellKnownUrl': json['oidc_well_known_url'], + 'oidcJwksUrl': json['oidc_jwks_url'], + }; +} + +export function SourceTypeToJSON(json: any): SourceType { + return SourceTypeToJSONTyped(json, false); +} + +export function SourceTypeToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'verbose_name': value['verboseName'], + 'urls_customizable': value['urlsCustomizable'], + }; +} + diff --git a/packages/client-ts/src/models/Stage.ts b/packages/client-ts/src/models/Stage.ts new file mode 100644 index 0000000000..8f59a58265 --- /dev/null +++ b/packages/client-ts/src/models/Stage.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * Stage Serializer + * @export + * @interface Stage + */ +export interface Stage { + /** + * + * @type {string} + * @memberof Stage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof Stage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof Stage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof Stage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof Stage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof Stage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof Stage + */ + readonly flowSet: Array; +} + +/** + * Check if a given object implements the Stage interface. + */ +export function instanceOfStage(value: object): value is Stage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function StageFromJSON(json: any): Stage { + return StageFromJSONTyped(json, false); +} + +export function StageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Stage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + }; +} + +export function StageToJSON(json: any): Stage { + return StageToJSONTyped(json, false); +} + +export function StageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/StageModeEnum.ts b/packages/client-ts/src/models/StageModeEnum.ts new file mode 100644 index 0000000000..b31182306c --- /dev/null +++ b/packages/client-ts/src/models/StageModeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const StageModeEnum = { + Optional: 'optional', + Required: 'required', + UnknownDefaultOpenApi: '11184809' +} as const; +export type StageModeEnum = typeof StageModeEnum[keyof typeof StageModeEnum]; + + +export function instanceOfStageModeEnum(value: any): boolean { + for (const key in StageModeEnum) { + if (Object.prototype.hasOwnProperty.call(StageModeEnum, key)) { + if (StageModeEnum[key as keyof typeof StageModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function StageModeEnumFromJSON(json: any): StageModeEnum { + return StageModeEnumFromJSONTyped(json, false); +} + +export function StageModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): StageModeEnum { + return json as StageModeEnum; +} + +export function StageModeEnumToJSON(value?: StageModeEnum | null): any { + return value as any; +} + +export function StageModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): StageModeEnum { + return value as StageModeEnum; +} + diff --git a/packages/client-ts/src/models/StagePrompt.ts b/packages/client-ts/src/models/StagePrompt.ts new file mode 100644 index 0000000000..99df2c21cb --- /dev/null +++ b/packages/client-ts/src/models/StagePrompt.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PromptTypeEnum } from './PromptTypeEnum'; +import { + PromptTypeEnumFromJSON, + PromptTypeEnumFromJSONTyped, + PromptTypeEnumToJSON, + PromptTypeEnumToJSONTyped, +} from './PromptTypeEnum'; +import type { PromptChoice } from './PromptChoice'; +import { + PromptChoiceFromJSON, + PromptChoiceFromJSONTyped, + PromptChoiceToJSON, + PromptChoiceToJSONTyped, +} from './PromptChoice'; + +/** + * Serializer for a single Prompt field + * @export + * @interface StagePrompt + */ +export interface StagePrompt { + /** + * + * @type {string} + * @memberof StagePrompt + */ + fieldKey: string; + /** + * + * @type {string} + * @memberof StagePrompt + */ + label: string; + /** + * + * @type {PromptTypeEnum} + * @memberof StagePrompt + */ + type: PromptTypeEnum; + /** + * + * @type {boolean} + * @memberof StagePrompt + */ + required: boolean; + /** + * + * @type {string} + * @memberof StagePrompt + */ + placeholder: string; + /** + * + * @type {string} + * @memberof StagePrompt + */ + initialValue: string; + /** + * + * @type {number} + * @memberof StagePrompt + */ + order: number; + /** + * + * @type {string} + * @memberof StagePrompt + */ + subText: string; + /** + * + * @type {Array} + * @memberof StagePrompt + */ + choices: Array | null; +} + + + +/** + * Check if a given object implements the StagePrompt interface. + */ +export function instanceOfStagePrompt(value: object): value is StagePrompt { + if (!('fieldKey' in value) || value['fieldKey'] === undefined) return false; + if (!('label' in value) || value['label'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('required' in value) || value['required'] === undefined) return false; + if (!('placeholder' in value) || value['placeholder'] === undefined) return false; + if (!('initialValue' in value) || value['initialValue'] === undefined) return false; + if (!('order' in value) || value['order'] === undefined) return false; + if (!('subText' in value) || value['subText'] === undefined) return false; + if (!('choices' in value) || value['choices'] === undefined) return false; + return true; +} + +export function StagePromptFromJSON(json: any): StagePrompt { + return StagePromptFromJSONTyped(json, false); +} + +export function StagePromptFromJSONTyped(json: any, ignoreDiscriminator: boolean): StagePrompt { + if (json == null) { + return json; + } + return { + + 'fieldKey': json['field_key'], + 'label': json['label'], + 'type': PromptTypeEnumFromJSON(json['type']), + 'required': json['required'], + 'placeholder': json['placeholder'], + 'initialValue': json['initial_value'], + 'order': json['order'], + 'subText': json['sub_text'], + 'choices': (json['choices'] == null ? null : (json['choices'] as Array).map(PromptChoiceFromJSON)), + }; +} + +export function StagePromptToJSON(json: any): StagePrompt { + return StagePromptToJSONTyped(json, false); +} + +export function StagePromptToJSONTyped(value?: StagePrompt | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'field_key': value['fieldKey'], + 'label': value['label'], + 'type': PromptTypeEnumToJSON(value['type']), + 'required': value['required'], + 'placeholder': value['placeholder'], + 'initial_value': value['initialValue'], + 'order': value['order'], + 'sub_text': value['subText'], + 'choices': (value['choices'] == null ? null : (value['choices'] as Array).map(PromptChoiceToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/StaticDevice.ts b/packages/client-ts/src/models/StaticDevice.ts new file mode 100644 index 0000000000..316d9fabf8 --- /dev/null +++ b/packages/client-ts/src/models/StaticDevice.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { StaticDeviceToken } from './StaticDeviceToken'; +import { + StaticDeviceTokenFromJSON, + StaticDeviceTokenFromJSONTyped, + StaticDeviceTokenToJSON, + StaticDeviceTokenToJSONTyped, +} from './StaticDeviceToken'; + +/** + * Serializer for static authenticator devices + * @export + * @interface StaticDevice + */ +export interface StaticDevice { + /** + * The human-readable name of this device. + * @type {string} + * @memberof StaticDevice + */ + name: string; + /** + * + * @type {Array} + * @memberof StaticDevice + */ + readonly tokenSet: Array; + /** + * + * @type {number} + * @memberof StaticDevice + */ + readonly pk: number; + /** + * + * @type {PartialUser} + * @memberof StaticDevice + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the StaticDevice interface. + */ +export function instanceOfStaticDevice(value: object): value is StaticDevice { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('tokenSet' in value) || value['tokenSet'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function StaticDeviceFromJSON(json: any): StaticDevice { + return StaticDeviceFromJSONTyped(json, false); +} + +export function StaticDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): StaticDevice { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'tokenSet': ((json['token_set'] as Array).map(StaticDeviceTokenFromJSON)), + 'pk': json['pk'], + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function StaticDeviceToJSON(json: any): StaticDevice { + return StaticDeviceToJSONTyped(json, false); +} + +export function StaticDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/StaticDeviceRequest.ts b/packages/client-ts/src/models/StaticDeviceRequest.ts new file mode 100644 index 0000000000..9877239c14 --- /dev/null +++ b/packages/client-ts/src/models/StaticDeviceRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for static authenticator devices + * @export + * @interface StaticDeviceRequest + */ +export interface StaticDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof StaticDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the StaticDeviceRequest interface. + */ +export function instanceOfStaticDeviceRequest(value: object): value is StaticDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function StaticDeviceRequestFromJSON(json: any): StaticDeviceRequest { + return StaticDeviceRequestFromJSONTyped(json, false); +} + +export function StaticDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StaticDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function StaticDeviceRequestToJSON(json: any): StaticDeviceRequest { + return StaticDeviceRequestToJSONTyped(json, false); +} + +export function StaticDeviceRequestToJSONTyped(value?: StaticDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/StaticDeviceToken.ts b/packages/client-ts/src/models/StaticDeviceToken.ts new file mode 100644 index 0000000000..d3775ea0ab --- /dev/null +++ b/packages/client-ts/src/models/StaticDeviceToken.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for static device's tokens + * @export + * @interface StaticDeviceToken + */ +export interface StaticDeviceToken { + /** + * + * @type {string} + * @memberof StaticDeviceToken + */ + token: string; +} + +/** + * Check if a given object implements the StaticDeviceToken interface. + */ +export function instanceOfStaticDeviceToken(value: object): value is StaticDeviceToken { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function StaticDeviceTokenFromJSON(json: any): StaticDeviceToken { + return StaticDeviceTokenFromJSONTyped(json, false); +} + +export function StaticDeviceTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): StaticDeviceToken { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function StaticDeviceTokenToJSON(json: any): StaticDeviceToken { + return StaticDeviceTokenToJSONTyped(json, false); +} + +export function StaticDeviceTokenToJSONTyped(value?: StaticDeviceToken | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + }; +} + diff --git a/packages/client-ts/src/models/SubModeEnum.ts b/packages/client-ts/src/models/SubModeEnum.ts new file mode 100644 index 0000000000..4533eae824 --- /dev/null +++ b/packages/client-ts/src/models/SubModeEnum.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SubModeEnum = { + HashedUserId: 'hashed_user_id', + UserId: 'user_id', + UserUuid: 'user_uuid', + UserUsername: 'user_username', + UserEmail: 'user_email', + UserUpn: 'user_upn', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SubModeEnum = typeof SubModeEnum[keyof typeof SubModeEnum]; + + +export function instanceOfSubModeEnum(value: any): boolean { + for (const key in SubModeEnum) { + if (Object.prototype.hasOwnProperty.call(SubModeEnum, key)) { + if (SubModeEnum[key as keyof typeof SubModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SubModeEnumFromJSON(json: any): SubModeEnum { + return SubModeEnumFromJSONTyped(json, false); +} + +export function SubModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubModeEnum { + return json as SubModeEnum; +} + +export function SubModeEnumToJSON(value?: SubModeEnum | null): any { + return value as any; +} + +export function SubModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SubModeEnum { + return value as SubModeEnum; +} + diff --git a/packages/client-ts/src/models/SyncObjectModelEnum.ts b/packages/client-ts/src/models/SyncObjectModelEnum.ts new file mode 100644 index 0000000000..1af2ec1a24 --- /dev/null +++ b/packages/client-ts/src/models/SyncObjectModelEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SyncObjectModelEnum = { + AuthentikCoreModelsUser: 'authentik.core.models.User', + AuthentikCoreModelsGroup: 'authentik.core.models.Group', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SyncObjectModelEnum = typeof SyncObjectModelEnum[keyof typeof SyncObjectModelEnum]; + + +export function instanceOfSyncObjectModelEnum(value: any): boolean { + for (const key in SyncObjectModelEnum) { + if (Object.prototype.hasOwnProperty.call(SyncObjectModelEnum, key)) { + if (SyncObjectModelEnum[key as keyof typeof SyncObjectModelEnum] === value) { + return true; + } + } + } + return false; +} + +export function SyncObjectModelEnumFromJSON(json: any): SyncObjectModelEnum { + return SyncObjectModelEnumFromJSONTyped(json, false); +} + +export function SyncObjectModelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncObjectModelEnum { + return json as SyncObjectModelEnum; +} + +export function SyncObjectModelEnumToJSON(value?: SyncObjectModelEnum | null): any { + return value as any; +} + +export function SyncObjectModelEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SyncObjectModelEnum { + return value as SyncObjectModelEnum; +} + diff --git a/packages/client-ts/src/models/SyncObjectRequest.ts b/packages/client-ts/src/models/SyncObjectRequest.ts new file mode 100644 index 0000000000..e43c5dba84 --- /dev/null +++ b/packages/client-ts/src/models/SyncObjectRequest.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SyncObjectModelEnum } from './SyncObjectModelEnum'; +import { + SyncObjectModelEnumFromJSON, + SyncObjectModelEnumFromJSONTyped, + SyncObjectModelEnumToJSON, + SyncObjectModelEnumToJSONTyped, +} from './SyncObjectModelEnum'; + +/** + * Sync object serializer + * @export + * @interface SyncObjectRequest + */ +export interface SyncObjectRequest { + /** + * + * @type {SyncObjectModelEnum} + * @memberof SyncObjectRequest + */ + syncObjectModel: SyncObjectModelEnum; + /** + * + * @type {string} + * @memberof SyncObjectRequest + */ + syncObjectId: string; + /** + * + * @type {boolean} + * @memberof SyncObjectRequest + */ + overrideDryRun?: boolean; +} + + + +/** + * Check if a given object implements the SyncObjectRequest interface. + */ +export function instanceOfSyncObjectRequest(value: object): value is SyncObjectRequest { + if (!('syncObjectModel' in value) || value['syncObjectModel'] === undefined) return false; + if (!('syncObjectId' in value) || value['syncObjectId'] === undefined) return false; + return true; +} + +export function SyncObjectRequestFromJSON(json: any): SyncObjectRequest { + return SyncObjectRequestFromJSONTyped(json, false); +} + +export function SyncObjectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncObjectRequest { + if (json == null) { + return json; + } + return { + + 'syncObjectModel': SyncObjectModelEnumFromJSON(json['sync_object_model']), + 'syncObjectId': json['sync_object_id'], + 'overrideDryRun': json['override_dry_run'] == null ? undefined : json['override_dry_run'], + }; +} + +export function SyncObjectRequestToJSON(json: any): SyncObjectRequest { + return SyncObjectRequestToJSONTyped(json, false); +} + +export function SyncObjectRequestToJSONTyped(value?: SyncObjectRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'sync_object_model': SyncObjectModelEnumToJSON(value['syncObjectModel']), + 'sync_object_id': value['syncObjectId'], + 'override_dry_run': value['overrideDryRun'], + }; +} + diff --git a/packages/client-ts/src/models/SyncObjectResult.ts b/packages/client-ts/src/models/SyncObjectResult.ts new file mode 100644 index 0000000000..fd977fccd4 --- /dev/null +++ b/packages/client-ts/src/models/SyncObjectResult.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LogEvent } from './LogEvent'; +import { + LogEventFromJSON, + LogEventFromJSONTyped, + LogEventToJSON, + LogEventToJSONTyped, +} from './LogEvent'; + +/** + * Result of a single object sync + * @export + * @interface SyncObjectResult + */ +export interface SyncObjectResult { + /** + * + * @type {Array} + * @memberof SyncObjectResult + */ + readonly messages: Array; +} + +/** + * Check if a given object implements the SyncObjectResult interface. + */ +export function instanceOfSyncObjectResult(value: object): value is SyncObjectResult { + if (!('messages' in value) || value['messages'] === undefined) return false; + return true; +} + +export function SyncObjectResultFromJSON(json: any): SyncObjectResult { + return SyncObjectResultFromJSONTyped(json, false); +} + +export function SyncObjectResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncObjectResult { + if (json == null) { + return json; + } + return { + + 'messages': ((json['messages'] as Array).map(LogEventFromJSON)), + }; +} + +export function SyncObjectResultToJSON(json: any): SyncObjectResult { + return SyncObjectResultToJSONTyped(json, false); +} + +export function SyncObjectResultToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/SyncOutgoingTriggerModeEnum.ts b/packages/client-ts/src/models/SyncOutgoingTriggerModeEnum.ts new file mode 100644 index 0000000000..9d971a4389 --- /dev/null +++ b/packages/client-ts/src/models/SyncOutgoingTriggerModeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const SyncOutgoingTriggerModeEnum = { + None: 'none', + Immediate: 'immediate', + DeferredEnd: 'deferred_end', + UnknownDefaultOpenApi: '11184809' +} as const; +export type SyncOutgoingTriggerModeEnum = typeof SyncOutgoingTriggerModeEnum[keyof typeof SyncOutgoingTriggerModeEnum]; + + +export function instanceOfSyncOutgoingTriggerModeEnum(value: any): boolean { + for (const key in SyncOutgoingTriggerModeEnum) { + if (Object.prototype.hasOwnProperty.call(SyncOutgoingTriggerModeEnum, key)) { + if (SyncOutgoingTriggerModeEnum[key as keyof typeof SyncOutgoingTriggerModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function SyncOutgoingTriggerModeEnumFromJSON(json: any): SyncOutgoingTriggerModeEnum { + return SyncOutgoingTriggerModeEnumFromJSONTyped(json, false); +} + +export function SyncOutgoingTriggerModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncOutgoingTriggerModeEnum { + return json as SyncOutgoingTriggerModeEnum; +} + +export function SyncOutgoingTriggerModeEnumToJSON(value?: SyncOutgoingTriggerModeEnum | null): any { + return value as any; +} + +export function SyncOutgoingTriggerModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): SyncOutgoingTriggerModeEnum { + return value as SyncOutgoingTriggerModeEnum; +} + diff --git a/packages/client-ts/src/models/SyncStatus.ts b/packages/client-ts/src/models/SyncStatus.ts new file mode 100644 index 0000000000..4a56c63320 --- /dev/null +++ b/packages/client-ts/src/models/SyncStatus.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { TaskAggregatedStatusEnum } from './TaskAggregatedStatusEnum'; +import { + TaskAggregatedStatusEnumFromJSON, + TaskAggregatedStatusEnumFromJSONTyped, + TaskAggregatedStatusEnumToJSON, + TaskAggregatedStatusEnumToJSONTyped, +} from './TaskAggregatedStatusEnum'; + +/** + * Provider/source sync status + * @export + * @interface SyncStatus + */ +export interface SyncStatus { + /** + * + * @type {boolean} + * @memberof SyncStatus + */ + isRunning: boolean; + /** + * + * @type {Date} + * @memberof SyncStatus + */ + lastSuccessfulSync?: Date; + /** + * + * @type {TaskAggregatedStatusEnum} + * @memberof SyncStatus + */ + lastSyncStatus?: TaskAggregatedStatusEnum; +} + + + +/** + * Check if a given object implements the SyncStatus interface. + */ +export function instanceOfSyncStatus(value: object): value is SyncStatus { + if (!('isRunning' in value) || value['isRunning'] === undefined) return false; + return true; +} + +export function SyncStatusFromJSON(json: any): SyncStatus { + return SyncStatusFromJSONTyped(json, false); +} + +export function SyncStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncStatus { + if (json == null) { + return json; + } + return { + + 'isRunning': json['is_running'], + 'lastSuccessfulSync': json['last_successful_sync'] == null ? undefined : (new Date(json['last_successful_sync'])), + 'lastSyncStatus': json['last_sync_status'] == null ? undefined : TaskAggregatedStatusEnumFromJSON(json['last_sync_status']), + }; +} + +export function SyncStatusToJSON(json: any): SyncStatus { + return SyncStatusToJSONTyped(json, false); +} + +export function SyncStatusToJSONTyped(value?: SyncStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'is_running': value['isRunning'], + 'last_successful_sync': value['lastSuccessfulSync'] == null ? value['lastSuccessfulSync'] : value['lastSuccessfulSync'].toISOString(), + 'last_sync_status': TaskAggregatedStatusEnumToJSON(value['lastSyncStatus']), + }; +} + diff --git a/packages/client-ts/src/models/SystemInfo.ts b/packages/client-ts/src/models/SystemInfo.ts new file mode 100644 index 0000000000..8504c078e9 --- /dev/null +++ b/packages/client-ts/src/models/SystemInfo.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SystemInfoRuntime } from './SystemInfoRuntime'; +import { + SystemInfoRuntimeFromJSON, + SystemInfoRuntimeFromJSONTyped, + SystemInfoRuntimeToJSON, + SystemInfoRuntimeToJSONTyped, +} from './SystemInfoRuntime'; + +/** + * Get system information. + * @export + * @interface SystemInfo + */ +export interface SystemInfo { + /** + * Get HTTP Request headers + * @type {{ [key: string]: string; }} + * @memberof SystemInfo + */ + readonly httpHeaders: { [key: string]: string; }; + /** + * Get HTTP host + * @type {string} + * @memberof SystemInfo + */ + readonly httpHost: string; + /** + * Get HTTP Secure flag + * @type {boolean} + * @memberof SystemInfo + */ + readonly httpIsSecure: boolean; + /** + * + * @type {SystemInfoRuntime} + * @memberof SystemInfo + */ + runtime: SystemInfoRuntime; + /** + * Currently active brand + * @type {string} + * @memberof SystemInfo + */ + readonly brand: string; + /** + * Current server time + * @type {Date} + * @memberof SystemInfo + */ + readonly serverTime: Date; + /** + * Whether the embedded outpost is disabled + * @type {boolean} + * @memberof SystemInfo + */ + readonly embeddedOutpostDisabled: boolean; + /** + * Get the FQDN configured on the embedded outpost + * @type {string} + * @memberof SystemInfo + */ + readonly embeddedOutpostHost: string; +} + +/** + * Check if a given object implements the SystemInfo interface. + */ +export function instanceOfSystemInfo(value: object): value is SystemInfo { + if (!('httpHeaders' in value) || value['httpHeaders'] === undefined) return false; + if (!('httpHost' in value) || value['httpHost'] === undefined) return false; + if (!('httpIsSecure' in value) || value['httpIsSecure'] === undefined) return false; + if (!('runtime' in value) || value['runtime'] === undefined) return false; + if (!('brand' in value) || value['brand'] === undefined) return false; + if (!('serverTime' in value) || value['serverTime'] === undefined) return false; + if (!('embeddedOutpostDisabled' in value) || value['embeddedOutpostDisabled'] === undefined) return false; + if (!('embeddedOutpostHost' in value) || value['embeddedOutpostHost'] === undefined) return false; + return true; +} + +export function SystemInfoFromJSON(json: any): SystemInfo { + return SystemInfoFromJSONTyped(json, false); +} + +export function SystemInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfo { + if (json == null) { + return json; + } + return { + + 'httpHeaders': json['http_headers'], + 'httpHost': json['http_host'], + 'httpIsSecure': json['http_is_secure'], + 'runtime': SystemInfoRuntimeFromJSON(json['runtime']), + 'brand': json['brand'], + 'serverTime': (new Date(json['server_time'])), + 'embeddedOutpostDisabled': json['embedded_outpost_disabled'], + 'embeddedOutpostHost': json['embedded_outpost_host'], + }; +} + +export function SystemInfoToJSON(json: any): SystemInfo { + return SystemInfoToJSONTyped(json, false); +} + +export function SystemInfoToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'runtime': SystemInfoRuntimeToJSON(value['runtime']), + }; +} + diff --git a/packages/client-ts/src/models/SystemInfoRuntime.ts b/packages/client-ts/src/models/SystemInfoRuntime.ts new file mode 100644 index 0000000000..b08cbb21e4 --- /dev/null +++ b/packages/client-ts/src/models/SystemInfoRuntime.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Get versions + * @export + * @interface SystemInfoRuntime + */ +export interface SystemInfoRuntime { + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + pythonVersion: string; + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + environment: string; + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + architecture: string; + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + platform: string; + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + uname: string; + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + opensslVersion: string; + /** + * + * @type {boolean} + * @memberof SystemInfoRuntime + */ + opensslFipsEnabled: boolean | null; + /** + * + * @type {string} + * @memberof SystemInfoRuntime + */ + authentikVersion: string; +} + +/** + * Check if a given object implements the SystemInfoRuntime interface. + */ +export function instanceOfSystemInfoRuntime(value: object): value is SystemInfoRuntime { + if (!('pythonVersion' in value) || value['pythonVersion'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + if (!('architecture' in value) || value['architecture'] === undefined) return false; + if (!('platform' in value) || value['platform'] === undefined) return false; + if (!('uname' in value) || value['uname'] === undefined) return false; + if (!('opensslVersion' in value) || value['opensslVersion'] === undefined) return false; + if (!('opensslFipsEnabled' in value) || value['opensslFipsEnabled'] === undefined) return false; + if (!('authentikVersion' in value) || value['authentikVersion'] === undefined) return false; + return true; +} + +export function SystemInfoRuntimeFromJSON(json: any): SystemInfoRuntime { + return SystemInfoRuntimeFromJSONTyped(json, false); +} + +export function SystemInfoRuntimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfoRuntime { + if (json == null) { + return json; + } + return { + + 'pythonVersion': json['python_version'], + 'environment': json['environment'], + 'architecture': json['architecture'], + 'platform': json['platform'], + 'uname': json['uname'], + 'opensslVersion': json['openssl_version'], + 'opensslFipsEnabled': json['openssl_fips_enabled'], + 'authentikVersion': json['authentik_version'], + }; +} + +export function SystemInfoRuntimeToJSON(json: any): SystemInfoRuntime { + return SystemInfoRuntimeToJSONTyped(json, false); +} + +export function SystemInfoRuntimeToJSONTyped(value?: SystemInfoRuntime | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'python_version': value['pythonVersion'], + 'environment': value['environment'], + 'architecture': value['architecture'], + 'platform': value['platform'], + 'uname': value['uname'], + 'openssl_version': value['opensslVersion'], + 'openssl_fips_enabled': value['opensslFipsEnabled'], + 'authentik_version': value['authentikVersion'], + }; +} + diff --git a/packages/client-ts/src/models/TOTPDevice.ts b/packages/client-ts/src/models/TOTPDevice.ts new file mode 100644 index 0000000000..34cd688831 --- /dev/null +++ b/packages/client-ts/src/models/TOTPDevice.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; + +/** + * Serializer for totp authenticator devices + * @export + * @interface TOTPDevice + */ +export interface TOTPDevice { + /** + * The human-readable name of this device. + * @type {string} + * @memberof TOTPDevice + */ + name: string; + /** + * + * @type {number} + * @memberof TOTPDevice + */ + readonly pk: number; + /** + * + * @type {PartialUser} + * @memberof TOTPDevice + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the TOTPDevice interface. + */ +export function instanceOfTOTPDevice(value: object): value is TOTPDevice { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function TOTPDeviceFromJSON(json: any): TOTPDevice { + return TOTPDeviceFromJSONTyped(json, false); +} + +export function TOTPDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TOTPDevice { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'pk': json['pk'], + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function TOTPDeviceToJSON(json: any): TOTPDevice { + return TOTPDeviceToJSONTyped(json, false); +} + +export function TOTPDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/TOTPDeviceRequest.ts b/packages/client-ts/src/models/TOTPDeviceRequest.ts new file mode 100644 index 0000000000..bfc202e297 --- /dev/null +++ b/packages/client-ts/src/models/TOTPDeviceRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for totp authenticator devices + * @export + * @interface TOTPDeviceRequest + */ +export interface TOTPDeviceRequest { + /** + * The human-readable name of this device. + * @type {string} + * @memberof TOTPDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the TOTPDeviceRequest interface. + */ +export function instanceOfTOTPDeviceRequest(value: object): value is TOTPDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function TOTPDeviceRequestFromJSON(json: any): TOTPDeviceRequest { + return TOTPDeviceRequestFromJSONTyped(json, false); +} + +export function TOTPDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TOTPDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function TOTPDeviceRequestToJSON(json: any): TOTPDeviceRequest { + return TOTPDeviceRequestToJSONTyped(json, false); +} + +export function TOTPDeviceRequestToJSONTyped(value?: TOTPDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/Task.ts b/packages/client-ts/src/models/Task.ts new file mode 100644 index 0000000000..d0e424e224 --- /dev/null +++ b/packages/client-ts/src/models/Task.ts @@ -0,0 +1,203 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { LogEvent } from './LogEvent'; +import { + LogEventFromJSON, + LogEventFromJSONTyped, + LogEventToJSON, + LogEventToJSONTyped, +} from './LogEvent'; +import type { TaskAggregatedStatusEnum } from './TaskAggregatedStatusEnum'; +import { + TaskAggregatedStatusEnumFromJSON, + TaskAggregatedStatusEnumFromJSONTyped, + TaskAggregatedStatusEnumToJSON, + TaskAggregatedStatusEnumToJSONTyped, +} from './TaskAggregatedStatusEnum'; +import type { TaskStateEnum } from './TaskStateEnum'; +import { + TaskStateEnumFromJSON, + TaskStateEnumFromJSONTyped, + TaskStateEnumToJSON, + TaskStateEnumToJSONTyped, +} from './TaskStateEnum'; + +/** + * + * @export + * @interface Task + */ +export interface Task { + /** + * + * @type {string} + * @memberof Task + */ + messageId?: string; + /** + * Queue name + * @type {string} + * @memberof Task + */ + queueName?: string; + /** + * Dramatiq actor name + * @type {string} + * @memberof Task + */ + actorName: string; + /** + * Task status + * @type {TaskStateEnum} + * @memberof Task + */ + state?: TaskStateEnum; + /** + * Task last modified time + * @type {Date} + * @memberof Task + */ + mtime?: Date; + /** + * Number of retries + * @type {number} + * @memberof Task + */ + retries?: number; + /** + * Planned execution time + * @type {Date} + * @memberof Task + */ + eta?: Date | null; + /** + * + * @type {string} + * @memberof Task + */ + readonly relObjAppLabel: string; + /** + * + * @type {string} + * @memberof Task + */ + readonly relObjModel: string; + /** + * + * @type {string} + * @memberof Task + */ + relObjId?: string | null; + /** + * + * @type {string} + * @memberof Task + */ + readonly uid: string; + /** + * + * @type {Array} + * @memberof Task + */ + readonly logs: Array; + /** + * + * @type {Array} + * @memberof Task + */ + readonly previousLogs: Array; + /** + * + * @type {TaskAggregatedStatusEnum} + * @memberof Task + */ + aggregatedStatus: TaskAggregatedStatusEnum; + /** + * + * @type {string} + * @memberof Task + */ + readonly description: string | null; +} + + + +/** + * Check if a given object implements the Task interface. + */ +export function instanceOfTask(value: object): value is Task { + if (!('actorName' in value) || value['actorName'] === undefined) return false; + if (!('relObjAppLabel' in value) || value['relObjAppLabel'] === undefined) return false; + if (!('relObjModel' in value) || value['relObjModel'] === undefined) return false; + if (!('uid' in value) || value['uid'] === undefined) return false; + if (!('logs' in value) || value['logs'] === undefined) return false; + if (!('previousLogs' in value) || value['previousLogs'] === undefined) return false; + if (!('aggregatedStatus' in value) || value['aggregatedStatus'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + return true; +} + +export function TaskFromJSON(json: any): Task { + return TaskFromJSONTyped(json, false); +} + +export function TaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): Task { + if (json == null) { + return json; + } + return { + + 'messageId': json['message_id'] == null ? undefined : json['message_id'], + 'queueName': json['queue_name'] == null ? undefined : json['queue_name'], + 'actorName': json['actor_name'], + 'state': json['state'] == null ? undefined : TaskStateEnumFromJSON(json['state']), + 'mtime': json['mtime'] == null ? undefined : (new Date(json['mtime'])), + 'retries': json['retries'] == null ? undefined : json['retries'], + 'eta': json['eta'] == null ? undefined : (new Date(json['eta'])), + 'relObjAppLabel': json['rel_obj_app_label'], + 'relObjModel': json['rel_obj_model'], + 'relObjId': json['rel_obj_id'] == null ? undefined : json['rel_obj_id'], + 'uid': json['uid'], + 'logs': ((json['logs'] as Array).map(LogEventFromJSON)), + 'previousLogs': ((json['previous_logs'] as Array).map(LogEventFromJSON)), + 'aggregatedStatus': TaskAggregatedStatusEnumFromJSON(json['aggregated_status']), + 'description': json['description'], + }; +} + +export function TaskToJSON(json: any): Task { + return TaskToJSONTyped(json, false); +} + +export function TaskToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'message_id': value['messageId'], + 'queue_name': value['queueName'], + 'actor_name': value['actorName'], + 'state': TaskStateEnumToJSON(value['state']), + 'mtime': value['mtime'] == null ? value['mtime'] : value['mtime'].toISOString(), + 'retries': value['retries'], + 'eta': value['eta'] == null ? value['eta'] : value['eta'].toISOString(), + 'rel_obj_id': value['relObjId'], + 'aggregated_status': TaskAggregatedStatusEnumToJSON(value['aggregatedStatus']), + }; +} + diff --git a/packages/client-ts/src/models/TaskAggregatedStatusEnum.ts b/packages/client-ts/src/models/TaskAggregatedStatusEnum.ts new file mode 100644 index 0000000000..64f75d45b6 --- /dev/null +++ b/packages/client-ts/src/models/TaskAggregatedStatusEnum.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const TaskAggregatedStatusEnum = { + Queued: 'queued', + Consumed: 'consumed', + Preprocess: 'preprocess', + Running: 'running', + Postprocess: 'postprocess', + Rejected: 'rejected', + Done: 'done', + Info: 'info', + Warning: 'warning', + Error: 'error', + UnknownDefaultOpenApi: '11184809' +} as const; +export type TaskAggregatedStatusEnum = typeof TaskAggregatedStatusEnum[keyof typeof TaskAggregatedStatusEnum]; + + +export function instanceOfTaskAggregatedStatusEnum(value: any): boolean { + for (const key in TaskAggregatedStatusEnum) { + if (Object.prototype.hasOwnProperty.call(TaskAggregatedStatusEnum, key)) { + if (TaskAggregatedStatusEnum[key as keyof typeof TaskAggregatedStatusEnum] === value) { + return true; + } + } + } + return false; +} + +export function TaskAggregatedStatusEnumFromJSON(json: any): TaskAggregatedStatusEnum { + return TaskAggregatedStatusEnumFromJSONTyped(json, false); +} + +export function TaskAggregatedStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskAggregatedStatusEnum { + return json as TaskAggregatedStatusEnum; +} + +export function TaskAggregatedStatusEnumToJSON(value?: TaskAggregatedStatusEnum | null): any { + return value as any; +} + +export function TaskAggregatedStatusEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TaskAggregatedStatusEnum { + return value as TaskAggregatedStatusEnum; +} + diff --git a/packages/client-ts/src/models/TaskStateEnum.ts b/packages/client-ts/src/models/TaskStateEnum.ts new file mode 100644 index 0000000000..e19b2798af --- /dev/null +++ b/packages/client-ts/src/models/TaskStateEnum.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const TaskStateEnum = { + Queued: 'queued', + Consumed: 'consumed', + Preprocess: 'preprocess', + Running: 'running', + Postprocess: 'postprocess', + Rejected: 'rejected', + Done: 'done', + UnknownDefaultOpenApi: '11184809' +} as const; +export type TaskStateEnum = typeof TaskStateEnum[keyof typeof TaskStateEnum]; + + +export function instanceOfTaskStateEnum(value: any): boolean { + for (const key in TaskStateEnum) { + if (Object.prototype.hasOwnProperty.call(TaskStateEnum, key)) { + if (TaskStateEnum[key as keyof typeof TaskStateEnum] === value) { + return true; + } + } + } + return false; +} + +export function TaskStateEnumFromJSON(json: any): TaskStateEnum { + return TaskStateEnumFromJSONTyped(json, false); +} + +export function TaskStateEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskStateEnum { + return json as TaskStateEnum; +} + +export function TaskStateEnumToJSON(value?: TaskStateEnum | null): any { + return value as any; +} + +export function TaskStateEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TaskStateEnum { + return value as TaskStateEnum; +} + diff --git a/packages/client-ts/src/models/TelegramAuthRequest.ts b/packages/client-ts/src/models/TelegramAuthRequest.ts new file mode 100644 index 0000000000..d4fc8eec1c --- /dev/null +++ b/packages/client-ts/src/models/TelegramAuthRequest.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface TelegramAuthRequest + */ +export interface TelegramAuthRequest { + /** + * + * @type {number} + * @memberof TelegramAuthRequest + */ + id: number; + /** + * + * @type {string} + * @memberof TelegramAuthRequest + */ + firstName?: string; + /** + * + * @type {string} + * @memberof TelegramAuthRequest + */ + lastName?: string; + /** + * + * @type {string} + * @memberof TelegramAuthRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof TelegramAuthRequest + */ + photoUrl?: string; + /** + * + * @type {number} + * @memberof TelegramAuthRequest + */ + authDate: number; + /** + * + * @type {string} + * @memberof TelegramAuthRequest + */ + hash: string; +} + +/** + * Check if a given object implements the TelegramAuthRequest interface. + */ +export function instanceOfTelegramAuthRequest(value: object): value is TelegramAuthRequest { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('authDate' in value) || value['authDate'] === undefined) return false; + if (!('hash' in value) || value['hash'] === undefined) return false; + return true; +} + +export function TelegramAuthRequestFromJSON(json: any): TelegramAuthRequest { + return TelegramAuthRequestFromJSONTyped(json, false); +} + +export function TelegramAuthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramAuthRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'firstName': json['first_name'] == null ? undefined : json['first_name'], + 'lastName': json['last_name'] == null ? undefined : json['last_name'], + 'username': json['username'] == null ? undefined : json['username'], + 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'], + 'authDate': json['auth_date'], + 'hash': json['hash'], + }; +} + +export function TelegramAuthRequestToJSON(json: any): TelegramAuthRequest { + return TelegramAuthRequestToJSONTyped(json, false); +} + +export function TelegramAuthRequestToJSONTyped(value?: TelegramAuthRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'first_name': value['firstName'], + 'last_name': value['lastName'], + 'username': value['username'], + 'photo_url': value['photoUrl'], + 'auth_date': value['authDate'], + 'hash': value['hash'], + }; +} + diff --git a/packages/client-ts/src/models/TelegramChallengeResponseRequest.ts b/packages/client-ts/src/models/TelegramChallengeResponseRequest.ts new file mode 100644 index 0000000000..4890fcdb39 --- /dev/null +++ b/packages/client-ts/src/models/TelegramChallengeResponseRequest.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Base class for all challenge responses + * @export + * @interface TelegramChallengeResponseRequest + */ +export interface TelegramChallengeResponseRequest { + /** + * + * @type {number} + * @memberof TelegramChallengeResponseRequest + */ + id: number; + /** + * + * @type {string} + * @memberof TelegramChallengeResponseRequest + */ + firstName?: string; + /** + * + * @type {string} + * @memberof TelegramChallengeResponseRequest + */ + lastName?: string; + /** + * + * @type {string} + * @memberof TelegramChallengeResponseRequest + */ + username?: string; + /** + * + * @type {string} + * @memberof TelegramChallengeResponseRequest + */ + photoUrl?: string; + /** + * + * @type {number} + * @memberof TelegramChallengeResponseRequest + */ + authDate: number; + /** + * + * @type {string} + * @memberof TelegramChallengeResponseRequest + */ + hash: string; + /** + * + * @type {string} + * @memberof TelegramChallengeResponseRequest + */ + component?: string; +} + +/** + * Check if a given object implements the TelegramChallengeResponseRequest interface. + */ +export function instanceOfTelegramChallengeResponseRequest(value: object): value is TelegramChallengeResponseRequest { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('authDate' in value) || value['authDate'] === undefined) return false; + if (!('hash' in value) || value['hash'] === undefined) return false; + return true; +} + +export function TelegramChallengeResponseRequestFromJSON(json: any): TelegramChallengeResponseRequest { + return TelegramChallengeResponseRequestFromJSONTyped(json, false); +} + +export function TelegramChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'firstName': json['first_name'] == null ? undefined : json['first_name'], + 'lastName': json['last_name'] == null ? undefined : json['last_name'], + 'username': json['username'] == null ? undefined : json['username'], + 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'], + 'authDate': json['auth_date'], + 'hash': json['hash'], + 'component': json['component'] == null ? undefined : json['component'], + }; +} + +export function TelegramChallengeResponseRequestToJSON(json: any): TelegramChallengeResponseRequest { + return TelegramChallengeResponseRequestToJSONTyped(json, false); +} + +export function TelegramChallengeResponseRequestToJSONTyped(value?: TelegramChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'first_name': value['firstName'], + 'last_name': value['lastName'], + 'username': value['username'], + 'photo_url': value['photoUrl'], + 'auth_date': value['authDate'], + 'hash': value['hash'], + 'component': value['component'], + }; +} + diff --git a/packages/client-ts/src/models/TelegramLoginChallenge.ts b/packages/client-ts/src/models/TelegramLoginChallenge.ts new file mode 100644 index 0000000000..2e363e536e --- /dev/null +++ b/packages/client-ts/src/models/TelegramLoginChallenge.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Base login challenge for Identification stage + * @export + * @interface TelegramLoginChallenge + */ +export interface TelegramLoginChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof TelegramLoginChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof TelegramLoginChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof TelegramLoginChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * Telegram bot username + * @type {string} + * @memberof TelegramLoginChallenge + */ + botUsername: string; + /** + * + * @type {boolean} + * @memberof TelegramLoginChallenge + */ + requestMessageAccess: boolean; +} + +/** + * Check if a given object implements the TelegramLoginChallenge interface. + */ +export function instanceOfTelegramLoginChallenge(value: object): value is TelegramLoginChallenge { + if (!('botUsername' in value) || value['botUsername'] === undefined) return false; + if (!('requestMessageAccess' in value) || value['requestMessageAccess'] === undefined) return false; + return true; +} + +export function TelegramLoginChallengeFromJSON(json: any): TelegramLoginChallenge { + return TelegramLoginChallengeFromJSONTyped(json, false); +} + +export function TelegramLoginChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramLoginChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'botUsername': json['bot_username'], + 'requestMessageAccess': json['request_message_access'], + }; +} + +export function TelegramLoginChallengeToJSON(json: any): TelegramLoginChallenge { + return TelegramLoginChallengeToJSONTyped(json, false); +} + +export function TelegramLoginChallengeToJSONTyped(value?: TelegramLoginChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'bot_username': value['botUsername'], + 'request_message_access': value['requestMessageAccess'], + }; +} + diff --git a/packages/client-ts/src/models/TelegramSource.ts b/packages/client-ts/src/models/TelegramSource.ts new file mode 100644 index 0000000000..57fa528c73 --- /dev/null +++ b/packages/client-ts/src/models/TelegramSource.ts @@ -0,0 +1,269 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; +import type { ThemedUrls } from './ThemedUrls'; +import { + ThemedUrlsFromJSON, + ThemedUrlsFromJSONTyped, + ThemedUrlsToJSON, + ThemedUrlsToJSONTyped, +} from './ThemedUrls'; + +/** + * Source Serializer + * @export + * @interface TelegramSource + */ +export interface TelegramSource { + /** + * + * @type {string} + * @memberof TelegramSource + */ + readonly pk: string; + /** + * Source's display Name. + * @type {string} + * @memberof TelegramSource + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof TelegramSource + */ + slug: string; + /** + * + * @type {boolean} + * @memberof TelegramSource + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof TelegramSource + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof TelegramSource + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof TelegramSource + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof TelegramSource + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof TelegramSource + */ + groupPropertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof TelegramSource + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof TelegramSource + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof TelegramSource + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof TelegramSource + */ + readonly metaModelName: string; + /** + * + * @type {PolicyEngineMode} + * @memberof TelegramSource + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof TelegramSource + */ + 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. + * @type {string} + * @memberof TelegramSource + */ + readonly managed: string | null; + /** + * + * @type {string} + * @memberof TelegramSource + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof TelegramSource + */ + icon?: string; + /** + * + * @type {string} + * @memberof TelegramSource + */ + readonly iconUrl: string | null; + /** + * + * @type {ThemedUrls} + * @memberof TelegramSource + */ + readonly iconThemedUrls: ThemedUrls | null; + /** + * Telegram bot username + * @type {string} + * @memberof TelegramSource + */ + botUsername: string; + /** + * Request access to send messages from your bot. + * @type {boolean} + * @memberof TelegramSource + */ + requestMessageAccess?: boolean; + /** + * Flow used before authentication. + * @type {string} + * @memberof TelegramSource + */ + preAuthenticationFlow: string; +} + + + +/** + * Check if a given object implements the TelegramSource interface. + */ +export function instanceOfTelegramSource(value: object): value is TelegramSource { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('managed' in value) || value['managed'] === undefined) return false; + if (!('iconUrl' in value) || value['iconUrl'] === undefined) return false; + if (!('iconThemedUrls' in value) || value['iconThemedUrls'] === undefined) return false; + if (!('botUsername' in value) || value['botUsername'] === undefined) return false; + if (!('preAuthenticationFlow' in value) || value['preAuthenticationFlow'] === undefined) return false; + return true; +} + +export function TelegramSourceFromJSON(json: any): TelegramSource { + return TelegramSourceFromJSONTyped(json, false); +} + +export function TelegramSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramSource { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'managed': json['managed'], + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'iconUrl': json['icon_url'], + 'iconThemedUrls': ThemedUrlsFromJSON(json['icon_themed_urls']), + 'botUsername': json['bot_username'], + 'requestMessageAccess': json['request_message_access'] == null ? undefined : json['request_message_access'], + 'preAuthenticationFlow': json['pre_authentication_flow'], + }; +} + +export function TelegramSourceToJSON(json: any): TelegramSource { + return TelegramSourceToJSONTyped(json, false); +} + +export function TelegramSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'bot_username': value['botUsername'], + 'request_message_access': value['requestMessageAccess'], + 'pre_authentication_flow': value['preAuthenticationFlow'], + }; +} + diff --git a/packages/client-ts/src/models/TelegramSourcePropertyMapping.ts b/packages/client-ts/src/models/TelegramSourcePropertyMapping.ts new file mode 100644 index 0000000000..4531a688ef --- /dev/null +++ b/packages/client-ts/src/models/TelegramSourcePropertyMapping.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * TelegramSourcePropertyMapping Serializer + * @export + * @interface TelegramSourcePropertyMapping + */ +export interface TelegramSourcePropertyMapping { + /** + * + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + readonly pk: 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. + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + name: string; + /** + * + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + expression: string; + /** + * Get object's component so that we know how to edit the object + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof TelegramSourcePropertyMapping + */ + readonly metaModelName: string; +} + +/** + * Check if a given object implements the TelegramSourcePropertyMapping interface. + */ +export function instanceOfTelegramSourcePropertyMapping(value: object): value is TelegramSourcePropertyMapping { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + return true; +} + +export function TelegramSourcePropertyMappingFromJSON(json: any): TelegramSourcePropertyMapping { + return TelegramSourcePropertyMappingFromJSONTyped(json, false); +} + +export function TelegramSourcePropertyMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramSourcePropertyMapping { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + }; +} + +export function TelegramSourcePropertyMappingToJSON(json: any): TelegramSourcePropertyMapping { + return TelegramSourcePropertyMappingToJSONTyped(json, false); +} + +export function TelegramSourcePropertyMappingToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/TelegramSourcePropertyMappingRequest.ts b/packages/client-ts/src/models/TelegramSourcePropertyMappingRequest.ts new file mode 100644 index 0000000000..1792d5779c --- /dev/null +++ b/packages/client-ts/src/models/TelegramSourcePropertyMappingRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * TelegramSourcePropertyMapping Serializer + * @export + * @interface TelegramSourcePropertyMappingRequest + */ +export interface TelegramSourcePropertyMappingRequest { + /** + * 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. + * @type {string} + * @memberof TelegramSourcePropertyMappingRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof TelegramSourcePropertyMappingRequest + */ + name: string; + /** + * + * @type {string} + * @memberof TelegramSourcePropertyMappingRequest + */ + expression: string; +} + +/** + * Check if a given object implements the TelegramSourcePropertyMappingRequest interface. + */ +export function instanceOfTelegramSourcePropertyMappingRequest(value: object): value is TelegramSourcePropertyMappingRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function TelegramSourcePropertyMappingRequestFromJSON(json: any): TelegramSourcePropertyMappingRequest { + return TelegramSourcePropertyMappingRequestFromJSONTyped(json, false); +} + +export function TelegramSourcePropertyMappingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramSourcePropertyMappingRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'name': json['name'], + 'expression': json['expression'], + }; +} + +export function TelegramSourcePropertyMappingRequestToJSON(json: any): TelegramSourcePropertyMappingRequest { + return TelegramSourcePropertyMappingRequestToJSONTyped(json, false); +} + +export function TelegramSourcePropertyMappingRequestToJSONTyped(value?: TelegramSourcePropertyMappingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'name': value['name'], + 'expression': value['expression'], + }; +} + diff --git a/packages/client-ts/src/models/TelegramSourceRequest.ts b/packages/client-ts/src/models/TelegramSourceRequest.ts new file mode 100644 index 0000000000..eccd9b2f08 --- /dev/null +++ b/packages/client-ts/src/models/TelegramSourceRequest.ts @@ -0,0 +1,207 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PolicyEngineMode } from './PolicyEngineMode'; +import { + PolicyEngineModeFromJSON, + PolicyEngineModeFromJSONTyped, + PolicyEngineModeToJSON, + PolicyEngineModeToJSONTyped, +} from './PolicyEngineMode'; +import type { UserMatchingModeEnum } from './UserMatchingModeEnum'; +import { + UserMatchingModeEnumFromJSON, + UserMatchingModeEnumFromJSONTyped, + UserMatchingModeEnumToJSON, + UserMatchingModeEnumToJSONTyped, +} from './UserMatchingModeEnum'; + +/** + * Source Serializer + * @export + * @interface TelegramSourceRequest + */ +export interface TelegramSourceRequest { + /** + * Source's display Name. + * @type {string} + * @memberof TelegramSourceRequest + */ + name: string; + /** + * Internal source name, used in URLs. + * @type {string} + * @memberof TelegramSourceRequest + */ + slug: string; + /** + * + * @type {boolean} + * @memberof TelegramSourceRequest + */ + enabled?: boolean; + /** + * When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon. + * @type {boolean} + * @memberof TelegramSourceRequest + */ + promoted?: boolean; + /** + * Flow to use when authenticating existing users. + * @type {string} + * @memberof TelegramSourceRequest + */ + authenticationFlow?: string | null; + /** + * Flow to use when enrolling new users. + * @type {string} + * @memberof TelegramSourceRequest + */ + enrollmentFlow?: string | null; + /** + * + * @type {Array} + * @memberof TelegramSourceRequest + */ + userPropertyMappings?: Array; + /** + * + * @type {Array} + * @memberof TelegramSourceRequest + */ + groupPropertyMappings?: Array; + /** + * + * @type {PolicyEngineMode} + * @memberof TelegramSourceRequest + */ + policyEngineMode?: PolicyEngineMode; + /** + * How the source determines if an existing user should be authenticated or a new user enrolled. + * @type {UserMatchingModeEnum} + * @memberof TelegramSourceRequest + */ + userMatchingMode?: UserMatchingModeEnum; + /** + * + * @type {string} + * @memberof TelegramSourceRequest + */ + userPathTemplate?: string; + /** + * + * @type {string} + * @memberof TelegramSourceRequest + */ + icon?: string; + /** + * Telegram bot username + * @type {string} + * @memberof TelegramSourceRequest + */ + botUsername: string; + /** + * Telegram bot token + * @type {string} + * @memberof TelegramSourceRequest + */ + botToken: string; + /** + * Request access to send messages from your bot. + * @type {boolean} + * @memberof TelegramSourceRequest + */ + requestMessageAccess?: boolean; + /** + * Flow used before authentication. + * @type {string} + * @memberof TelegramSourceRequest + */ + preAuthenticationFlow: string; +} + + + +/** + * Check if a given object implements the TelegramSourceRequest interface. + */ +export function instanceOfTelegramSourceRequest(value: object): value is TelegramSourceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('slug' in value) || value['slug'] === undefined) return false; + if (!('botUsername' in value) || value['botUsername'] === undefined) return false; + if (!('botToken' in value) || value['botToken'] === undefined) return false; + if (!('preAuthenticationFlow' in value) || value['preAuthenticationFlow'] === undefined) return false; + return true; +} + +export function TelegramSourceRequestFromJSON(json: any): TelegramSourceRequest { + return TelegramSourceRequestFromJSONTyped(json, false); +} + +export function TelegramSourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramSourceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'slug': json['slug'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'promoted': json['promoted'] == null ? undefined : json['promoted'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'enrollmentFlow': json['enrollment_flow'] == null ? undefined : json['enrollment_flow'], + 'userPropertyMappings': json['user_property_mappings'] == null ? undefined : json['user_property_mappings'], + 'groupPropertyMappings': json['group_property_mappings'] == null ? undefined : json['group_property_mappings'], + 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), + 'userMatchingMode': json['user_matching_mode'] == null ? undefined : UserMatchingModeEnumFromJSON(json['user_matching_mode']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + 'icon': json['icon'] == null ? undefined : json['icon'], + 'botUsername': json['bot_username'], + 'botToken': json['bot_token'], + 'requestMessageAccess': json['request_message_access'] == null ? undefined : json['request_message_access'], + 'preAuthenticationFlow': json['pre_authentication_flow'], + }; +} + +export function TelegramSourceRequestToJSON(json: any): TelegramSourceRequest { + return TelegramSourceRequestToJSONTyped(json, false); +} + +export function TelegramSourceRequestToJSONTyped(value?: TelegramSourceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'slug': value['slug'], + 'enabled': value['enabled'], + 'promoted': value['promoted'], + 'authentication_flow': value['authenticationFlow'], + 'enrollment_flow': value['enrollmentFlow'], + 'user_property_mappings': value['userPropertyMappings'], + 'group_property_mappings': value['groupPropertyMappings'], + 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), + 'user_matching_mode': UserMatchingModeEnumToJSON(value['userMatchingMode']), + 'user_path_template': value['userPathTemplate'], + 'icon': value['icon'], + 'bot_username': value['botUsername'], + 'bot_token': value['botToken'], + 'request_message_access': value['requestMessageAccess'], + 'pre_authentication_flow': value['preAuthenticationFlow'], + }; +} + diff --git a/packages/client-ts/src/models/Tenant.ts b/packages/client-ts/src/models/Tenant.ts new file mode 100644 index 0000000000..fcc08dd138 --- /dev/null +++ b/packages/client-ts/src/models/Tenant.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Tenant Serializer + * @export + * @interface Tenant + */ +export interface Tenant { + /** + * + * @type {string} + * @memberof Tenant + */ + readonly tenantUuid: string; + /** + * + * @type {string} + * @memberof Tenant + */ + schemaName: string; + /** + * + * @type {string} + * @memberof Tenant + */ + name: string; + /** + * + * @type {boolean} + * @memberof Tenant + */ + ready?: boolean; +} + +/** + * Check if a given object implements the Tenant interface. + */ +export function instanceOfTenant(value: object): value is Tenant { + if (!('tenantUuid' in value) || value['tenantUuid'] === undefined) return false; + if (!('schemaName' in value) || value['schemaName'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function TenantFromJSON(json: any): Tenant { + return TenantFromJSONTyped(json, false); +} + +export function TenantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tenant { + if (json == null) { + return json; + } + return { + + 'tenantUuid': json['tenant_uuid'], + 'schemaName': json['schema_name'], + 'name': json['name'], + 'ready': json['ready'] == null ? undefined : json['ready'], + }; +} + +export function TenantToJSON(json: any): Tenant { + return TenantToJSONTyped(json, false); +} + +export function TenantToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'schema_name': value['schemaName'], + 'name': value['name'], + 'ready': value['ready'], + }; +} + diff --git a/packages/client-ts/src/models/TenantAdminGroupRequestRequest.ts b/packages/client-ts/src/models/TenantAdminGroupRequestRequest.ts new file mode 100644 index 0000000000..b5b0467a02 --- /dev/null +++ b/packages/client-ts/src/models/TenantAdminGroupRequestRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Tenant admin group creation request serializer + * @export + * @interface TenantAdminGroupRequestRequest + */ +export interface TenantAdminGroupRequestRequest { + /** + * + * @type {string} + * @memberof TenantAdminGroupRequestRequest + */ + user: string; +} + +/** + * Check if a given object implements the TenantAdminGroupRequestRequest interface. + */ +export function instanceOfTenantAdminGroupRequestRequest(value: object): value is TenantAdminGroupRequestRequest { + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function TenantAdminGroupRequestRequestFromJSON(json: any): TenantAdminGroupRequestRequest { + return TenantAdminGroupRequestRequestFromJSONTyped(json, false); +} + +export function TenantAdminGroupRequestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantAdminGroupRequestRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + }; +} + +export function TenantAdminGroupRequestRequestToJSON(json: any): TenantAdminGroupRequestRequest { + return TenantAdminGroupRequestRequestToJSONTyped(json, false); +} + +export function TenantAdminGroupRequestRequestToJSONTyped(value?: TenantAdminGroupRequestRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + }; +} + diff --git a/packages/client-ts/src/models/TenantRecoveryKeyRequestRequest.ts b/packages/client-ts/src/models/TenantRecoveryKeyRequestRequest.ts new file mode 100644 index 0000000000..28faf5e0c1 --- /dev/null +++ b/packages/client-ts/src/models/TenantRecoveryKeyRequestRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Tenant recovery key creation request serializer + * @export + * @interface TenantRecoveryKeyRequestRequest + */ +export interface TenantRecoveryKeyRequestRequest { + /** + * + * @type {string} + * @memberof TenantRecoveryKeyRequestRequest + */ + user: string; + /** + * + * @type {number} + * @memberof TenantRecoveryKeyRequestRequest + */ + durationDays: number; +} + +/** + * Check if a given object implements the TenantRecoveryKeyRequestRequest interface. + */ +export function instanceOfTenantRecoveryKeyRequestRequest(value: object): value is TenantRecoveryKeyRequestRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('durationDays' in value) || value['durationDays'] === undefined) return false; + return true; +} + +export function TenantRecoveryKeyRequestRequestFromJSON(json: any): TenantRecoveryKeyRequestRequest { + return TenantRecoveryKeyRequestRequestFromJSONTyped(json, false); +} + +export function TenantRecoveryKeyRequestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantRecoveryKeyRequestRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'durationDays': json['duration_days'], + }; +} + +export function TenantRecoveryKeyRequestRequestToJSON(json: any): TenantRecoveryKeyRequestRequest { + return TenantRecoveryKeyRequestRequestToJSONTyped(json, false); +} + +export function TenantRecoveryKeyRequestRequestToJSONTyped(value?: TenantRecoveryKeyRequestRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'duration_days': value['durationDays'], + }; +} + diff --git a/packages/client-ts/src/models/TenantRecoveryKeyResponse.ts b/packages/client-ts/src/models/TenantRecoveryKeyResponse.ts new file mode 100644 index 0000000000..94cf3253ef --- /dev/null +++ b/packages/client-ts/src/models/TenantRecoveryKeyResponse.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Tenant recovery key creation response serializer + * @export + * @interface TenantRecoveryKeyResponse + */ +export interface TenantRecoveryKeyResponse { + /** + * + * @type {Date} + * @memberof TenantRecoveryKeyResponse + */ + expiry: Date; + /** + * + * @type {string} + * @memberof TenantRecoveryKeyResponse + */ + url: string; +} + +/** + * Check if a given object implements the TenantRecoveryKeyResponse interface. + */ +export function instanceOfTenantRecoveryKeyResponse(value: object): value is TenantRecoveryKeyResponse { + if (!('expiry' in value) || value['expiry'] === undefined) return false; + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function TenantRecoveryKeyResponseFromJSON(json: any): TenantRecoveryKeyResponse { + return TenantRecoveryKeyResponseFromJSONTyped(json, false); +} + +export function TenantRecoveryKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantRecoveryKeyResponse { + if (json == null) { + return json; + } + return { + + 'expiry': (new Date(json['expiry'])), + 'url': json['url'], + }; +} + +export function TenantRecoveryKeyResponseToJSON(json: any): TenantRecoveryKeyResponse { + return TenantRecoveryKeyResponseToJSONTyped(json, false); +} + +export function TenantRecoveryKeyResponseToJSONTyped(value?: TenantRecoveryKeyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'expiry': value['expiry'].toISOString(), + 'url': value['url'], + }; +} + diff --git a/packages/client-ts/src/models/TenantRequest.ts b/packages/client-ts/src/models/TenantRequest.ts new file mode 100644 index 0000000000..2682cf4244 --- /dev/null +++ b/packages/client-ts/src/models/TenantRequest.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Tenant Serializer + * @export + * @interface TenantRequest + */ +export interface TenantRequest { + /** + * + * @type {string} + * @memberof TenantRequest + */ + schemaName: string; + /** + * + * @type {string} + * @memberof TenantRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof TenantRequest + */ + ready?: boolean; +} + +/** + * Check if a given object implements the TenantRequest interface. + */ +export function instanceOfTenantRequest(value: object): value is TenantRequest { + if (!('schemaName' in value) || value['schemaName'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function TenantRequestFromJSON(json: any): TenantRequest { + return TenantRequestFromJSONTyped(json, false); +} + +export function TenantRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantRequest { + if (json == null) { + return json; + } + return { + + 'schemaName': json['schema_name'], + 'name': json['name'], + 'ready': json['ready'] == null ? undefined : json['ready'], + }; +} + +export function TenantRequestToJSON(json: any): TenantRequest { + return TenantRequestToJSONTyped(json, false); +} + +export function TenantRequestToJSONTyped(value?: TenantRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'schema_name': value['schemaName'], + 'name': value['name'], + 'ready': value['ready'], + }; +} + diff --git a/packages/client-ts/src/models/ThemedUrls.ts b/packages/client-ts/src/models/ThemedUrls.ts new file mode 100644 index 0000000000..d7092c0344 --- /dev/null +++ b/packages/client-ts/src/models/ThemedUrls.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Themed URLs - maps theme names to URLs for light and dark themes + * @export + * @interface ThemedUrls + */ +export interface ThemedUrls { + /** + * + * @type {string} + * @memberof ThemedUrls + */ + light?: string | null; + /** + * + * @type {string} + * @memberof ThemedUrls + */ + dark?: string | null; +} + +/** + * Check if a given object implements the ThemedUrls interface. + */ +export function instanceOfThemedUrls(value: object): value is ThemedUrls { + return true; +} + +export function ThemedUrlsFromJSON(json: any): ThemedUrls { + return ThemedUrlsFromJSONTyped(json, false); +} + +export function ThemedUrlsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ThemedUrls { + if (json == null) { + return json; + } + return { + + 'light': json['light'] == null ? undefined : json['light'], + 'dark': json['dark'] == null ? undefined : json['dark'], + }; +} + +export function ThemedUrlsToJSON(json: any): ThemedUrls { + return ThemedUrlsToJSONTyped(json, false); +} + +export function ThemedUrlsToJSONTyped(value?: ThemedUrls | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'light': value['light'], + 'dark': value['dark'], + }; +} + diff --git a/packages/client-ts/src/models/Token.ts b/packages/client-ts/src/models/Token.ts new file mode 100644 index 0000000000..71d054926c --- /dev/null +++ b/packages/client-ts/src/models/Token.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { IntentEnum } from './IntentEnum'; +import { + IntentEnumFromJSON, + IntentEnumFromJSONTyped, + IntentEnumToJSON, + IntentEnumToJSONTyped, +} from './IntentEnum'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, + UserToJSONTyped, +} from './User'; + +/** + * Token Serializer + * @export + * @interface Token + */ +export interface Token { + /** + * + * @type {string} + * @memberof Token + */ + readonly pk: 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. + * @type {string} + * @memberof Token + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof Token + */ + identifier: string; + /** + * + * @type {IntentEnum} + * @memberof Token + */ + intent?: IntentEnum; + /** + * + * @type {number} + * @memberof Token + */ + user?: number; + /** + * + * @type {User} + * @memberof Token + */ + readonly userObj: User; + /** + * + * @type {string} + * @memberof Token + */ + description?: string; + /** + * + * @type {Date} + * @memberof Token + */ + expires?: Date | null; + /** + * + * @type {boolean} + * @memberof Token + */ + expiring?: boolean; +} + + + +/** + * Check if a given object implements the Token interface. + */ +export function instanceOfToken(value: object): value is Token { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('userObj' in value) || value['userObj'] === undefined) return false; + return true; +} + +export function TokenFromJSON(json: any): Token { + return TokenFromJSONTyped(json, false); +} + +export function TokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): Token { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'managed': json['managed'] == null ? undefined : json['managed'], + 'identifier': json['identifier'], + 'intent': json['intent'] == null ? undefined : IntentEnumFromJSON(json['intent']), + 'user': json['user'] == null ? undefined : json['user'], + 'userObj': UserFromJSON(json['user_obj']), + 'description': json['description'] == null ? undefined : json['description'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + }; +} + +export function TokenToJSON(json: any): Token { + return TokenToJSONTyped(json, false); +} + +export function TokenToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'identifier': value['identifier'], + 'intent': IntentEnumToJSON(value['intent']), + 'user': value['user'], + 'description': value['description'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'expiring': value['expiring'], + }; +} + diff --git a/packages/client-ts/src/models/TokenModel.ts b/packages/client-ts/src/models/TokenModel.ts new file mode 100644 index 0000000000..cc0419f32f --- /dev/null +++ b/packages/client-ts/src/models/TokenModel.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, + UserToJSONTyped, +} from './User'; +import type { OAuth2Provider } from './OAuth2Provider'; +import { + OAuth2ProviderFromJSON, + OAuth2ProviderFromJSONTyped, + OAuth2ProviderToJSON, + OAuth2ProviderToJSONTyped, +} from './OAuth2Provider'; + +/** + * Serializer for BaseGrantModel and RefreshToken + * @export + * @interface TokenModel + */ +export interface TokenModel { + /** + * + * @type {number} + * @memberof TokenModel + */ + readonly pk: number; + /** + * + * @type {OAuth2Provider} + * @memberof TokenModel + */ + provider: OAuth2Provider; + /** + * + * @type {User} + * @memberof TokenModel + */ + user: User; + /** + * Check if token is expired yet. + * @type {boolean} + * @memberof TokenModel + */ + readonly isExpired: boolean; + /** + * + * @type {Date} + * @memberof TokenModel + */ + expires?: Date | null; + /** + * + * @type {Array} + * @memberof TokenModel + */ + scope: Array; + /** + * Get the token's id_token as JSON String + * @type {string} + * @memberof TokenModel + */ + readonly idToken: string; + /** + * + * @type {boolean} + * @memberof TokenModel + */ + revoked?: boolean; +} + +/** + * Check if a given object implements the TokenModel interface. + */ +export function instanceOfTokenModel(value: object): value is TokenModel { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('isExpired' in value) || value['isExpired'] === undefined) return false; + if (!('scope' in value) || value['scope'] === undefined) return false; + if (!('idToken' in value) || value['idToken'] === undefined) return false; + return true; +} + +export function TokenModelFromJSON(json: any): TokenModel { + return TokenModelFromJSONTyped(json, false); +} + +export function TokenModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenModel { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'provider': OAuth2ProviderFromJSON(json['provider']), + 'user': UserFromJSON(json['user']), + 'isExpired': json['is_expired'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'scope': json['scope'], + 'idToken': json['id_token'], + 'revoked': json['revoked'] == null ? undefined : json['revoked'], + }; +} + +export function TokenModelToJSON(json: any): TokenModel { + return TokenModelToJSONTyped(json, false); +} + +export function TokenModelToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'provider': OAuth2ProviderToJSON(value['provider']), + 'user': UserToJSON(value['user']), + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'scope': value['scope'], + 'revoked': value['revoked'], + }; +} + diff --git a/packages/client-ts/src/models/TokenRequest.ts b/packages/client-ts/src/models/TokenRequest.ts new file mode 100644 index 0000000000..db11e6c1b3 --- /dev/null +++ b/packages/client-ts/src/models/TokenRequest.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { IntentEnum } from './IntentEnum'; +import { + IntentEnumFromJSON, + IntentEnumFromJSONTyped, + IntentEnumToJSON, + IntentEnumToJSONTyped, +} from './IntentEnum'; + +/** + * Token Serializer + * @export + * @interface TokenRequest + */ +export interface TokenRequest { + /** + * 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. + * @type {string} + * @memberof TokenRequest + */ + managed?: string | null; + /** + * + * @type {string} + * @memberof TokenRequest + */ + identifier: string; + /** + * + * @type {IntentEnum} + * @memberof TokenRequest + */ + intent?: IntentEnum; + /** + * + * @type {number} + * @memberof TokenRequest + */ + user?: number; + /** + * + * @type {string} + * @memberof TokenRequest + */ + description?: string; + /** + * + * @type {Date} + * @memberof TokenRequest + */ + expires?: Date | null; + /** + * + * @type {boolean} + * @memberof TokenRequest + */ + expiring?: boolean; +} + + + +/** + * Check if a given object implements the TokenRequest interface. + */ +export function instanceOfTokenRequest(value: object): value is TokenRequest { + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function TokenRequestFromJSON(json: any): TokenRequest { + return TokenRequestFromJSONTyped(json, false); +} + +export function TokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenRequest { + if (json == null) { + return json; + } + return { + + 'managed': json['managed'] == null ? undefined : json['managed'], + 'identifier': json['identifier'], + 'intent': json['intent'] == null ? undefined : IntentEnumFromJSON(json['intent']), + 'user': json['user'] == null ? undefined : json['user'], + 'description': json['description'] == null ? undefined : json['description'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + }; +} + +export function TokenRequestToJSON(json: any): TokenRequest { + return TokenRequestToJSONTyped(json, false); +} + +export function TokenRequestToJSONTyped(value?: TokenRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'managed': value['managed'], + 'identifier': value['identifier'], + 'intent': IntentEnumToJSON(value['intent']), + 'user': value['user'], + 'description': value['description'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'expiring': value['expiring'], + }; +} + diff --git a/packages/client-ts/src/models/TokenSetKeyRequest.ts b/packages/client-ts/src/models/TokenSetKeyRequest.ts new file mode 100644 index 0000000000..b028349792 --- /dev/null +++ b/packages/client-ts/src/models/TokenSetKeyRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Set token's key + * @export + * @interface TokenSetKeyRequest + */ +export interface TokenSetKeyRequest { + /** + * + * @type {string} + * @memberof TokenSetKeyRequest + */ + key: string; +} + +/** + * Check if a given object implements the TokenSetKeyRequest interface. + */ +export function instanceOfTokenSetKeyRequest(value: object): value is TokenSetKeyRequest { + if (!('key' in value) || value['key'] === undefined) return false; + return true; +} + +export function TokenSetKeyRequestFromJSON(json: any): TokenSetKeyRequest { + return TokenSetKeyRequestFromJSONTyped(json, false); +} + +export function TokenSetKeyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenSetKeyRequest { + if (json == null) { + return json; + } + return { + + 'key': json['key'], + }; +} + +export function TokenSetKeyRequestToJSON(json: any): TokenSetKeyRequest { + return TokenSetKeyRequestToJSONTyped(json, false); +} + +export function TokenSetKeyRequestToJSONTyped(value?: TokenSetKeyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'key': value['key'], + }; +} + diff --git a/packages/client-ts/src/models/TokenView.ts b/packages/client-ts/src/models/TokenView.ts new file mode 100644 index 0000000000..26cb5ba3a0 --- /dev/null +++ b/packages/client-ts/src/models/TokenView.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Show token's current key + * @export + * @interface TokenView + */ +export interface TokenView { + /** + * + * @type {string} + * @memberof TokenView + */ + readonly key: string; +} + +/** + * Check if a given object implements the TokenView interface. + */ +export function instanceOfTokenView(value: object): value is TokenView { + if (!('key' in value) || value['key'] === undefined) return false; + return true; +} + +export function TokenViewFromJSON(json: any): TokenView { + return TokenViewFromJSONTyped(json, false); +} + +export function TokenViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenView { + if (json == null) { + return json; + } + return { + + 'key': json['key'], + }; +} + +export function TokenViewToJSON(json: any): TokenView { + return TokenViewToJSONTyped(json, false); +} + +export function TokenViewToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/TransactionApplicationRequest.ts b/packages/client-ts/src/models/TransactionApplicationRequest.ts new file mode 100644 index 0000000000..b66369bdba --- /dev/null +++ b/packages/client-ts/src/models/TransactionApplicationRequest.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ProviderModelEnum } from './ProviderModelEnum'; +import { + ProviderModelEnumFromJSON, + ProviderModelEnumFromJSONTyped, + ProviderModelEnumToJSON, + ProviderModelEnumToJSONTyped, +} from './ProviderModelEnum'; +import type { ModelRequest } from './ModelRequest'; +import { + ModelRequestFromJSON, + ModelRequestFromJSONTyped, + ModelRequestToJSON, + ModelRequestToJSONTyped, +} from './ModelRequest'; +import type { ApplicationRequest } from './ApplicationRequest'; +import { + ApplicationRequestFromJSON, + ApplicationRequestFromJSONTyped, + ApplicationRequestToJSON, + ApplicationRequestToJSONTyped, +} from './ApplicationRequest'; +import type { TransactionPolicyBindingRequest } from './TransactionPolicyBindingRequest'; +import { + TransactionPolicyBindingRequestFromJSON, + TransactionPolicyBindingRequestFromJSONTyped, + TransactionPolicyBindingRequestToJSON, + TransactionPolicyBindingRequestToJSONTyped, +} from './TransactionPolicyBindingRequest'; + +/** + * Serializer for creating a provider and an application in one transaction + * @export + * @interface TransactionApplicationRequest + */ +export interface TransactionApplicationRequest { + /** + * + * @type {ApplicationRequest} + * @memberof TransactionApplicationRequest + */ + app: ApplicationRequest; + /** + * + * @type {ProviderModelEnum} + * @memberof TransactionApplicationRequest + */ + providerModel: ProviderModelEnum; + /** + * + * @type {ModelRequest} + * @memberof TransactionApplicationRequest + */ + provider: ModelRequest; + /** + * + * @type {Array} + * @memberof TransactionApplicationRequest + */ + policyBindings?: Array; +} + + + +/** + * Check if a given object implements the TransactionApplicationRequest interface. + */ +export function instanceOfTransactionApplicationRequest(value: object): value is TransactionApplicationRequest { + if (!('app' in value) || value['app'] === undefined) return false; + if (!('providerModel' in value) || value['providerModel'] === undefined) return false; + if (!('provider' in value) || value['provider'] === undefined) return false; + return true; +} + +export function TransactionApplicationRequestFromJSON(json: any): TransactionApplicationRequest { + return TransactionApplicationRequestFromJSONTyped(json, false); +} + +export function TransactionApplicationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionApplicationRequest { + if (json == null) { + return json; + } + return { + + 'app': ApplicationRequestFromJSON(json['app']), + 'providerModel': ProviderModelEnumFromJSON(json['provider_model']), + 'provider': ModelRequestFromJSON(json['provider']), + 'policyBindings': json['policy_bindings'] == null ? undefined : ((json['policy_bindings'] as Array).map(TransactionPolicyBindingRequestFromJSON)), + }; +} + +export function TransactionApplicationRequestToJSON(json: any): TransactionApplicationRequest { + return TransactionApplicationRequestToJSONTyped(json, false); +} + +export function TransactionApplicationRequestToJSONTyped(value?: TransactionApplicationRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'app': ApplicationRequestToJSON(value['app']), + 'provider_model': ProviderModelEnumToJSON(value['providerModel']), + 'provider': ModelRequestToJSON(value['provider']), + 'policy_bindings': value['policyBindings'] == null ? undefined : ((value['policyBindings'] as Array).map(TransactionPolicyBindingRequestToJSON)), + }; +} + diff --git a/packages/client-ts/src/models/TransactionApplicationResponse.ts b/packages/client-ts/src/models/TransactionApplicationResponse.ts new file mode 100644 index 0000000000..b38c6d1846 --- /dev/null +++ b/packages/client-ts/src/models/TransactionApplicationResponse.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Transactional creation response + * @export + * @interface TransactionApplicationResponse + */ +export interface TransactionApplicationResponse { + /** + * + * @type {boolean} + * @memberof TransactionApplicationResponse + */ + applied: boolean; + /** + * + * @type {Array} + * @memberof TransactionApplicationResponse + */ + logs: Array; +} + +/** + * Check if a given object implements the TransactionApplicationResponse interface. + */ +export function instanceOfTransactionApplicationResponse(value: object): value is TransactionApplicationResponse { + if (!('applied' in value) || value['applied'] === undefined) return false; + if (!('logs' in value) || value['logs'] === undefined) return false; + return true; +} + +export function TransactionApplicationResponseFromJSON(json: any): TransactionApplicationResponse { + return TransactionApplicationResponseFromJSONTyped(json, false); +} + +export function TransactionApplicationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionApplicationResponse { + if (json == null) { + return json; + } + return { + + 'applied': json['applied'], + 'logs': json['logs'], + }; +} + +export function TransactionApplicationResponseToJSON(json: any): TransactionApplicationResponse { + return TransactionApplicationResponseToJSONTyped(json, false); +} + +export function TransactionApplicationResponseToJSONTyped(value?: TransactionApplicationResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'applied': value['applied'], + 'logs': value['logs'], + }; +} + diff --git a/packages/client-ts/src/models/TransactionPolicyBindingRequest.ts b/packages/client-ts/src/models/TransactionPolicyBindingRequest.ts new file mode 100644 index 0000000000..58d8ea387f --- /dev/null +++ b/packages/client-ts/src/models/TransactionPolicyBindingRequest.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PolicyBindingSerializer which does not require target as target is set implicitly + * @export + * @interface TransactionPolicyBindingRequest + */ +export interface TransactionPolicyBindingRequest { + /** + * + * @type {string} + * @memberof TransactionPolicyBindingRequest + */ + policy?: string | null; + /** + * + * @type {string} + * @memberof TransactionPolicyBindingRequest + */ + group?: string | null; + /** + * + * @type {number} + * @memberof TransactionPolicyBindingRequest + */ + user?: number | null; + /** + * Negates the outcome of the policy. Messages are unaffected. + * @type {boolean} + * @memberof TransactionPolicyBindingRequest + */ + negate?: boolean; + /** + * + * @type {boolean} + * @memberof TransactionPolicyBindingRequest + */ + enabled?: boolean; + /** + * + * @type {number} + * @memberof TransactionPolicyBindingRequest + */ + order: number; + /** + * Timeout after which Policy execution is terminated. + * @type {number} + * @memberof TransactionPolicyBindingRequest + */ + timeout?: number; + /** + * Result if the Policy execution fails. + * @type {boolean} + * @memberof TransactionPolicyBindingRequest + */ + failureResult?: boolean; +} + +/** + * Check if a given object implements the TransactionPolicyBindingRequest interface. + */ +export function instanceOfTransactionPolicyBindingRequest(value: object): value is TransactionPolicyBindingRequest { + if (!('order' in value) || value['order'] === undefined) return false; + return true; +} + +export function TransactionPolicyBindingRequestFromJSON(json: any): TransactionPolicyBindingRequest { + return TransactionPolicyBindingRequestFromJSONTyped(json, false); +} + +export function TransactionPolicyBindingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionPolicyBindingRequest { + if (json == null) { + return json; + } + return { + + 'policy': json['policy'] == null ? undefined : json['policy'], + 'group': json['group'] == null ? undefined : json['group'], + 'user': json['user'] == null ? undefined : json['user'], + 'negate': json['negate'] == null ? undefined : json['negate'], + 'enabled': json['enabled'] == null ? undefined : json['enabled'], + 'order': json['order'], + 'timeout': json['timeout'] == null ? undefined : json['timeout'], + 'failureResult': json['failure_result'] == null ? undefined : json['failure_result'], + }; +} + +export function TransactionPolicyBindingRequestToJSON(json: any): TransactionPolicyBindingRequest { + return TransactionPolicyBindingRequestToJSONTyped(json, false); +} + +export function TransactionPolicyBindingRequestToJSONTyped(value?: TransactionPolicyBindingRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'policy': value['policy'], + 'group': value['group'], + 'user': value['user'], + 'negate': value['negate'], + 'enabled': value['enabled'], + 'order': value['order'], + 'timeout': value['timeout'], + 'failure_result': value['failureResult'], + }; +} + diff --git a/packages/client-ts/src/models/TypeCreate.ts b/packages/client-ts/src/models/TypeCreate.ts new file mode 100644 index 0000000000..e9d52cce33 --- /dev/null +++ b/packages/client-ts/src/models/TypeCreate.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Types of an object that can be created + * @export + * @interface TypeCreate + */ +export interface TypeCreate { + /** + * + * @type {string} + * @memberof TypeCreate + */ + name: string; + /** + * + * @type {string} + * @memberof TypeCreate + */ + description: string; + /** + * + * @type {string} + * @memberof TypeCreate + */ + component: string; + /** + * + * @type {string} + * @memberof TypeCreate + */ + modelName: string; + /** + * + * @type {string} + * @memberof TypeCreate + */ + iconUrl?: string; + /** + * + * @type {boolean} + * @memberof TypeCreate + */ + requiresEnterprise?: boolean; + /** + * + * @type {boolean} + * @memberof TypeCreate + */ + deprecated?: boolean; +} + +/** + * Check if a given object implements the TypeCreate interface. + */ +export function instanceOfTypeCreate(value: object): value is TypeCreate { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('modelName' in value) || value['modelName'] === undefined) return false; + return true; +} + +export function TypeCreateFromJSON(json: any): TypeCreate { + return TypeCreateFromJSONTyped(json, false); +} + +export function TypeCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TypeCreate { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'description': json['description'], + 'component': json['component'], + 'modelName': json['model_name'], + 'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'], + 'requiresEnterprise': json['requires_enterprise'] == null ? undefined : json['requires_enterprise'], + 'deprecated': json['deprecated'] == null ? undefined : json['deprecated'], + }; +} + +export function TypeCreateToJSON(json: any): TypeCreate { + return TypeCreateToJSONTyped(json, false); +} + +export function TypeCreateToJSONTyped(value?: TypeCreate | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'description': value['description'], + 'component': value['component'], + 'model_name': value['modelName'], + 'icon_url': value['iconUrl'], + 'requires_enterprise': value['requiresEnterprise'], + 'deprecated': value['deprecated'], + }; +} + diff --git a/packages/client-ts/src/models/UiThemeEnum.ts b/packages/client-ts/src/models/UiThemeEnum.ts new file mode 100644 index 0000000000..2fece1cd3f --- /dev/null +++ b/packages/client-ts/src/models/UiThemeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UiThemeEnum = { + Automatic: 'automatic', + Light: 'light', + Dark: 'dark', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UiThemeEnum = typeof UiThemeEnum[keyof typeof UiThemeEnum]; + + +export function instanceOfUiThemeEnum(value: any): boolean { + for (const key in UiThemeEnum) { + if (Object.prototype.hasOwnProperty.call(UiThemeEnum, key)) { + if (UiThemeEnum[key as keyof typeof UiThemeEnum] === value) { + return true; + } + } + } + return false; +} + +export function UiThemeEnumFromJSON(json: any): UiThemeEnum { + return UiThemeEnumFromJSONTyped(json, false); +} + +export function UiThemeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UiThemeEnum { + return json as UiThemeEnum; +} + +export function UiThemeEnumToJSON(value?: UiThemeEnum | null): any { + return value as any; +} + +export function UiThemeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UiThemeEnum { + return value as UiThemeEnum; +} + diff --git a/packages/client-ts/src/models/UniquePasswordPolicy.ts b/packages/client-ts/src/models/UniquePasswordPolicy.ts new file mode 100644 index 0000000000..4ac80e982d --- /dev/null +++ b/packages/client-ts/src/models/UniquePasswordPolicy.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Uniqueness Policy Serializer + * @export + * @interface UniquePasswordPolicy + */ +export interface UniquePasswordPolicy { + /** + * + * @type {string} + * @memberof UniquePasswordPolicy + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof UniquePasswordPolicy + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof UniquePasswordPolicy + */ + executionLogging?: boolean; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof UniquePasswordPolicy + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof UniquePasswordPolicy + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof UniquePasswordPolicy + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof UniquePasswordPolicy + */ + readonly metaModelName: string; + /** + * Return objects policy is bound to + * @type {number} + * @memberof UniquePasswordPolicy + */ + readonly boundTo: number; + /** + * Field key to check, field keys defined in Prompt stages are available. + * @type {string} + * @memberof UniquePasswordPolicy + */ + passwordField?: string; + /** + * Number of passwords to check against. + * @type {number} + * @memberof UniquePasswordPolicy + */ + numHistoricalPasswords?: number; +} + +/** + * Check if a given object implements the UniquePasswordPolicy interface. + */ +export function instanceOfUniquePasswordPolicy(value: object): value is UniquePasswordPolicy { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('boundTo' in value) || value['boundTo'] === undefined) return false; + return true; +} + +export function UniquePasswordPolicyFromJSON(json: any): UniquePasswordPolicy { + return UniquePasswordPolicyFromJSONTyped(json, false); +} + +export function UniquePasswordPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): UniquePasswordPolicy { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'boundTo': json['bound_to'], + 'passwordField': json['password_field'] == null ? undefined : json['password_field'], + 'numHistoricalPasswords': json['num_historical_passwords'] == null ? undefined : json['num_historical_passwords'], + }; +} + +export function UniquePasswordPolicyToJSON(json: any): UniquePasswordPolicy { + return UniquePasswordPolicyToJSONTyped(json, false); +} + +export function UniquePasswordPolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'password_field': value['passwordField'], + 'num_historical_passwords': value['numHistoricalPasswords'], + }; +} + diff --git a/packages/client-ts/src/models/UniquePasswordPolicyRequest.ts b/packages/client-ts/src/models/UniquePasswordPolicyRequest.ts new file mode 100644 index 0000000000..97107459a2 --- /dev/null +++ b/packages/client-ts/src/models/UniquePasswordPolicyRequest.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Password Uniqueness Policy Serializer + * @export + * @interface UniquePasswordPolicyRequest + */ +export interface UniquePasswordPolicyRequest { + /** + * + * @type {string} + * @memberof UniquePasswordPolicyRequest + */ + name: string; + /** + * When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged. + * @type {boolean} + * @memberof UniquePasswordPolicyRequest + */ + executionLogging?: boolean; + /** + * Field key to check, field keys defined in Prompt stages are available. + * @type {string} + * @memberof UniquePasswordPolicyRequest + */ + passwordField?: string; + /** + * Number of passwords to check against. + * @type {number} + * @memberof UniquePasswordPolicyRequest + */ + numHistoricalPasswords?: number; +} + +/** + * Check if a given object implements the UniquePasswordPolicyRequest interface. + */ +export function instanceOfUniquePasswordPolicyRequest(value: object): value is UniquePasswordPolicyRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UniquePasswordPolicyRequestFromJSON(json: any): UniquePasswordPolicyRequest { + return UniquePasswordPolicyRequestFromJSONTyped(json, false); +} + +export function UniquePasswordPolicyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UniquePasswordPolicyRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'executionLogging': json['execution_logging'] == null ? undefined : json['execution_logging'], + 'passwordField': json['password_field'] == null ? undefined : json['password_field'], + 'numHistoricalPasswords': json['num_historical_passwords'] == null ? undefined : json['num_historical_passwords'], + }; +} + +export function UniquePasswordPolicyRequestToJSON(json: any): UniquePasswordPolicyRequest { + return UniquePasswordPolicyRequestToJSONTyped(json, false); +} + +export function UniquePasswordPolicyRequestToJSONTyped(value?: UniquePasswordPolicyRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'execution_logging': value['executionLogging'], + 'password_field': value['passwordField'], + 'num_historical_passwords': value['numHistoricalPasswords'], + }; +} + diff --git a/packages/client-ts/src/models/UsedBy.ts b/packages/client-ts/src/models/UsedBy.ts new file mode 100644 index 0000000000..970ebdaaf8 --- /dev/null +++ b/packages/client-ts/src/models/UsedBy.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UsedByActionEnum } from './UsedByActionEnum'; +import { + UsedByActionEnumFromJSON, + UsedByActionEnumFromJSONTyped, + UsedByActionEnumToJSON, + UsedByActionEnumToJSONTyped, +} from './UsedByActionEnum'; + +/** + * A list of all objects referencing the queried object + * @export + * @interface UsedBy + */ +export interface UsedBy { + /** + * + * @type {string} + * @memberof UsedBy + */ + app: string; + /** + * + * @type {string} + * @memberof UsedBy + */ + modelName: string; + /** + * + * @type {string} + * @memberof UsedBy + */ + pk: string; + /** + * + * @type {string} + * @memberof UsedBy + */ + name: string; + /** + * + * @type {UsedByActionEnum} + * @memberof UsedBy + */ + action: UsedByActionEnum; +} + + + +/** + * Check if a given object implements the UsedBy interface. + */ +export function instanceOfUsedBy(value: object): value is UsedBy { + if (!('app' in value) || value['app'] === undefined) return false; + if (!('modelName' in value) || value['modelName'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('action' in value) || value['action'] === undefined) return false; + return true; +} + +export function UsedByFromJSON(json: any): UsedBy { + return UsedByFromJSONTyped(json, false); +} + +export function UsedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsedBy { + if (json == null) { + return json; + } + return { + + 'app': json['app'], + 'modelName': json['model_name'], + 'pk': json['pk'], + 'name': json['name'], + 'action': UsedByActionEnumFromJSON(json['action']), + }; +} + +export function UsedByToJSON(json: any): UsedBy { + return UsedByToJSONTyped(json, false); +} + +export function UsedByToJSONTyped(value?: UsedBy | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'app': value['app'], + 'model_name': value['modelName'], + 'pk': value['pk'], + 'name': value['name'], + 'action': UsedByActionEnumToJSON(value['action']), + }; +} + diff --git a/packages/client-ts/src/models/UsedByActionEnum.ts b/packages/client-ts/src/models/UsedByActionEnum.ts new file mode 100644 index 0000000000..8a8156c308 --- /dev/null +++ b/packages/client-ts/src/models/UsedByActionEnum.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UsedByActionEnum = { + Cascade: 'cascade', + CascadeMany: 'cascade_many', + SetNull: 'set_null', + SetDefault: 'set_default', + LeftDangling: 'left_dangling', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UsedByActionEnum = typeof UsedByActionEnum[keyof typeof UsedByActionEnum]; + + +export function instanceOfUsedByActionEnum(value: any): boolean { + for (const key in UsedByActionEnum) { + if (Object.prototype.hasOwnProperty.call(UsedByActionEnum, key)) { + if (UsedByActionEnum[key as keyof typeof UsedByActionEnum] === value) { + return true; + } + } + } + return false; +} + +export function UsedByActionEnumFromJSON(json: any): UsedByActionEnum { + return UsedByActionEnumFromJSONTyped(json, false); +} + +export function UsedByActionEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsedByActionEnum { + return json as UsedByActionEnum; +} + +export function UsedByActionEnumToJSON(value?: UsedByActionEnum | null): any { + return value as any; +} + +export function UsedByActionEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UsedByActionEnum { + return value as UsedByActionEnum; +} + diff --git a/packages/client-ts/src/models/User.ts b/packages/client-ts/src/models/User.ts new file mode 100644 index 0000000000..09ee95adb1 --- /dev/null +++ b/packages/client-ts/src/models/User.ts @@ -0,0 +1,243 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Role } from './Role'; +import { + RoleFromJSON, + RoleFromJSONTyped, + RoleToJSON, + RoleToJSONTyped, +} from './Role'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; +import type { PartialGroup } from './PartialGroup'; +import { + PartialGroupFromJSON, + PartialGroupFromJSONTyped, + PartialGroupToJSON, + PartialGroupToJSONTyped, +} from './PartialGroup'; + +/** + * User Serializer + * @export + * @interface User + */ +export interface User { + /** + * + * @type {number} + * @memberof User + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof User + */ + username: string; + /** + * User's display name. + * @type {string} + * @memberof User + */ + name: string; + /** + * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + * @type {boolean} + * @memberof User + */ + isActive?: boolean; + /** + * + * @type {Date} + * @memberof User + */ + lastLogin?: Date | null; + /** + * + * @type {Date} + * @memberof User + */ + readonly dateJoined: Date; + /** + * + * @type {boolean} + * @memberof User + */ + readonly isSuperuser: boolean; + /** + * + * @type {Array} + * @memberof User + */ + groups?: Array; + /** + * + * @type {Array} + * @memberof User + */ + readonly groupsObj: Array | null; + /** + * + * @type {Array} + * @memberof User + */ + roles?: Array; + /** + * + * @type {Array} + * @memberof User + */ + readonly rolesObj: Array | null; + /** + * + * @type {string} + * @memberof User + */ + email?: string; + /** + * User's avatar, either a http/https URL or a data URI + * @type {string} + * @memberof User + */ + readonly avatar: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof User + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof User + */ + readonly uid: string; + /** + * + * @type {string} + * @memberof User + */ + path?: string; + /** + * + * @type {UserTypeEnum} + * @memberof User + */ + type?: UserTypeEnum; + /** + * + * @type {string} + * @memberof User + */ + readonly uuid: string; + /** + * + * @type {Date} + * @memberof User + */ + readonly passwordChangeDate: Date; + /** + * + * @type {Date} + * @memberof User + */ + readonly lastUpdated: Date; +} + + + +/** + * Check if a given object implements the User interface. + */ +export function instanceOfUser(value: object): value is User { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('username' in value) || value['username'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('dateJoined' in value) || value['dateJoined'] === undefined) return false; + if (!('isSuperuser' in value) || value['isSuperuser'] === undefined) return false; + if (!('groupsObj' in value) || value['groupsObj'] === undefined) return false; + if (!('rolesObj' in value) || value['rolesObj'] === undefined) return false; + if (!('avatar' in value) || value['avatar'] === undefined) return false; + if (!('uid' in value) || value['uid'] === undefined) return false; + if (!('uuid' in value) || value['uuid'] === undefined) return false; + if (!('passwordChangeDate' in value) || value['passwordChangeDate'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserFromJSON(json: any): User { + return UserFromJSONTyped(json, false); +} + +export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'username': json['username'], + 'name': json['name'], + 'isActive': json['is_active'] == null ? undefined : json['is_active'], + 'lastLogin': json['last_login'] == null ? undefined : (new Date(json['last_login'])), + 'dateJoined': (new Date(json['date_joined'])), + 'isSuperuser': json['is_superuser'], + 'groups': json['groups'] == null ? undefined : json['groups'], + 'groupsObj': (json['groups_obj'] == null ? null : (json['groups_obj'] as Array).map(PartialGroupFromJSON)), + 'roles': json['roles'] == null ? undefined : json['roles'], + 'rolesObj': (json['roles_obj'] == null ? null : (json['roles_obj'] as Array).map(RoleFromJSON)), + 'email': json['email'] == null ? undefined : json['email'], + 'avatar': json['avatar'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'uid': json['uid'], + 'path': json['path'] == null ? undefined : json['path'], + 'type': json['type'] == null ? undefined : UserTypeEnumFromJSON(json['type']), + 'uuid': json['uuid'], + 'passwordChangeDate': (new Date(json['password_change_date'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserToJSON(json: any): User { + return UserToJSONTyped(json, false); +} + +export function UserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'name': value['name'], + 'is_active': value['isActive'], + 'last_login': value['lastLogin'] == null ? value['lastLogin'] : value['lastLogin'].toISOString(), + 'groups': value['groups'], + 'roles': value['roles'], + 'email': value['email'], + 'attributes': value['attributes'], + 'path': value['path'], + 'type': UserTypeEnumToJSON(value['type']), + }; +} + diff --git a/packages/client-ts/src/models/UserAccountRequest.ts b/packages/client-ts/src/models/UserAccountRequest.ts new file mode 100644 index 0000000000..1f4443c7d3 --- /dev/null +++ b/packages/client-ts/src/models/UserAccountRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Account adding/removing operations + * @export + * @interface UserAccountRequest + */ +export interface UserAccountRequest { + /** + * + * @type {number} + * @memberof UserAccountRequest + */ + pk: number; +} + +/** + * Check if a given object implements the UserAccountRequest interface. + */ +export function instanceOfUserAccountRequest(value: object): value is UserAccountRequest { + if (!('pk' in value) || value['pk'] === undefined) return false; + return true; +} + +export function UserAccountRequestFromJSON(json: any): UserAccountRequest { + return UserAccountRequestFromJSONTyped(json, false); +} + +export function UserAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountRequest { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + }; +} + +export function UserAccountRequestToJSON(json: any): UserAccountRequest { + return UserAccountRequestToJSONTyped(json, false); +} + +export function UserAccountRequestToJSONTyped(value?: UserAccountRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + }; +} + diff --git a/packages/client-ts/src/models/UserAccountSerializerForRoleRequest.ts b/packages/client-ts/src/models/UserAccountSerializerForRoleRequest.ts new file mode 100644 index 0000000000..6f68df02b8 --- /dev/null +++ b/packages/client-ts/src/models/UserAccountSerializerForRoleRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Account adding/removing operations + * @export + * @interface UserAccountSerializerForRoleRequest + */ +export interface UserAccountSerializerForRoleRequest { + /** + * + * @type {number} + * @memberof UserAccountSerializerForRoleRequest + */ + pk: number; +} + +/** + * Check if a given object implements the UserAccountSerializerForRoleRequest interface. + */ +export function instanceOfUserAccountSerializerForRoleRequest(value: object): value is UserAccountSerializerForRoleRequest { + if (!('pk' in value) || value['pk'] === undefined) return false; + return true; +} + +export function UserAccountSerializerForRoleRequestFromJSON(json: any): UserAccountSerializerForRoleRequest { + return UserAccountSerializerForRoleRequestFromJSONTyped(json, false); +} + +export function UserAccountSerializerForRoleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountSerializerForRoleRequest { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + }; +} + +export function UserAccountSerializerForRoleRequestToJSON(json: any): UserAccountSerializerForRoleRequest { + return UserAccountSerializerForRoleRequestToJSONTyped(json, false); +} + +export function UserAccountSerializerForRoleRequestToJSONTyped(value?: UserAccountSerializerForRoleRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'pk': value['pk'], + }; +} + diff --git a/packages/client-ts/src/models/UserAttributeEnum.ts b/packages/client-ts/src/models/UserAttributeEnum.ts new file mode 100644 index 0000000000..42dd56cde2 --- /dev/null +++ b/packages/client-ts/src/models/UserAttributeEnum.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UserAttributeEnum = { + Username: 'username', + Email: 'email', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UserAttributeEnum = typeof UserAttributeEnum[keyof typeof UserAttributeEnum]; + + +export function instanceOfUserAttributeEnum(value: any): boolean { + for (const key in UserAttributeEnum) { + if (Object.prototype.hasOwnProperty.call(UserAttributeEnum, key)) { + if (UserAttributeEnum[key as keyof typeof UserAttributeEnum] === value) { + return true; + } + } + } + return false; +} + +export function UserAttributeEnumFromJSON(json: any): UserAttributeEnum { + return UserAttributeEnumFromJSONTyped(json, false); +} + +export function UserAttributeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAttributeEnum { + return json as UserAttributeEnum; +} + +export function UserAttributeEnumToJSON(value?: UserAttributeEnum | null): any { + return value as any; +} + +export function UserAttributeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UserAttributeEnum { + return value as UserAttributeEnum; +} + diff --git a/packages/client-ts/src/models/UserConsent.ts b/packages/client-ts/src/models/UserConsent.ts new file mode 100644 index 0000000000..1b5c3c9935 --- /dev/null +++ b/packages/client-ts/src/models/UserConsent.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, + UserToJSONTyped, +} from './User'; +import type { Application } from './Application'; +import { + ApplicationFromJSON, + ApplicationFromJSONTyped, + ApplicationToJSON, + ApplicationToJSONTyped, +} from './Application'; + +/** + * UserConsent Serializer + * @export + * @interface UserConsent + */ +export interface UserConsent { + /** + * + * @type {number} + * @memberof UserConsent + */ + readonly pk: number; + /** + * + * @type {Date} + * @memberof UserConsent + */ + expires?: Date | null; + /** + * + * @type {boolean} + * @memberof UserConsent + */ + expiring?: boolean; + /** + * + * @type {User} + * @memberof UserConsent + */ + user: User; + /** + * + * @type {Application} + * @memberof UserConsent + */ + application: Application; + /** + * + * @type {string} + * @memberof UserConsent + */ + permissions?: string; +} + +/** + * Check if a given object implements the UserConsent interface. + */ +export function instanceOfUserConsent(value: object): value is UserConsent { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('application' in value) || value['application'] === undefined) return false; + return true; +} + +export function UserConsentFromJSON(json: any): UserConsent { + return UserConsentFromJSONTyped(json, false); +} + +export function UserConsentFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserConsent { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'user': UserFromJSON(json['user']), + 'application': ApplicationFromJSON(json['application']), + 'permissions': json['permissions'] == null ? undefined : json['permissions'], + }; +} + +export function UserConsentToJSON(json: any): UserConsent { + return UserConsentToJSONTyped(json, false); +} + +export function UserConsentToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + 'expiring': value['expiring'], + 'user': UserToJSON(value['user']), + 'application': ApplicationToJSON(value['application']), + 'permissions': value['permissions'], + }; +} + diff --git a/packages/client-ts/src/models/UserCreationModeEnum.ts b/packages/client-ts/src/models/UserCreationModeEnum.ts new file mode 100644 index 0000000000..ae8771bd79 --- /dev/null +++ b/packages/client-ts/src/models/UserCreationModeEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UserCreationModeEnum = { + NeverCreate: 'never_create', + CreateWhenRequired: 'create_when_required', + AlwaysCreate: 'always_create', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UserCreationModeEnum = typeof UserCreationModeEnum[keyof typeof UserCreationModeEnum]; + + +export function instanceOfUserCreationModeEnum(value: any): boolean { + for (const key in UserCreationModeEnum) { + if (Object.prototype.hasOwnProperty.call(UserCreationModeEnum, key)) { + if (UserCreationModeEnum[key as keyof typeof UserCreationModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function UserCreationModeEnumFromJSON(json: any): UserCreationModeEnum { + return UserCreationModeEnumFromJSONTyped(json, false); +} + +export function UserCreationModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserCreationModeEnum { + return json as UserCreationModeEnum; +} + +export function UserCreationModeEnumToJSON(value?: UserCreationModeEnum | null): any { + return value as any; +} + +export function UserCreationModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UserCreationModeEnum { + return value as UserCreationModeEnum; +} + diff --git a/packages/client-ts/src/models/UserDeleteStage.ts b/packages/client-ts/src/models/UserDeleteStage.ts new file mode 100644 index 0000000000..b2a50b283a --- /dev/null +++ b/packages/client-ts/src/models/UserDeleteStage.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * UserDeleteStage Serializer + * @export + * @interface UserDeleteStage + */ +export interface UserDeleteStage { + /** + * + * @type {string} + * @memberof UserDeleteStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof UserDeleteStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof UserDeleteStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof UserDeleteStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof UserDeleteStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof UserDeleteStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof UserDeleteStage + */ + readonly flowSet: Array; +} + +/** + * Check if a given object implements the UserDeleteStage interface. + */ +export function instanceOfUserDeleteStage(value: object): value is UserDeleteStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function UserDeleteStageFromJSON(json: any): UserDeleteStage { + return UserDeleteStageFromJSONTyped(json, false); +} + +export function UserDeleteStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDeleteStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + }; +} + +export function UserDeleteStageToJSON(json: any): UserDeleteStage { + return UserDeleteStageToJSONTyped(json, false); +} + +export function UserDeleteStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/UserDeleteStageRequest.ts b/packages/client-ts/src/models/UserDeleteStageRequest.ts new file mode 100644 index 0000000000..57d409b6d9 --- /dev/null +++ b/packages/client-ts/src/models/UserDeleteStageRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * UserDeleteStage Serializer + * @export + * @interface UserDeleteStageRequest + */ +export interface UserDeleteStageRequest { + /** + * + * @type {string} + * @memberof UserDeleteStageRequest + */ + name: string; +} + +/** + * Check if a given object implements the UserDeleteStageRequest interface. + */ +export function instanceOfUserDeleteStageRequest(value: object): value is UserDeleteStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UserDeleteStageRequestFromJSON(json: any): UserDeleteStageRequest { + return UserDeleteStageRequestFromJSONTyped(json, false); +} + +export function UserDeleteStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDeleteStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function UserDeleteStageRequestToJSON(json: any): UserDeleteStageRequest { + return UserDeleteStageRequestToJSONTyped(json, false); +} + +export function UserDeleteStageRequestToJSONTyped(value?: UserDeleteStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/UserFieldsEnum.ts b/packages/client-ts/src/models/UserFieldsEnum.ts new file mode 100644 index 0000000000..81d4dfd72a --- /dev/null +++ b/packages/client-ts/src/models/UserFieldsEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UserFieldsEnum = { + Email: 'email', + Username: 'username', + Upn: 'upn', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UserFieldsEnum = typeof UserFieldsEnum[keyof typeof UserFieldsEnum]; + + +export function instanceOfUserFieldsEnum(value: any): boolean { + for (const key in UserFieldsEnum) { + if (Object.prototype.hasOwnProperty.call(UserFieldsEnum, key)) { + if (UserFieldsEnum[key as keyof typeof UserFieldsEnum] === value) { + return true; + } + } + } + return false; +} + +export function UserFieldsEnumFromJSON(json: any): UserFieldsEnum { + return UserFieldsEnumFromJSONTyped(json, false); +} + +export function UserFieldsEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFieldsEnum { + return json as UserFieldsEnum; +} + +export function UserFieldsEnumToJSON(value?: UserFieldsEnum | null): any { + return value as any; +} + +export function UserFieldsEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UserFieldsEnum { + return value as UserFieldsEnum; +} + diff --git a/packages/client-ts/src/models/UserKerberosSourceConnection.ts b/packages/client-ts/src/models/UserKerberosSourceConnection.ts new file mode 100644 index 0000000000..2c42ca1c5a --- /dev/null +++ b/packages/client-ts/src/models/UserKerberosSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserKerberosSourceConnection + */ +export interface UserKerberosSourceConnection { + /** + * + * @type {number} + * @memberof UserKerberosSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserKerberosSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserKerberosSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserKerberosSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserKerberosSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserKerberosSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserKerberosSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the UserKerberosSourceConnection interface. + */ +export function instanceOfUserKerberosSourceConnection(value: object): value is UserKerberosSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserKerberosSourceConnectionFromJSON(json: any): UserKerberosSourceConnection { + return UserKerberosSourceConnectionFromJSONTyped(json, false); +} + +export function UserKerberosSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserKerberosSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserKerberosSourceConnectionToJSON(json: any): UserKerberosSourceConnection { + return UserKerberosSourceConnectionToJSONTyped(json, false); +} + +export function UserKerberosSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserKerberosSourceConnectionRequest.ts b/packages/client-ts/src/models/UserKerberosSourceConnectionRequest.ts new file mode 100644 index 0000000000..ddf98d5af9 --- /dev/null +++ b/packages/client-ts/src/models/UserKerberosSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserKerberosSourceConnectionRequest + */ +export interface UserKerberosSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserKerberosSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserKerberosSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserKerberosSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the UserKerberosSourceConnectionRequest interface. + */ +export function instanceOfUserKerberosSourceConnectionRequest(value: object): value is UserKerberosSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function UserKerberosSourceConnectionRequestFromJSON(json: any): UserKerberosSourceConnectionRequest { + return UserKerberosSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserKerberosSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserKerberosSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function UserKerberosSourceConnectionRequestToJSON(json: any): UserKerberosSourceConnectionRequest { + return UserKerberosSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserKerberosSourceConnectionRequestToJSONTyped(value?: UserKerberosSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserLDAPSourceConnection.ts b/packages/client-ts/src/models/UserLDAPSourceConnection.ts new file mode 100644 index 0000000000..6a86184402 --- /dev/null +++ b/packages/client-ts/src/models/UserLDAPSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserLDAPSourceConnection + */ +export interface UserLDAPSourceConnection { + /** + * + * @type {number} + * @memberof UserLDAPSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserLDAPSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserLDAPSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserLDAPSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserLDAPSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserLDAPSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserLDAPSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the UserLDAPSourceConnection interface. + */ +export function instanceOfUserLDAPSourceConnection(value: object): value is UserLDAPSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserLDAPSourceConnectionFromJSON(json: any): UserLDAPSourceConnection { + return UserLDAPSourceConnectionFromJSONTyped(json, false); +} + +export function UserLDAPSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLDAPSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserLDAPSourceConnectionToJSON(json: any): UserLDAPSourceConnection { + return UserLDAPSourceConnectionToJSONTyped(json, false); +} + +export function UserLDAPSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserLDAPSourceConnectionRequest.ts b/packages/client-ts/src/models/UserLDAPSourceConnectionRequest.ts new file mode 100644 index 0000000000..ba8b0139cb --- /dev/null +++ b/packages/client-ts/src/models/UserLDAPSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserLDAPSourceConnectionRequest + */ +export interface UserLDAPSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserLDAPSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserLDAPSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserLDAPSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the UserLDAPSourceConnectionRequest interface. + */ +export function instanceOfUserLDAPSourceConnectionRequest(value: object): value is UserLDAPSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function UserLDAPSourceConnectionRequestFromJSON(json: any): UserLDAPSourceConnectionRequest { + return UserLDAPSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserLDAPSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLDAPSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function UserLDAPSourceConnectionRequestToJSON(json: any): UserLDAPSourceConnectionRequest { + return UserLDAPSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserLDAPSourceConnectionRequestToJSONTyped(value?: UserLDAPSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserLoginChallenge.ts b/packages/client-ts/src/models/UserLoginChallenge.ts new file mode 100644 index 0000000000..7e0659a12a --- /dev/null +++ b/packages/client-ts/src/models/UserLoginChallenge.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; +import { + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ContextualFlowInfo } from './ContextualFlowInfo'; +import { + ContextualFlowInfoFromJSON, + ContextualFlowInfoFromJSONTyped, + ContextualFlowInfoToJSON, + ContextualFlowInfoToJSONTyped, +} from './ContextualFlowInfo'; + +/** + * Empty challenge + * @export + * @interface UserLoginChallenge + */ +export interface UserLoginChallenge { + /** + * + * @type {ContextualFlowInfo} + * @memberof UserLoginChallenge + */ + flowInfo?: ContextualFlowInfo; + /** + * + * @type {string} + * @memberof UserLoginChallenge + */ + component?: string; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof UserLoginChallenge + */ + responseErrors?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof UserLoginChallenge + */ + pendingUser: string; + /** + * + * @type {string} + * @memberof UserLoginChallenge + */ + pendingUserAvatar: string; +} + +/** + * Check if a given object implements the UserLoginChallenge interface. + */ +export function instanceOfUserLoginChallenge(value: object): value is UserLoginChallenge { + if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false; + if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false; + return true; +} + +export function UserLoginChallengeFromJSON(json: any): UserLoginChallenge { + return UserLoginChallengeFromJSONTyped(json, false); +} + +export function UserLoginChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLoginChallenge { + if (json == null) { + return json; + } + return { + + 'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']), + 'component': json['component'] == null ? undefined : json['component'], + 'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'], + 'pendingUser': json['pending_user'], + 'pendingUserAvatar': json['pending_user_avatar'], + }; +} + +export function UserLoginChallengeToJSON(json: any): UserLoginChallenge { + return UserLoginChallengeToJSONTyped(json, false); +} + +export function UserLoginChallengeToJSONTyped(value?: UserLoginChallenge | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'flow_info': ContextualFlowInfoToJSON(value['flowInfo']), + 'component': value['component'], + 'response_errors': value['responseErrors'], + 'pending_user': value['pendingUser'], + 'pending_user_avatar': value['pendingUserAvatar'], + }; +} + diff --git a/packages/client-ts/src/models/UserLoginChallengeResponseRequest.ts b/packages/client-ts/src/models/UserLoginChallengeResponseRequest.ts new file mode 100644 index 0000000000..194c677043 --- /dev/null +++ b/packages/client-ts/src/models/UserLoginChallengeResponseRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User login challenge + * @export + * @interface UserLoginChallengeResponseRequest + */ +export interface UserLoginChallengeResponseRequest { + /** + * + * @type {string} + * @memberof UserLoginChallengeResponseRequest + */ + component?: string; + /** + * + * @type {boolean} + * @memberof UserLoginChallengeResponseRequest + */ + rememberMe: boolean; +} + +/** + * Check if a given object implements the UserLoginChallengeResponseRequest interface. + */ +export function instanceOfUserLoginChallengeResponseRequest(value: object): value is UserLoginChallengeResponseRequest { + if (!('rememberMe' in value) || value['rememberMe'] === undefined) return false; + return true; +} + +export function UserLoginChallengeResponseRequestFromJSON(json: any): UserLoginChallengeResponseRequest { + return UserLoginChallengeResponseRequestFromJSONTyped(json, false); +} + +export function UserLoginChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLoginChallengeResponseRequest { + if (json == null) { + return json; + } + return { + + 'component': json['component'] == null ? undefined : json['component'], + 'rememberMe': json['remember_me'], + }; +} + +export function UserLoginChallengeResponseRequestToJSON(json: any): UserLoginChallengeResponseRequest { + return UserLoginChallengeResponseRequestToJSONTyped(json, false); +} + +export function UserLoginChallengeResponseRequestToJSONTyped(value?: UserLoginChallengeResponseRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'component': value['component'], + 'remember_me': value['rememberMe'], + }; +} + diff --git a/packages/client-ts/src/models/UserLoginStage.ts b/packages/client-ts/src/models/UserLoginStage.ts new file mode 100644 index 0000000000..2555d23af8 --- /dev/null +++ b/packages/client-ts/src/models/UserLoginStage.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GeoipBindingEnum } from './GeoipBindingEnum'; +import { + GeoipBindingEnumFromJSON, + GeoipBindingEnumFromJSONTyped, + GeoipBindingEnumToJSON, + GeoipBindingEnumToJSONTyped, +} from './GeoipBindingEnum'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; +import type { NetworkBindingEnum } from './NetworkBindingEnum'; +import { + NetworkBindingEnumFromJSON, + NetworkBindingEnumFromJSONTyped, + NetworkBindingEnumToJSON, + NetworkBindingEnumToJSONTyped, +} from './NetworkBindingEnum'; + +/** + * UserLoginStage Serializer + * @export + * @interface UserLoginStage + */ +export interface UserLoginStage { + /** + * + * @type {string} + * @memberof UserLoginStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof UserLoginStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof UserLoginStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof UserLoginStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof UserLoginStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof UserLoginStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof UserLoginStage + */ + readonly flowSet: Array; + /** + * 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) + * @type {string} + * @memberof UserLoginStage + */ + sessionDuration?: string; + /** + * Terminate all other sessions of the user logging in. + * @type {boolean} + * @memberof UserLoginStage + */ + terminateOtherSessions?: boolean; + /** + * 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) + * @type {string} + * @memberof UserLoginStage + */ + rememberMeOffset?: string; + /** + * Bind sessions created by this stage to the configured network + * @type {NetworkBindingEnum} + * @memberof UserLoginStage + */ + networkBinding?: NetworkBindingEnum; + /** + * Bind sessions created by this stage to the configured GeoIP location + * @type {GeoipBindingEnum} + * @memberof UserLoginStage + */ + geoipBinding?: GeoipBindingEnum; + /** + * When set to a non-zero value, authentik will save a cookie with a longer expiry,to remember the device the user is logging in from. (Format: hours=-1;minutes=-2;seconds=-3) + * @type {string} + * @memberof UserLoginStage + */ + rememberDevice?: string; +} + + + +/** + * Check if a given object implements the UserLoginStage interface. + */ +export function instanceOfUserLoginStage(value: object): value is UserLoginStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function UserLoginStageFromJSON(json: any): UserLoginStage { + return UserLoginStageFromJSONTyped(json, false); +} + +export function UserLoginStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLoginStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'sessionDuration': json['session_duration'] == null ? undefined : json['session_duration'], + 'terminateOtherSessions': json['terminate_other_sessions'] == null ? undefined : json['terminate_other_sessions'], + 'rememberMeOffset': json['remember_me_offset'] == null ? undefined : json['remember_me_offset'], + 'networkBinding': json['network_binding'] == null ? undefined : NetworkBindingEnumFromJSON(json['network_binding']), + 'geoipBinding': json['geoip_binding'] == null ? undefined : GeoipBindingEnumFromJSON(json['geoip_binding']), + 'rememberDevice': json['remember_device'] == null ? undefined : json['remember_device'], + }; +} + +export function UserLoginStageToJSON(json: any): UserLoginStage { + return UserLoginStageToJSONTyped(json, false); +} + +export function UserLoginStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'session_duration': value['sessionDuration'], + 'terminate_other_sessions': value['terminateOtherSessions'], + 'remember_me_offset': value['rememberMeOffset'], + 'network_binding': NetworkBindingEnumToJSON(value['networkBinding']), + 'geoip_binding': GeoipBindingEnumToJSON(value['geoipBinding']), + 'remember_device': value['rememberDevice'], + }; +} + diff --git a/packages/client-ts/src/models/UserLoginStageRequest.ts b/packages/client-ts/src/models/UserLoginStageRequest.ts new file mode 100644 index 0000000000..c03f62d4ff --- /dev/null +++ b/packages/client-ts/src/models/UserLoginStageRequest.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GeoipBindingEnum } from './GeoipBindingEnum'; +import { + GeoipBindingEnumFromJSON, + GeoipBindingEnumFromJSONTyped, + GeoipBindingEnumToJSON, + GeoipBindingEnumToJSONTyped, +} from './GeoipBindingEnum'; +import type { NetworkBindingEnum } from './NetworkBindingEnum'; +import { + NetworkBindingEnumFromJSON, + NetworkBindingEnumFromJSONTyped, + NetworkBindingEnumToJSON, + NetworkBindingEnumToJSONTyped, +} from './NetworkBindingEnum'; + +/** + * UserLoginStage Serializer + * @export + * @interface UserLoginStageRequest + */ +export interface UserLoginStageRequest { + /** + * + * @type {string} + * @memberof UserLoginStageRequest + */ + name: 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) + * @type {string} + * @memberof UserLoginStageRequest + */ + sessionDuration?: string; + /** + * Terminate all other sessions of the user logging in. + * @type {boolean} + * @memberof UserLoginStageRequest + */ + terminateOtherSessions?: boolean; + /** + * 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) + * @type {string} + * @memberof UserLoginStageRequest + */ + rememberMeOffset?: string; + /** + * Bind sessions created by this stage to the configured network + * @type {NetworkBindingEnum} + * @memberof UserLoginStageRequest + */ + networkBinding?: NetworkBindingEnum; + /** + * Bind sessions created by this stage to the configured GeoIP location + * @type {GeoipBindingEnum} + * @memberof UserLoginStageRequest + */ + geoipBinding?: GeoipBindingEnum; + /** + * When set to a non-zero value, authentik will save a cookie with a longer expiry,to remember the device the user is logging in from. (Format: hours=-1;minutes=-2;seconds=-3) + * @type {string} + * @memberof UserLoginStageRequest + */ + rememberDevice?: string; +} + + + +/** + * Check if a given object implements the UserLoginStageRequest interface. + */ +export function instanceOfUserLoginStageRequest(value: object): value is UserLoginStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UserLoginStageRequestFromJSON(json: any): UserLoginStageRequest { + return UserLoginStageRequestFromJSONTyped(json, false); +} + +export function UserLoginStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLoginStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'sessionDuration': json['session_duration'] == null ? undefined : json['session_duration'], + 'terminateOtherSessions': json['terminate_other_sessions'] == null ? undefined : json['terminate_other_sessions'], + 'rememberMeOffset': json['remember_me_offset'] == null ? undefined : json['remember_me_offset'], + 'networkBinding': json['network_binding'] == null ? undefined : NetworkBindingEnumFromJSON(json['network_binding']), + 'geoipBinding': json['geoip_binding'] == null ? undefined : GeoipBindingEnumFromJSON(json['geoip_binding']), + 'rememberDevice': json['remember_device'] == null ? undefined : json['remember_device'], + }; +} + +export function UserLoginStageRequestToJSON(json: any): UserLoginStageRequest { + return UserLoginStageRequestToJSONTyped(json, false); +} + +export function UserLoginStageRequestToJSONTyped(value?: UserLoginStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'session_duration': value['sessionDuration'], + 'terminate_other_sessions': value['terminateOtherSessions'], + 'remember_me_offset': value['rememberMeOffset'], + 'network_binding': NetworkBindingEnumToJSON(value['networkBinding']), + 'geoip_binding': GeoipBindingEnumToJSON(value['geoipBinding']), + 'remember_device': value['rememberDevice'], + }; +} + diff --git a/packages/client-ts/src/models/UserLogoutStage.ts b/packages/client-ts/src/models/UserLogoutStage.ts new file mode 100644 index 0000000000..7b3dad8421 --- /dev/null +++ b/packages/client-ts/src/models/UserLogoutStage.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; + +/** + * UserLogoutStage Serializer + * @export + * @interface UserLogoutStage + */ +export interface UserLogoutStage { + /** + * + * @type {string} + * @memberof UserLogoutStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof UserLogoutStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof UserLogoutStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof UserLogoutStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof UserLogoutStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof UserLogoutStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof UserLogoutStage + */ + readonly flowSet: Array; +} + +/** + * Check if a given object implements the UserLogoutStage interface. + */ +export function instanceOfUserLogoutStage(value: object): value is UserLogoutStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function UserLogoutStageFromJSON(json: any): UserLogoutStage { + return UserLogoutStageFromJSONTyped(json, false); +} + +export function UserLogoutStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLogoutStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + }; +} + +export function UserLogoutStageToJSON(json: any): UserLogoutStage { + return UserLogoutStageToJSONTyped(json, false); +} + +export function UserLogoutStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/UserLogoutStageRequest.ts b/packages/client-ts/src/models/UserLogoutStageRequest.ts new file mode 100644 index 0000000000..36a28f717c --- /dev/null +++ b/packages/client-ts/src/models/UserLogoutStageRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * UserLogoutStage Serializer + * @export + * @interface UserLogoutStageRequest + */ +export interface UserLogoutStageRequest { + /** + * + * @type {string} + * @memberof UserLogoutStageRequest + */ + name: string; +} + +/** + * Check if a given object implements the UserLogoutStageRequest interface. + */ +export function instanceOfUserLogoutStageRequest(value: object): value is UserLogoutStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UserLogoutStageRequestFromJSON(json: any): UserLogoutStageRequest { + return UserLogoutStageRequestFromJSONTyped(json, false); +} + +export function UserLogoutStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLogoutStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function UserLogoutStageRequestToJSON(json: any): UserLogoutStageRequest { + return UserLogoutStageRequestToJSONTyped(json, false); +} + +export function UserLogoutStageRequestToJSONTyped(value?: UserLogoutStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/UserMatchingModeEnum.ts b/packages/client-ts/src/models/UserMatchingModeEnum.ts new file mode 100644 index 0000000000..fa9b22214b --- /dev/null +++ b/packages/client-ts/src/models/UserMatchingModeEnum.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UserMatchingModeEnum = { + Identifier: 'identifier', + EmailLink: 'email_link', + EmailDeny: 'email_deny', + UsernameLink: 'username_link', + UsernameDeny: 'username_deny', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UserMatchingModeEnum = typeof UserMatchingModeEnum[keyof typeof UserMatchingModeEnum]; + + +export function instanceOfUserMatchingModeEnum(value: any): boolean { + for (const key in UserMatchingModeEnum) { + if (Object.prototype.hasOwnProperty.call(UserMatchingModeEnum, key)) { + if (UserMatchingModeEnum[key as keyof typeof UserMatchingModeEnum] === value) { + return true; + } + } + } + return false; +} + +export function UserMatchingModeEnumFromJSON(json: any): UserMatchingModeEnum { + return UserMatchingModeEnumFromJSONTyped(json, false); +} + +export function UserMatchingModeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserMatchingModeEnum { + return json as UserMatchingModeEnum; +} + +export function UserMatchingModeEnumToJSON(value?: UserMatchingModeEnum | null): any { + return value as any; +} + +export function UserMatchingModeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UserMatchingModeEnum { + return value as UserMatchingModeEnum; +} + diff --git a/packages/client-ts/src/models/UserOAuthSourceConnection.ts b/packages/client-ts/src/models/UserOAuthSourceConnection.ts new file mode 100644 index 0000000000..c081614920 --- /dev/null +++ b/packages/client-ts/src/models/UserOAuthSourceConnection.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserOAuthSourceConnection + */ +export interface UserOAuthSourceConnection { + /** + * + * @type {number} + * @memberof UserOAuthSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserOAuthSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserOAuthSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserOAuthSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserOAuthSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserOAuthSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserOAuthSourceConnection + */ + readonly lastUpdated: Date; + /** + * + * @type {Date} + * @memberof UserOAuthSourceConnection + */ + expires?: Date; +} + +/** + * Check if a given object implements the UserOAuthSourceConnection interface. + */ +export function instanceOfUserOAuthSourceConnection(value: object): value is UserOAuthSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserOAuthSourceConnectionFromJSON(json: any): UserOAuthSourceConnection { + return UserOAuthSourceConnectionFromJSONTyped(json, false); +} + +export function UserOAuthSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserOAuthSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function UserOAuthSourceConnectionToJSON(json: any): UserOAuthSourceConnection { + return UserOAuthSourceConnectionToJSONTyped(json, false); +} + +export function UserOAuthSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/UserOAuthSourceConnectionRequest.ts b/packages/client-ts/src/models/UserOAuthSourceConnectionRequest.ts new file mode 100644 index 0000000000..a13be169c4 --- /dev/null +++ b/packages/client-ts/src/models/UserOAuthSourceConnectionRequest.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserOAuthSourceConnectionRequest + */ +export interface UserOAuthSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserOAuthSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserOAuthSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserOAuthSourceConnectionRequest + */ + identifier: string; + /** + * + * @type {string} + * @memberof UserOAuthSourceConnectionRequest + */ + accessToken?: string | null; + /** + * + * @type {Date} + * @memberof UserOAuthSourceConnectionRequest + */ + expires?: Date; +} + +/** + * Check if a given object implements the UserOAuthSourceConnectionRequest interface. + */ +export function instanceOfUserOAuthSourceConnectionRequest(value: object): value is UserOAuthSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function UserOAuthSourceConnectionRequestFromJSON(json: any): UserOAuthSourceConnectionRequest { + return UserOAuthSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserOAuthSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserOAuthSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + 'accessToken': json['access_token'] == null ? undefined : json['access_token'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function UserOAuthSourceConnectionRequestToJSON(json: any): UserOAuthSourceConnectionRequest { + return UserOAuthSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserOAuthSourceConnectionRequestToJSONTyped(value?: UserOAuthSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + 'access_token': value['accessToken'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/UserPasswordSetRequest.ts b/packages/client-ts/src/models/UserPasswordSetRequest.ts new file mode 100644 index 0000000000..aca8f45da2 --- /dev/null +++ b/packages/client-ts/src/models/UserPasswordSetRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Payload to set a users' password directly + * @export + * @interface UserPasswordSetRequest + */ +export interface UserPasswordSetRequest { + /** + * + * @type {string} + * @memberof UserPasswordSetRequest + */ + password: string; +} + +/** + * Check if a given object implements the UserPasswordSetRequest interface. + */ +export function instanceOfUserPasswordSetRequest(value: object): value is UserPasswordSetRequest { + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function UserPasswordSetRequestFromJSON(json: any): UserPasswordSetRequest { + return UserPasswordSetRequestFromJSONTyped(json, false); +} + +export function UserPasswordSetRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPasswordSetRequest { + if (json == null) { + return json; + } + return { + + 'password': json['password'], + }; +} + +export function UserPasswordSetRequestToJSON(json: any): UserPasswordSetRequest { + return UserPasswordSetRequestToJSONTyped(json, false); +} + +export function UserPasswordSetRequestToJSONTyped(value?: UserPasswordSetRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'password': value['password'], + }; +} + diff --git a/packages/client-ts/src/models/UserPath.ts b/packages/client-ts/src/models/UserPath.ts new file mode 100644 index 0000000000..ef79f94aca --- /dev/null +++ b/packages/client-ts/src/models/UserPath.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface UserPath + */ +export interface UserPath { + /** + * + * @type {Array} + * @memberof UserPath + */ + readonly paths: Array; +} + +/** + * Check if a given object implements the UserPath interface. + */ +export function instanceOfUserPath(value: object): value is UserPath { + if (!('paths' in value) || value['paths'] === undefined) return false; + return true; +} + +export function UserPathFromJSON(json: any): UserPath { + return UserPathFromJSONTyped(json, false); +} + +export function UserPathFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPath { + if (json == null) { + return json; + } + return { + + 'paths': json['paths'], + }; +} + +export function UserPathToJSON(json: any): UserPath { + return UserPathToJSONTyped(json, false); +} + +export function UserPathToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/UserPlexSourceConnection.ts b/packages/client-ts/src/models/UserPlexSourceConnection.ts new file mode 100644 index 0000000000..ff86964219 --- /dev/null +++ b/packages/client-ts/src/models/UserPlexSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserPlexSourceConnection + */ +export interface UserPlexSourceConnection { + /** + * + * @type {number} + * @memberof UserPlexSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserPlexSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserPlexSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserPlexSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserPlexSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserPlexSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserPlexSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the UserPlexSourceConnection interface. + */ +export function instanceOfUserPlexSourceConnection(value: object): value is UserPlexSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserPlexSourceConnectionFromJSON(json: any): UserPlexSourceConnection { + return UserPlexSourceConnectionFromJSONTyped(json, false); +} + +export function UserPlexSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPlexSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserPlexSourceConnectionToJSON(json: any): UserPlexSourceConnection { + return UserPlexSourceConnectionToJSONTyped(json, false); +} + +export function UserPlexSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserPlexSourceConnectionRequest.ts b/packages/client-ts/src/models/UserPlexSourceConnectionRequest.ts new file mode 100644 index 0000000000..ca7794af5d --- /dev/null +++ b/packages/client-ts/src/models/UserPlexSourceConnectionRequest.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserPlexSourceConnectionRequest + */ +export interface UserPlexSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserPlexSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserPlexSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserPlexSourceConnectionRequest + */ + identifier: string; + /** + * + * @type {string} + * @memberof UserPlexSourceConnectionRequest + */ + plexToken: string; +} + +/** + * Check if a given object implements the UserPlexSourceConnectionRequest interface. + */ +export function instanceOfUserPlexSourceConnectionRequest(value: object): value is UserPlexSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('plexToken' in value) || value['plexToken'] === undefined) return false; + return true; +} + +export function UserPlexSourceConnectionRequestFromJSON(json: any): UserPlexSourceConnectionRequest { + return UserPlexSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserPlexSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPlexSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + 'plexToken': json['plex_token'], + }; +} + +export function UserPlexSourceConnectionRequestToJSON(json: any): UserPlexSourceConnectionRequest { + return UserPlexSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserPlexSourceConnectionRequestToJSONTyped(value?: UserPlexSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + 'plex_token': value['plexToken'], + }; +} + diff --git a/packages/client-ts/src/models/UserRecoveryEmailRequest.ts b/packages/client-ts/src/models/UserRecoveryEmailRequest.ts new file mode 100644 index 0000000000..633961367f --- /dev/null +++ b/packages/client-ts/src/models/UserRecoveryEmailRequest.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Payload to create and email a recovery link + * @export + * @interface UserRecoveryEmailRequest + */ +export interface UserRecoveryEmailRequest { + /** + * + * @type {string} + * @memberof UserRecoveryEmailRequest + */ + tokenDuration?: string; + /** + * + * @type {string} + * @memberof UserRecoveryEmailRequest + */ + emailStage: string; +} + +/** + * Check if a given object implements the UserRecoveryEmailRequest interface. + */ +export function instanceOfUserRecoveryEmailRequest(value: object): value is UserRecoveryEmailRequest { + if (!('emailStage' in value) || value['emailStage'] === undefined) return false; + return true; +} + +export function UserRecoveryEmailRequestFromJSON(json: any): UserRecoveryEmailRequest { + return UserRecoveryEmailRequestFromJSONTyped(json, false); +} + +export function UserRecoveryEmailRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRecoveryEmailRequest { + if (json == null) { + return json; + } + return { + + 'tokenDuration': json['token_duration'] == null ? undefined : json['token_duration'], + 'emailStage': json['email_stage'], + }; +} + +export function UserRecoveryEmailRequestToJSON(json: any): UserRecoveryEmailRequest { + return UserRecoveryEmailRequestToJSONTyped(json, false); +} + +export function UserRecoveryEmailRequestToJSONTyped(value?: UserRecoveryEmailRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token_duration': value['tokenDuration'], + 'email_stage': value['emailStage'], + }; +} + diff --git a/packages/client-ts/src/models/UserRecoveryLinkRequest.ts b/packages/client-ts/src/models/UserRecoveryLinkRequest.ts new file mode 100644 index 0000000000..88ff815013 --- /dev/null +++ b/packages/client-ts/src/models/UserRecoveryLinkRequest.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Payload to create a recovery link + * @export + * @interface UserRecoveryLinkRequest + */ +export interface UserRecoveryLinkRequest { + /** + * + * @type {string} + * @memberof UserRecoveryLinkRequest + */ + tokenDuration?: string; +} + +/** + * Check if a given object implements the UserRecoveryLinkRequest interface. + */ +export function instanceOfUserRecoveryLinkRequest(value: object): value is UserRecoveryLinkRequest { + return true; +} + +export function UserRecoveryLinkRequestFromJSON(json: any): UserRecoveryLinkRequest { + return UserRecoveryLinkRequestFromJSONTyped(json, false); +} + +export function UserRecoveryLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRecoveryLinkRequest { + if (json == null) { + return json; + } + return { + + 'tokenDuration': json['token_duration'] == null ? undefined : json['token_duration'], + }; +} + +export function UserRecoveryLinkRequestToJSON(json: any): UserRecoveryLinkRequest { + return UserRecoveryLinkRequestToJSONTyped(json, false); +} + +export function UserRecoveryLinkRequestToJSONTyped(value?: UserRecoveryLinkRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token_duration': value['tokenDuration'], + }; +} + diff --git a/packages/client-ts/src/models/UserRequest.ts b/packages/client-ts/src/models/UserRequest.ts new file mode 100644 index 0000000000..8596e06adb --- /dev/null +++ b/packages/client-ts/src/models/UserRequest.ts @@ -0,0 +1,149 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; + +/** + * User Serializer + * @export + * @interface UserRequest + */ +export interface UserRequest { + /** + * + * @type {string} + * @memberof UserRequest + */ + username: string; + /** + * User's display name. + * @type {string} + * @memberof UserRequest + */ + name: string; + /** + * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + * @type {boolean} + * @memberof UserRequest + */ + isActive?: boolean; + /** + * + * @type {Date} + * @memberof UserRequest + */ + lastLogin?: Date | null; + /** + * + * @type {Array} + * @memberof UserRequest + */ + groups?: Array; + /** + * + * @type {Array} + * @memberof UserRequest + */ + roles?: Array; + /** + * + * @type {string} + * @memberof UserRequest + */ + email?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof UserRequest + */ + attributes?: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof UserRequest + */ + path?: string; + /** + * + * @type {UserTypeEnum} + * @memberof UserRequest + */ + type?: UserTypeEnum; +} + + + +/** + * Check if a given object implements the UserRequest interface. + */ +export function instanceOfUserRequest(value: object): value is UserRequest { + if (!('username' in value) || value['username'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UserRequestFromJSON(json: any): UserRequest { + return UserRequestFromJSONTyped(json, false); +} + +export function UserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRequest { + if (json == null) { + return json; + } + return { + + 'username': json['username'], + 'name': json['name'], + 'isActive': json['is_active'] == null ? undefined : json['is_active'], + 'lastLogin': json['last_login'] == null ? undefined : (new Date(json['last_login'])), + 'groups': json['groups'] == null ? undefined : json['groups'], + 'roles': json['roles'] == null ? undefined : json['roles'], + 'email': json['email'] == null ? undefined : json['email'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'path': json['path'] == null ? undefined : json['path'], + 'type': json['type'] == null ? undefined : UserTypeEnumFromJSON(json['type']), + }; +} + +export function UserRequestToJSON(json: any): UserRequest { + return UserRequestToJSONTyped(json, false); +} + +export function UserRequestToJSONTyped(value?: UserRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'name': value['name'], + 'is_active': value['isActive'], + 'last_login': value['lastLogin'] == null ? value['lastLogin'] : value['lastLogin'].toISOString(), + 'groups': value['groups'], + 'roles': value['roles'], + 'email': value['email'], + 'attributes': value['attributes'], + 'path': value['path'], + 'type': UserTypeEnumToJSON(value['type']), + }; +} + diff --git a/packages/client-ts/src/models/UserSAMLSourceConnection.ts b/packages/client-ts/src/models/UserSAMLSourceConnection.ts new file mode 100644 index 0000000000..d4fa06e2ce --- /dev/null +++ b/packages/client-ts/src/models/UserSAMLSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserSAMLSourceConnection + */ +export interface UserSAMLSourceConnection { + /** + * + * @type {number} + * @memberof UserSAMLSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserSAMLSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserSAMLSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserSAMLSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserSAMLSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserSAMLSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserSAMLSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the UserSAMLSourceConnection interface. + */ +export function instanceOfUserSAMLSourceConnection(value: object): value is UserSAMLSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserSAMLSourceConnectionFromJSON(json: any): UserSAMLSourceConnection { + return UserSAMLSourceConnectionFromJSONTyped(json, false); +} + +export function UserSAMLSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSAMLSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserSAMLSourceConnectionToJSON(json: any): UserSAMLSourceConnection { + return UserSAMLSourceConnectionToJSONTyped(json, false); +} + +export function UserSAMLSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserSAMLSourceConnectionRequest.ts b/packages/client-ts/src/models/UserSAMLSourceConnectionRequest.ts new file mode 100644 index 0000000000..f3f2837739 --- /dev/null +++ b/packages/client-ts/src/models/UserSAMLSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserSAMLSourceConnectionRequest + */ +export interface UserSAMLSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserSAMLSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserSAMLSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserSAMLSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the UserSAMLSourceConnectionRequest interface. + */ +export function instanceOfUserSAMLSourceConnectionRequest(value: object): value is UserSAMLSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function UserSAMLSourceConnectionRequestFromJSON(json: any): UserSAMLSourceConnectionRequest { + return UserSAMLSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserSAMLSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSAMLSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function UserSAMLSourceConnectionRequestToJSON(json: any): UserSAMLSourceConnectionRequest { + return UserSAMLSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserSAMLSourceConnectionRequestToJSONTyped(value?: UserSAMLSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserSelf.ts b/packages/client-ts/src/models/UserSelf.ts new file mode 100644 index 0000000000..b4d787340e --- /dev/null +++ b/packages/client-ts/src/models/UserSelf.ts @@ -0,0 +1,187 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserSelfGroups } from './UserSelfGroups'; +import { + UserSelfGroupsFromJSON, + UserSelfGroupsFromJSONTyped, + UserSelfGroupsToJSON, + UserSelfGroupsToJSONTyped, +} from './UserSelfGroups'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; +import type { UserSelfRoles } from './UserSelfRoles'; +import { + UserSelfRolesFromJSON, + UserSelfRolesFromJSONTyped, + UserSelfRolesToJSON, + UserSelfRolesToJSONTyped, +} from './UserSelfRoles'; + +/** + * User Serializer for information a user can retrieve about themselves + * @export + * @interface UserSelf + */ +export interface UserSelf { + /** + * + * @type {number} + * @memberof UserSelf + */ + readonly pk: number; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof UserSelf + */ + username: string; + /** + * User's display name. + * @type {string} + * @memberof UserSelf + */ + name: string; + /** + * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. + * @type {boolean} + * @memberof UserSelf + */ + readonly isActive: boolean; + /** + * + * @type {boolean} + * @memberof UserSelf + */ + readonly isSuperuser: boolean; + /** + * + * @type {Array} + * @memberof UserSelf + */ + readonly groups: Array; + /** + * + * @type {Array} + * @memberof UserSelf + */ + readonly roles: Array; + /** + * + * @type {string} + * @memberof UserSelf + */ + email?: string; + /** + * User's avatar, either a http/https URL or a data URI + * @type {string} + * @memberof UserSelf + */ + readonly avatar: string; + /** + * + * @type {string} + * @memberof UserSelf + */ + readonly uid: string; + /** + * Get user settings with brand and group settings applied + * @type {{ [key: string]: any; }} + * @memberof UserSelf + */ + readonly settings: { [key: string]: any; }; + /** + * + * @type {UserTypeEnum} + * @memberof UserSelf + */ + type?: UserTypeEnum; + /** + * Get all system permissions assigned to the user + * @type {Array} + * @memberof UserSelf + */ + readonly systemPermissions: Array; +} + + + +/** + * Check if a given object implements the UserSelf interface. + */ +export function instanceOfUserSelf(value: object): value is UserSelf { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('username' in value) || value['username'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('isActive' in value) || value['isActive'] === undefined) return false; + if (!('isSuperuser' in value) || value['isSuperuser'] === undefined) return false; + if (!('groups' in value) || value['groups'] === undefined) return false; + if (!('roles' in value) || value['roles'] === undefined) return false; + if (!('avatar' in value) || value['avatar'] === undefined) return false; + if (!('uid' in value) || value['uid'] === undefined) return false; + if (!('settings' in value) || value['settings'] === undefined) return false; + if (!('systemPermissions' in value) || value['systemPermissions'] === undefined) return false; + return true; +} + +export function UserSelfFromJSON(json: any): UserSelf { + return UserSelfFromJSONTyped(json, false); +} + +export function UserSelfFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSelf { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'username': json['username'], + 'name': json['name'], + 'isActive': json['is_active'], + 'isSuperuser': json['is_superuser'], + 'groups': ((json['groups'] as Array).map(UserSelfGroupsFromJSON)), + 'roles': ((json['roles'] as Array).map(UserSelfRolesFromJSON)), + 'email': json['email'] == null ? undefined : json['email'], + 'avatar': json['avatar'], + 'uid': json['uid'], + 'settings': json['settings'], + 'type': json['type'] == null ? undefined : UserTypeEnumFromJSON(json['type']), + 'systemPermissions': json['system_permissions'], + }; +} + +export function UserSelfToJSON(json: any): UserSelf { + return UserSelfToJSONTyped(json, false); +} + +export function UserSelfToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'name': value['name'], + 'email': value['email'], + 'type': UserTypeEnumToJSON(value['type']), + }; +} + diff --git a/packages/client-ts/src/models/UserSelfGroups.ts b/packages/client-ts/src/models/UserSelfGroups.ts new file mode 100644 index 0000000000..505e5162c7 --- /dev/null +++ b/packages/client-ts/src/models/UserSelfGroups.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface UserSelfGroups + */ +export interface UserSelfGroups { + /** + * + * @type {string} + * @memberof UserSelfGroups + */ + readonly name: string; + /** + * + * @type {string} + * @memberof UserSelfGroups + */ + readonly pk: string; +} + +/** + * Check if a given object implements the UserSelfGroups interface. + */ +export function instanceOfUserSelfGroups(value: object): value is UserSelfGroups { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + return true; +} + +export function UserSelfGroupsFromJSON(json: any): UserSelfGroups { + return UserSelfGroupsFromJSONTyped(json, false); +} + +export function UserSelfGroupsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSelfGroups { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'pk': json['pk'], + }; +} + +export function UserSelfGroupsToJSON(json: any): UserSelfGroups { + return UserSelfGroupsToJSONTyped(json, false); +} + +export function UserSelfGroupsToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/UserSelfRoles.ts b/packages/client-ts/src/models/UserSelfRoles.ts new file mode 100644 index 0000000000..a6a67485d1 --- /dev/null +++ b/packages/client-ts/src/models/UserSelfRoles.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface UserSelfRoles + */ +export interface UserSelfRoles { + /** + * + * @type {string} + * @memberof UserSelfRoles + */ + readonly name: string; + /** + * + * @type {string} + * @memberof UserSelfRoles + */ + readonly pk: string; +} + +/** + * Check if a given object implements the UserSelfRoles interface. + */ +export function instanceOfUserSelfRoles(value: object): value is UserSelfRoles { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('pk' in value) || value['pk'] === undefined) return false; + return true; +} + +export function UserSelfRolesFromJSON(json: any): UserSelfRoles { + return UserSelfRolesFromJSONTyped(json, false); +} + +export function UserSelfRolesFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSelfRoles { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'pk': json['pk'], + }; +} + +export function UserSelfRolesToJSON(json: any): UserSelfRoles { + return UserSelfRolesToJSONTyped(json, false); +} + +export function UserSelfRolesToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/UserServiceAccountRequest.ts b/packages/client-ts/src/models/UserServiceAccountRequest.ts new file mode 100644 index 0000000000..6f45a8538e --- /dev/null +++ b/packages/client-ts/src/models/UserServiceAccountRequest.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Payload to create a service account + * @export + * @interface UserServiceAccountRequest + */ +export interface UserServiceAccountRequest { + /** + * + * @type {string} + * @memberof UserServiceAccountRequest + */ + name: string; + /** + * + * @type {boolean} + * @memberof UserServiceAccountRequest + */ + createGroup?: boolean; + /** + * + * @type {boolean} + * @memberof UserServiceAccountRequest + */ + expiring?: boolean; + /** + * If not provided, valid for 360 days + * @type {Date} + * @memberof UserServiceAccountRequest + */ + expires?: Date; +} + +/** + * Check if a given object implements the UserServiceAccountRequest interface. + */ +export function instanceOfUserServiceAccountRequest(value: object): value is UserServiceAccountRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UserServiceAccountRequestFromJSON(json: any): UserServiceAccountRequest { + return UserServiceAccountRequestFromJSONTyped(json, false); +} + +export function UserServiceAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserServiceAccountRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'createGroup': json['create_group'] == null ? undefined : json['create_group'], + 'expiring': json['expiring'] == null ? undefined : json['expiring'], + 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), + }; +} + +export function UserServiceAccountRequestToJSON(json: any): UserServiceAccountRequest { + return UserServiceAccountRequestToJSONTyped(json, false); +} + +export function UserServiceAccountRequestToJSONTyped(value?: UserServiceAccountRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'create_group': value['createGroup'], + 'expiring': value['expiring'], + 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), + }; +} + diff --git a/packages/client-ts/src/models/UserServiceAccountResponse.ts b/packages/client-ts/src/models/UserServiceAccountResponse.ts new file mode 100644 index 0000000000..ba4e3541f2 --- /dev/null +++ b/packages/client-ts/src/models/UserServiceAccountResponse.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface UserServiceAccountResponse + */ +export interface UserServiceAccountResponse { + /** + * + * @type {string} + * @memberof UserServiceAccountResponse + */ + username: string; + /** + * + * @type {string} + * @memberof UserServiceAccountResponse + */ + token: string; + /** + * + * @type {string} + * @memberof UserServiceAccountResponse + */ + userUid: string; + /** + * + * @type {number} + * @memberof UserServiceAccountResponse + */ + userPk: number; + /** + * + * @type {string} + * @memberof UserServiceAccountResponse + */ + groupPk?: string; +} + +/** + * Check if a given object implements the UserServiceAccountResponse interface. + */ +export function instanceOfUserServiceAccountResponse(value: object): value is UserServiceAccountResponse { + if (!('username' in value) || value['username'] === undefined) return false; + if (!('token' in value) || value['token'] === undefined) return false; + if (!('userUid' in value) || value['userUid'] === undefined) return false; + if (!('userPk' in value) || value['userPk'] === undefined) return false; + return true; +} + +export function UserServiceAccountResponseFromJSON(json: any): UserServiceAccountResponse { + return UserServiceAccountResponseFromJSONTyped(json, false); +} + +export function UserServiceAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserServiceAccountResponse { + if (json == null) { + return json; + } + return { + + 'username': json['username'], + 'token': json['token'], + 'userUid': json['user_uid'], + 'userPk': json['user_pk'], + 'groupPk': json['group_pk'] == null ? undefined : json['group_pk'], + }; +} + +export function UserServiceAccountResponseToJSON(json: any): UserServiceAccountResponse { + return UserServiceAccountResponseToJSONTyped(json, false); +} + +export function UserServiceAccountResponseToJSONTyped(value?: UserServiceAccountResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'username': value['username'], + 'token': value['token'], + 'user_uid': value['userUid'], + 'user_pk': value['userPk'], + 'group_pk': value['groupPk'], + }; +} + diff --git a/packages/client-ts/src/models/UserSetting.ts b/packages/client-ts/src/models/UserSetting.ts new file mode 100644 index 0000000000..a99574750f --- /dev/null +++ b/packages/client-ts/src/models/UserSetting.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for User settings for stages and sources + * @export + * @interface UserSetting + */ +export interface UserSetting { + /** + * + * @type {string} + * @memberof UserSetting + */ + objectUid: string; + /** + * + * @type {string} + * @memberof UserSetting + */ + component: string; + /** + * + * @type {string} + * @memberof UserSetting + */ + title: string; + /** + * + * @type {string} + * @memberof UserSetting + */ + configureUrl?: string; + /** + * + * @type {string} + * @memberof UserSetting + */ + iconUrl?: string; +} + +/** + * Check if a given object implements the UserSetting interface. + */ +export function instanceOfUserSetting(value: object): value is UserSetting { + if (!('objectUid' in value) || value['objectUid'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('title' in value) || value['title'] === undefined) return false; + return true; +} + +export function UserSettingFromJSON(json: any): UserSetting { + return UserSettingFromJSONTyped(json, false); +} + +export function UserSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSetting { + if (json == null) { + return json; + } + return { + + 'objectUid': json['object_uid'], + 'component': json['component'], + 'title': json['title'], + 'configureUrl': json['configure_url'] == null ? undefined : json['configure_url'], + 'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'], + }; +} + +export function UserSettingToJSON(json: any): UserSetting { + return UserSettingToJSONTyped(json, false); +} + +export function UserSettingToJSONTyped(value?: UserSetting | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'object_uid': value['objectUid'], + 'component': value['component'], + 'title': value['title'], + 'configure_url': value['configureUrl'], + 'icon_url': value['iconUrl'], + }; +} + diff --git a/packages/client-ts/src/models/UserSourceConnection.ts b/packages/client-ts/src/models/UserSourceConnection.ts new file mode 100644 index 0000000000..3239a3f164 --- /dev/null +++ b/packages/client-ts/src/models/UserSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserSourceConnection + */ +export interface UserSourceConnection { + /** + * + * @type {number} + * @memberof UserSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the UserSourceConnection interface. + */ +export function instanceOfUserSourceConnection(value: object): value is UserSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserSourceConnectionFromJSON(json: any): UserSourceConnection { + return UserSourceConnectionFromJSONTyped(json, false); +} + +export function UserSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserSourceConnectionToJSON(json: any): UserSourceConnection { + return UserSourceConnectionToJSONTyped(json, false); +} + +export function UserSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserSourceConnectionRequest.ts b/packages/client-ts/src/models/UserSourceConnectionRequest.ts new file mode 100644 index 0000000000..69a283ee69 --- /dev/null +++ b/packages/client-ts/src/models/UserSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserSourceConnectionRequest + */ +export interface UserSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the UserSourceConnectionRequest interface. + */ +export function instanceOfUserSourceConnectionRequest(value: object): value is UserSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function UserSourceConnectionRequestFromJSON(json: any): UserSourceConnectionRequest { + return UserSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function UserSourceConnectionRequestToJSON(json: any): UserSourceConnectionRequest { + return UserSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserSourceConnectionRequestToJSONTyped(value?: UserSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserTelegramSourceConnection.ts b/packages/client-ts/src/models/UserTelegramSourceConnection.ts new file mode 100644 index 0000000000..bad05a9eb5 --- /dev/null +++ b/packages/client-ts/src/models/UserTelegramSourceConnection.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Source } from './Source'; +import { + SourceFromJSON, + SourceFromJSONTyped, + SourceToJSON, + SourceToJSONTyped, +} from './Source'; + +/** + * User source connection + * @export + * @interface UserTelegramSourceConnection + */ +export interface UserTelegramSourceConnection { + /** + * + * @type {number} + * @memberof UserTelegramSourceConnection + */ + readonly pk: number; + /** + * + * @type {number} + * @memberof UserTelegramSourceConnection + */ + user: number; + /** + * + * @type {string} + * @memberof UserTelegramSourceConnection + */ + source: string; + /** + * + * @type {Source} + * @memberof UserTelegramSourceConnection + */ + readonly sourceObj: Source; + /** + * + * @type {string} + * @memberof UserTelegramSourceConnection + */ + identifier: string; + /** + * + * @type {Date} + * @memberof UserTelegramSourceConnection + */ + readonly created: Date; + /** + * + * @type {Date} + * @memberof UserTelegramSourceConnection + */ + readonly lastUpdated: Date; +} + +/** + * Check if a given object implements the UserTelegramSourceConnection interface. + */ +export function instanceOfUserTelegramSourceConnection(value: object): value is UserTelegramSourceConnection { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('sourceObj' in value) || value['sourceObj'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + if (!('created' in value) || value['created'] === undefined) return false; + if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false; + return true; +} + +export function UserTelegramSourceConnectionFromJSON(json: any): UserTelegramSourceConnection { + return UserTelegramSourceConnectionFromJSONTyped(json, false); +} + +export function UserTelegramSourceConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserTelegramSourceConnection { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'user': json['user'], + 'source': json['source'], + 'sourceObj': SourceFromJSON(json['source_obj']), + 'identifier': json['identifier'], + 'created': (new Date(json['created'])), + 'lastUpdated': (new Date(json['last_updated'])), + }; +} + +export function UserTelegramSourceConnectionToJSON(json: any): UserTelegramSourceConnection { + return UserTelegramSourceConnectionToJSONTyped(json, false); +} + +export function UserTelegramSourceConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserTelegramSourceConnectionRequest.ts b/packages/client-ts/src/models/UserTelegramSourceConnectionRequest.ts new file mode 100644 index 0000000000..2c4548fbd7 --- /dev/null +++ b/packages/client-ts/src/models/UserTelegramSourceConnectionRequest.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * User source connection + * @export + * @interface UserTelegramSourceConnectionRequest + */ +export interface UserTelegramSourceConnectionRequest { + /** + * + * @type {number} + * @memberof UserTelegramSourceConnectionRequest + */ + user: number; + /** + * + * @type {string} + * @memberof UserTelegramSourceConnectionRequest + */ + source: string; + /** + * + * @type {string} + * @memberof UserTelegramSourceConnectionRequest + */ + identifier: string; +} + +/** + * Check if a given object implements the UserTelegramSourceConnectionRequest interface. + */ +export function instanceOfUserTelegramSourceConnectionRequest(value: object): value is UserTelegramSourceConnectionRequest { + if (!('user' in value) || value['user'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('identifier' in value) || value['identifier'] === undefined) return false; + return true; +} + +export function UserTelegramSourceConnectionRequestFromJSON(json: any): UserTelegramSourceConnectionRequest { + return UserTelegramSourceConnectionRequestFromJSONTyped(json, false); +} + +export function UserTelegramSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserTelegramSourceConnectionRequest { + if (json == null) { + return json; + } + return { + + 'user': json['user'], + 'source': json['source'], + 'identifier': json['identifier'], + }; +} + +export function UserTelegramSourceConnectionRequestToJSON(json: any): UserTelegramSourceConnectionRequest { + return UserTelegramSourceConnectionRequestToJSONTyped(json, false); +} + +export function UserTelegramSourceConnectionRequestToJSONTyped(value?: UserTelegramSourceConnectionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'source': value['source'], + 'identifier': value['identifier'], + }; +} + diff --git a/packages/client-ts/src/models/UserTypeEnum.ts b/packages/client-ts/src/models/UserTypeEnum.ts new file mode 100644 index 0000000000..f95c4ac464 --- /dev/null +++ b/packages/client-ts/src/models/UserTypeEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UserTypeEnum = { + Internal: 'internal', + External: 'external', + ServiceAccount: 'service_account', + InternalServiceAccount: 'internal_service_account', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UserTypeEnum = typeof UserTypeEnum[keyof typeof UserTypeEnum]; + + +export function instanceOfUserTypeEnum(value: any): boolean { + for (const key in UserTypeEnum) { + if (Object.prototype.hasOwnProperty.call(UserTypeEnum, key)) { + if (UserTypeEnum[key as keyof typeof UserTypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function UserTypeEnumFromJSON(json: any): UserTypeEnum { + return UserTypeEnumFromJSONTyped(json, false); +} + +export function UserTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserTypeEnum { + return json as UserTypeEnum; +} + +export function UserTypeEnumToJSON(value?: UserTypeEnum | null): any { + return value as any; +} + +export function UserTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UserTypeEnum { + return value as UserTypeEnum; +} + diff --git a/packages/client-ts/src/models/UserVerificationEnum.ts b/packages/client-ts/src/models/UserVerificationEnum.ts new file mode 100644 index 0000000000..00cfb61008 --- /dev/null +++ b/packages/client-ts/src/models/UserVerificationEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const UserVerificationEnum = { + Required: 'required', + Preferred: 'preferred', + Discouraged: 'discouraged', + UnknownDefaultOpenApi: '11184809' +} as const; +export type UserVerificationEnum = typeof UserVerificationEnum[keyof typeof UserVerificationEnum]; + + +export function instanceOfUserVerificationEnum(value: any): boolean { + for (const key in UserVerificationEnum) { + if (Object.prototype.hasOwnProperty.call(UserVerificationEnum, key)) { + if (UserVerificationEnum[key as keyof typeof UserVerificationEnum] === value) { + return true; + } + } + } + return false; +} + +export function UserVerificationEnumFromJSON(json: any): UserVerificationEnum { + return UserVerificationEnumFromJSONTyped(json, false); +} + +export function UserVerificationEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserVerificationEnum { + return json as UserVerificationEnum; +} + +export function UserVerificationEnumToJSON(value?: UserVerificationEnum | null): any { + return value as any; +} + +export function UserVerificationEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): UserVerificationEnum { + return value as UserVerificationEnum; +} + diff --git a/packages/client-ts/src/models/UserWriteStage.ts b/packages/client-ts/src/models/UserWriteStage.ts new file mode 100644 index 0000000000..f291cbbdfd --- /dev/null +++ b/packages/client-ts/src/models/UserWriteStage.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FlowSet } from './FlowSet'; +import { + FlowSetFromJSON, + FlowSetFromJSONTyped, + FlowSetToJSON, + FlowSetToJSONTyped, +} from './FlowSet'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; +import type { UserCreationModeEnum } from './UserCreationModeEnum'; +import { + UserCreationModeEnumFromJSON, + UserCreationModeEnumFromJSONTyped, + UserCreationModeEnumToJSON, + UserCreationModeEnumToJSONTyped, +} from './UserCreationModeEnum'; + +/** + * UserWriteStage Serializer + * @export + * @interface UserWriteStage + */ +export interface UserWriteStage { + /** + * + * @type {string} + * @memberof UserWriteStage + */ + readonly pk: string; + /** + * + * @type {string} + * @memberof UserWriteStage + */ + name: string; + /** + * Get object type so that we know how to edit the object + * @type {string} + * @memberof UserWriteStage + */ + readonly component: string; + /** + * Return object's verbose_name + * @type {string} + * @memberof UserWriteStage + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof UserWriteStage + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof UserWriteStage + */ + readonly metaModelName: string; + /** + * + * @type {Array} + * @memberof UserWriteStage + */ + readonly flowSet: Array; + /** + * + * @type {UserCreationModeEnum} + * @memberof UserWriteStage + */ + userCreationMode?: UserCreationModeEnum; + /** + * When set, newly created users are inactive and cannot login. + * @type {boolean} + * @memberof UserWriteStage + */ + createUsersAsInactive?: boolean; + /** + * Optionally add newly created users to this group. + * @type {string} + * @memberof UserWriteStage + */ + createUsersGroup?: string | null; + /** + * + * @type {UserTypeEnum} + * @memberof UserWriteStage + */ + userType?: UserTypeEnum; + /** + * + * @type {string} + * @memberof UserWriteStage + */ + userPathTemplate?: string; +} + + + +/** + * Check if a given object implements the UserWriteStage interface. + */ +export function instanceOfUserWriteStage(value: object): value is UserWriteStage { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('flowSet' in value) || value['flowSet'] === undefined) return false; + return true; +} + +export function UserWriteStageFromJSON(json: any): UserWriteStage { + return UserWriteStageFromJSONTyped(json, false); +} + +export function UserWriteStageFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserWriteStage { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'component': json['component'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'flowSet': ((json['flow_set'] as Array).map(FlowSetFromJSON)), + 'userCreationMode': json['user_creation_mode'] == null ? undefined : UserCreationModeEnumFromJSON(json['user_creation_mode']), + 'createUsersAsInactive': json['create_users_as_inactive'] == null ? undefined : json['create_users_as_inactive'], + 'createUsersGroup': json['create_users_group'] == null ? undefined : json['create_users_group'], + 'userType': json['user_type'] == null ? undefined : UserTypeEnumFromJSON(json['user_type']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + }; +} + +export function UserWriteStageToJSON(json: any): UserWriteStage { + return UserWriteStageToJSONTyped(json, false); +} + +export function UserWriteStageToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'user_creation_mode': UserCreationModeEnumToJSON(value['userCreationMode']), + 'create_users_as_inactive': value['createUsersAsInactive'], + 'create_users_group': value['createUsersGroup'], + 'user_type': UserTypeEnumToJSON(value['userType']), + 'user_path_template': value['userPathTemplate'], + }; +} + diff --git a/packages/client-ts/src/models/UserWriteStageRequest.ts b/packages/client-ts/src/models/UserWriteStageRequest.ts new file mode 100644 index 0000000000..903750b0b1 --- /dev/null +++ b/packages/client-ts/src/models/UserWriteStageRequest.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { UserTypeEnum } from './UserTypeEnum'; +import { + UserTypeEnumFromJSON, + UserTypeEnumFromJSONTyped, + UserTypeEnumToJSON, + UserTypeEnumToJSONTyped, +} from './UserTypeEnum'; +import type { UserCreationModeEnum } from './UserCreationModeEnum'; +import { + UserCreationModeEnumFromJSON, + UserCreationModeEnumFromJSONTyped, + UserCreationModeEnumToJSON, + UserCreationModeEnumToJSONTyped, +} from './UserCreationModeEnum'; + +/** + * UserWriteStage Serializer + * @export + * @interface UserWriteStageRequest + */ +export interface UserWriteStageRequest { + /** + * + * @type {string} + * @memberof UserWriteStageRequest + */ + name: string; + /** + * + * @type {UserCreationModeEnum} + * @memberof UserWriteStageRequest + */ + userCreationMode?: UserCreationModeEnum; + /** + * When set, newly created users are inactive and cannot login. + * @type {boolean} + * @memberof UserWriteStageRequest + */ + createUsersAsInactive?: boolean; + /** + * Optionally add newly created users to this group. + * @type {string} + * @memberof UserWriteStageRequest + */ + createUsersGroup?: string | null; + /** + * + * @type {UserTypeEnum} + * @memberof UserWriteStageRequest + */ + userType?: UserTypeEnum; + /** + * + * @type {string} + * @memberof UserWriteStageRequest + */ + userPathTemplate?: string; +} + + + +/** + * Check if a given object implements the UserWriteStageRequest interface. + */ +export function instanceOfUserWriteStageRequest(value: object): value is UserWriteStageRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function UserWriteStageRequestFromJSON(json: any): UserWriteStageRequest { + return UserWriteStageRequestFromJSONTyped(json, false); +} + +export function UserWriteStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserWriteStageRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'userCreationMode': json['user_creation_mode'] == null ? undefined : UserCreationModeEnumFromJSON(json['user_creation_mode']), + 'createUsersAsInactive': json['create_users_as_inactive'] == null ? undefined : json['create_users_as_inactive'], + 'createUsersGroup': json['create_users_group'] == null ? undefined : json['create_users_group'], + 'userType': json['user_type'] == null ? undefined : UserTypeEnumFromJSON(json['user_type']), + 'userPathTemplate': json['user_path_template'] == null ? undefined : json['user_path_template'], + }; +} + +export function UserWriteStageRequestToJSON(json: any): UserWriteStageRequest { + return UserWriteStageRequestToJSONTyped(json, false); +} + +export function UserWriteStageRequestToJSONTyped(value?: UserWriteStageRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'user_creation_mode': UserCreationModeEnumToJSON(value['userCreationMode']), + 'create_users_as_inactive': value['createUsersAsInactive'], + 'create_users_group': value['createUsersGroup'], + 'user_type': UserTypeEnumToJSON(value['userType']), + 'user_path_template': value['userPathTemplate'], + }; +} + diff --git a/packages/client-ts/src/models/ValidationError.ts b/packages/client-ts/src/models/ValidationError.ts new file mode 100644 index 0000000000..daf743093b --- /dev/null +++ b/packages/client-ts/src/models/ValidationError.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Validation Error + * @export + * @interface ValidationError + */ +export interface ValidationError { + [key: string]: any | any; + /** + * + * @type {Array} + * @memberof ValidationError + */ + nonFieldErrors?: Array; + /** + * + * @type {string} + * @memberof ValidationError + */ + code?: string; +} + +/** + * Check if a given object implements the ValidationError interface. + */ +export function instanceOfValidationError(value: object): value is ValidationError { + return true; +} + +export function ValidationErrorFromJSON(json: any): ValidationError { + return ValidationErrorFromJSONTyped(json, false); +} + +export function ValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationError { + if (json == null) { + return json; + } + return { + + ...json, + 'nonFieldErrors': json['non_field_errors'] == null ? undefined : json['non_field_errors'], + 'code': json['code'] == null ? undefined : json['code'], + }; +} + +export function ValidationErrorToJSON(json: any): ValidationError { + return ValidationErrorToJSONTyped(json, false); +} + +export function ValidationErrorToJSONTyped(value?: ValidationError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'non_field_errors': value['nonFieldErrors'], + 'code': value['code'], + }; +} + diff --git a/packages/client-ts/src/models/VendorEnum.ts b/packages/client-ts/src/models/VendorEnum.ts new file mode 100644 index 0000000000..33e9612c56 --- /dev/null +++ b/packages/client-ts/src/models/VendorEnum.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const VendorEnum = { + GoauthentikIoMerged: 'goauthentik.io/@merged', + GoauthentikIoPlatform: 'goauthentik.io/platform', + FleetdmCom: 'fleetdm.com', + ChromeGoogleCom: 'chrome.google.com', + UnknownDefaultOpenApi: '11184809' +} as const; +export type VendorEnum = typeof VendorEnum[keyof typeof VendorEnum]; + + +export function instanceOfVendorEnum(value: any): boolean { + for (const key in VendorEnum) { + if (Object.prototype.hasOwnProperty.call(VendorEnum, key)) { + if (VendorEnum[key as keyof typeof VendorEnum] === value) { + return true; + } + } + } + return false; +} + +export function VendorEnumFromJSON(json: any): VendorEnum { + return VendorEnumFromJSONTyped(json, false); +} + +export function VendorEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): VendorEnum { + return json as VendorEnum; +} + +export function VendorEnumToJSON(value?: VendorEnum | null): any { + return value as any; +} + +export function VendorEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): VendorEnum { + return value as VendorEnum; +} + diff --git a/packages/client-ts/src/models/Version.ts b/packages/client-ts/src/models/Version.ts new file mode 100644 index 0000000000..41c25246a3 --- /dev/null +++ b/packages/client-ts/src/models/Version.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Get running and latest version. + * @export + * @interface Version + */ +export interface Version { + /** + * Get current version + * @type {string} + * @memberof Version + */ + readonly versionCurrent: string; + /** + * Get latest version from cache + * @type {string} + * @memberof Version + */ + readonly versionLatest: string; + /** + * Check if latest version is valid + * @type {boolean} + * @memberof Version + */ + readonly versionLatestValid: boolean; + /** + * Get build hash, if version is not latest or released + * @type {string} + * @memberof Version + */ + readonly buildHash: string; + /** + * Check if we're running the latest version + * @type {boolean} + * @memberof Version + */ + readonly outdated: boolean; + /** + * Check if any outpost is outdated/has a version mismatch + * @type {boolean} + * @memberof Version + */ + readonly outpostOutdated: boolean; +} + +/** + * Check if a given object implements the Version interface. + */ +export function instanceOfVersion(value: object): value is Version { + if (!('versionCurrent' in value) || value['versionCurrent'] === undefined) return false; + if (!('versionLatest' in value) || value['versionLatest'] === undefined) return false; + if (!('versionLatestValid' in value) || value['versionLatestValid'] === undefined) return false; + if (!('buildHash' in value) || value['buildHash'] === undefined) return false; + if (!('outdated' in value) || value['outdated'] === undefined) return false; + if (!('outpostOutdated' in value) || value['outpostOutdated'] === undefined) return false; + return true; +} + +export function VersionFromJSON(json: any): Version { + return VersionFromJSONTyped(json, false); +} + +export function VersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Version { + if (json == null) { + return json; + } + return { + + 'versionCurrent': json['version_current'], + 'versionLatest': json['version_latest'], + 'versionLatestValid': json['version_latest_valid'], + 'buildHash': json['build_hash'], + 'outdated': json['outdated'], + 'outpostOutdated': json['outpost_outdated'], + }; +} + +export function VersionToJSON(json: any): Version { + return VersionToJSONTyped(json, false); +} + +export function VersionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/packages/client-ts/src/models/VersionHistory.ts b/packages/client-ts/src/models/VersionHistory.ts new file mode 100644 index 0000000000..b288145c0f --- /dev/null +++ b/packages/client-ts/src/models/VersionHistory.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * VersionHistory Serializer + * @export + * @interface VersionHistory + */ +export interface VersionHistory { + /** + * + * @type {number} + * @memberof VersionHistory + */ + readonly id: number; + /** + * + * @type {Date} + * @memberof VersionHistory + */ + timestamp: Date; + /** + * + * @type {string} + * @memberof VersionHistory + */ + version: string; + /** + * + * @type {string} + * @memberof VersionHistory + */ + build: string; +} + +/** + * Check if a given object implements the VersionHistory interface. + */ +export function instanceOfVersionHistory(value: object): value is VersionHistory { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('timestamp' in value) || value['timestamp'] === undefined) return false; + if (!('version' in value) || value['version'] === undefined) return false; + if (!('build' in value) || value['build'] === undefined) return false; + return true; +} + +export function VersionHistoryFromJSON(json: any): VersionHistory { + return VersionHistoryFromJSONTyped(json, false); +} + +export function VersionHistoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionHistory { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'timestamp': (new Date(json['timestamp'])), + 'version': json['version'], + 'build': json['build'], + }; +} + +export function VersionHistoryToJSON(json: any): VersionHistory { + return VersionHistoryToJSONTyped(json, false); +} + +export function VersionHistoryToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'timestamp': value['timestamp'].toISOString(), + 'version': value['version'], + 'build': value['build'], + }; +} + diff --git a/packages/client-ts/src/models/WSFederationProvider.ts b/packages/client-ts/src/models/WSFederationProvider.ts new file mode 100644 index 0000000000..b96bd37a7a --- /dev/null +++ b/packages/client-ts/src/models/WSFederationProvider.ts @@ -0,0 +1,326 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; + +/** + * WSFederationProvider Serializer + * @export + * @interface WSFederationProvider + */ +export interface WSFederationProvider { + /** + * + * @type {number} + * @memberof WSFederationProvider + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof WSFederationProvider + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof WSFederationProvider + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof WSFederationProvider + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof WSFederationProvider + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof WSFederationProvider + */ + propertyMappings?: Array; + /** + * Get object component so that we know how to edit the object + * @type {string} + * @memberof WSFederationProvider + */ + readonly component: string; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof WSFederationProvider + */ + readonly assignedApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof WSFederationProvider + */ + readonly assignedApplicationName: string | null; + /** + * Internal application name, used in URLs. + * @type {string} + * @memberof WSFederationProvider + */ + readonly assignedBackchannelApplicationSlug: string | null; + /** + * Application's display Name. + * @type {string} + * @memberof WSFederationProvider + */ + readonly assignedBackchannelApplicationName: string | null; + /** + * Return object's verbose_name + * @type {string} + * @memberof WSFederationProvider + */ + readonly verboseName: string; + /** + * Return object's plural verbose_name + * @type {string} + * @memberof WSFederationProvider + */ + readonly verboseNamePlural: string; + /** + * Return internal model name + * @type {string} + * @memberof WSFederationProvider + */ + readonly metaModelName: string; + /** + * + * @type {string} + * @memberof WSFederationProvider + */ + replyUrl: string; + /** + * + * @type {string} + * @memberof WSFederationProvider + */ + wtrealm: string; + /** + * Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + * @type {string} + * @memberof WSFederationProvider + */ + assertionValidNotBefore?: string; + /** + * Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof WSFederationProvider + */ + assertionValidNotOnOrAfter?: string; + /** + * Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof WSFederationProvider + */ + sessionValidNotOnOrAfter?: string; + /** + * Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + * @type {string} + * @memberof WSFederationProvider + */ + nameIdMapping?: string | null; + /** + * Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate. + * @type {string} + * @memberof WSFederationProvider + */ + authnContextClassRefMapping?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof WSFederationProvider + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof WSFederationProvider + */ + signatureAlgorithm?: SignatureAlgorithmEnum; + /** + * Keypair used to sign outgoing Responses going to the Service Provider. + * @type {string} + * @memberof WSFederationProvider + */ + signingKp?: string | null; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof WSFederationProvider + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof WSFederationProvider + */ + signAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof WSFederationProvider + */ + signLogoutRequest?: boolean; + /** + * + * @type {SAMLNameIDPolicyEnum} + * @memberof WSFederationProvider + */ + defaultNameIdPolicy?: SAMLNameIDPolicyEnum; + /** + * Get metadata download URL + * @type {string} + * @memberof WSFederationProvider + */ + readonly urlDownloadMetadata: string; + /** + * Get WS-Fed url + * @type {string} + * @memberof WSFederationProvider + */ + readonly urlWsfed: string; +} + + + +/** + * Check if a given object implements the WSFederationProvider interface. + */ +export function instanceOfWSFederationProvider(value: object): value is WSFederationProvider { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('component' in value) || value['component'] === undefined) return false; + if (!('assignedApplicationSlug' in value) || value['assignedApplicationSlug'] === undefined) return false; + if (!('assignedApplicationName' in value) || value['assignedApplicationName'] === undefined) return false; + if (!('assignedBackchannelApplicationSlug' in value) || value['assignedBackchannelApplicationSlug'] === undefined) return false; + if (!('assignedBackchannelApplicationName' in value) || value['assignedBackchannelApplicationName'] === undefined) return false; + if (!('verboseName' in value) || value['verboseName'] === undefined) return false; + if (!('verboseNamePlural' in value) || value['verboseNamePlural'] === undefined) return false; + if (!('metaModelName' in value) || value['metaModelName'] === undefined) return false; + if (!('replyUrl' in value) || value['replyUrl'] === undefined) return false; + if (!('wtrealm' in value) || value['wtrealm'] === undefined) return false; + if (!('urlDownloadMetadata' in value) || value['urlDownloadMetadata'] === undefined) return false; + if (!('urlWsfed' in value) || value['urlWsfed'] === undefined) return false; + return true; +} + +export function WSFederationProviderFromJSON(json: any): WSFederationProvider { + return WSFederationProviderFromJSONTyped(json, false); +} + +export function WSFederationProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): WSFederationProvider { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'component': json['component'], + 'assignedApplicationSlug': json['assigned_application_slug'], + 'assignedApplicationName': json['assigned_application_name'], + 'assignedBackchannelApplicationSlug': json['assigned_backchannel_application_slug'], + 'assignedBackchannelApplicationName': json['assigned_backchannel_application_name'], + 'verboseName': json['verbose_name'], + 'verboseNamePlural': json['verbose_name_plural'], + 'metaModelName': json['meta_model_name'], + 'replyUrl': json['reply_url'], + 'wtrealm': json['wtrealm'], + 'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'], + 'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'], + 'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'], + 'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'], + 'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'], + 'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'], + 'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['default_name_id_policy']), + 'urlDownloadMetadata': json['url_download_metadata'], + 'urlWsfed': json['url_wsfed'], + }; +} + +export function WSFederationProviderToJSON(json: any): WSFederationProvider { + return WSFederationProviderToJSONTyped(json, false); +} + +export function WSFederationProviderToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'reply_url': value['replyUrl'], + 'wtrealm': value['wtrealm'], + 'assertion_valid_not_before': value['assertionValidNotBefore'], + 'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'], + 'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'], + 'name_id_mapping': value['nameIdMapping'], + 'authn_context_class_ref_mapping': value['authnContextClassRefMapping'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'signing_kp': value['signingKp'], + 'encryption_kp': value['encryptionKp'], + 'sign_assertion': value['signAssertion'], + 'sign_logout_request': value['signLogoutRequest'], + 'default_name_id_policy': SAMLNameIDPolicyEnumToJSON(value['defaultNameIdPolicy']), + }; +} + diff --git a/packages/client-ts/src/models/WSFederationProviderRequest.ts b/packages/client-ts/src/models/WSFederationProviderRequest.ts new file mode 100644 index 0000000000..097bbda827 --- /dev/null +++ b/packages/client-ts/src/models/WSFederationProviderRequest.ts @@ -0,0 +1,238 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DigestAlgorithmEnum } from './DigestAlgorithmEnum'; +import { + DigestAlgorithmEnumFromJSON, + DigestAlgorithmEnumFromJSONTyped, + DigestAlgorithmEnumToJSON, + DigestAlgorithmEnumToJSONTyped, +} from './DigestAlgorithmEnum'; +import type { SignatureAlgorithmEnum } from './SignatureAlgorithmEnum'; +import { + SignatureAlgorithmEnumFromJSON, + SignatureAlgorithmEnumFromJSONTyped, + SignatureAlgorithmEnumToJSON, + SignatureAlgorithmEnumToJSONTyped, +} from './SignatureAlgorithmEnum'; +import type { SAMLNameIDPolicyEnum } from './SAMLNameIDPolicyEnum'; +import { + SAMLNameIDPolicyEnumFromJSON, + SAMLNameIDPolicyEnumFromJSONTyped, + SAMLNameIDPolicyEnumToJSON, + SAMLNameIDPolicyEnumToJSONTyped, +} from './SAMLNameIDPolicyEnum'; + +/** + * WSFederationProvider Serializer + * @export + * @interface WSFederationProviderRequest + */ +export interface WSFederationProviderRequest { + /** + * + * @type {string} + * @memberof WSFederationProviderRequest + */ + name: string; + /** + * Flow used for authentication when the associated application is accessed by an un-authenticated user. + * @type {string} + * @memberof WSFederationProviderRequest + */ + authenticationFlow?: string | null; + /** + * Flow used when authorizing this provider. + * @type {string} + * @memberof WSFederationProviderRequest + */ + authorizationFlow: string; + /** + * Flow used ending the session from a provider. + * @type {string} + * @memberof WSFederationProviderRequest + */ + invalidationFlow: string; + /** + * + * @type {Array} + * @memberof WSFederationProviderRequest + */ + propertyMappings?: Array; + /** + * + * @type {string} + * @memberof WSFederationProviderRequest + */ + replyUrl: string; + /** + * + * @type {string} + * @memberof WSFederationProviderRequest + */ + wtrealm: string; + /** + * Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3). + * @type {string} + * @memberof WSFederationProviderRequest + */ + assertionValidNotBefore?: string; + /** + * Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof WSFederationProviderRequest + */ + assertionValidNotOnOrAfter?: string; + /** + * Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3). + * @type {string} + * @memberof WSFederationProviderRequest + */ + sessionValidNotOnOrAfter?: string; + /** + * Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered + * @type {string} + * @memberof WSFederationProviderRequest + */ + nameIdMapping?: string | null; + /** + * Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate. + * @type {string} + * @memberof WSFederationProviderRequest + */ + authnContextClassRefMapping?: string | null; + /** + * + * @type {DigestAlgorithmEnum} + * @memberof WSFederationProviderRequest + */ + digestAlgorithm?: DigestAlgorithmEnum; + /** + * + * @type {SignatureAlgorithmEnum} + * @memberof WSFederationProviderRequest + */ + signatureAlgorithm?: SignatureAlgorithmEnum; + /** + * Keypair used to sign outgoing Responses going to the Service Provider. + * @type {string} + * @memberof WSFederationProviderRequest + */ + signingKp?: string | null; + /** + * When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key. + * @type {string} + * @memberof WSFederationProviderRequest + */ + encryptionKp?: string | null; + /** + * + * @type {boolean} + * @memberof WSFederationProviderRequest + */ + signAssertion?: boolean; + /** + * + * @type {boolean} + * @memberof WSFederationProviderRequest + */ + signLogoutRequest?: boolean; + /** + * + * @type {SAMLNameIDPolicyEnum} + * @memberof WSFederationProviderRequest + */ + defaultNameIdPolicy?: SAMLNameIDPolicyEnum; +} + + + +/** + * Check if a given object implements the WSFederationProviderRequest interface. + */ +export function instanceOfWSFederationProviderRequest(value: object): value is WSFederationProviderRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; + if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; + if (!('replyUrl' in value) || value['replyUrl'] === undefined) return false; + if (!('wtrealm' in value) || value['wtrealm'] === undefined) return false; + return true; +} + +export function WSFederationProviderRequestFromJSON(json: any): WSFederationProviderRequest { + return WSFederationProviderRequestFromJSONTyped(json, false); +} + +export function WSFederationProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WSFederationProviderRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], + 'authorizationFlow': json['authorization_flow'], + 'invalidationFlow': json['invalidation_flow'], + 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], + 'replyUrl': json['reply_url'], + 'wtrealm': json['wtrealm'], + 'assertionValidNotBefore': json['assertion_valid_not_before'] == null ? undefined : json['assertion_valid_not_before'], + 'assertionValidNotOnOrAfter': json['assertion_valid_not_on_or_after'] == null ? undefined : json['assertion_valid_not_on_or_after'], + 'sessionValidNotOnOrAfter': json['session_valid_not_on_or_after'] == null ? undefined : json['session_valid_not_on_or_after'], + 'nameIdMapping': json['name_id_mapping'] == null ? undefined : json['name_id_mapping'], + 'authnContextClassRefMapping': json['authn_context_class_ref_mapping'] == null ? undefined : json['authn_context_class_ref_mapping'], + 'digestAlgorithm': json['digest_algorithm'] == null ? undefined : DigestAlgorithmEnumFromJSON(json['digest_algorithm']), + 'signatureAlgorithm': json['signature_algorithm'] == null ? undefined : SignatureAlgorithmEnumFromJSON(json['signature_algorithm']), + 'signingKp': json['signing_kp'] == null ? undefined : json['signing_kp'], + 'encryptionKp': json['encryption_kp'] == null ? undefined : json['encryption_kp'], + 'signAssertion': json['sign_assertion'] == null ? undefined : json['sign_assertion'], + 'signLogoutRequest': json['sign_logout_request'] == null ? undefined : json['sign_logout_request'], + 'defaultNameIdPolicy': json['default_name_id_policy'] == null ? undefined : SAMLNameIDPolicyEnumFromJSON(json['default_name_id_policy']), + }; +} + +export function WSFederationProviderRequestToJSON(json: any): WSFederationProviderRequest { + return WSFederationProviderRequestToJSONTyped(json, false); +} + +export function WSFederationProviderRequestToJSONTyped(value?: WSFederationProviderRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'authentication_flow': value['authenticationFlow'], + 'authorization_flow': value['authorizationFlow'], + 'invalidation_flow': value['invalidationFlow'], + 'property_mappings': value['propertyMappings'], + 'reply_url': value['replyUrl'], + 'wtrealm': value['wtrealm'], + 'assertion_valid_not_before': value['assertionValidNotBefore'], + 'assertion_valid_not_on_or_after': value['assertionValidNotOnOrAfter'], + 'session_valid_not_on_or_after': value['sessionValidNotOnOrAfter'], + 'name_id_mapping': value['nameIdMapping'], + 'authn_context_class_ref_mapping': value['authnContextClassRefMapping'], + 'digest_algorithm': DigestAlgorithmEnumToJSON(value['digestAlgorithm']), + 'signature_algorithm': SignatureAlgorithmEnumToJSON(value['signatureAlgorithm']), + 'signing_kp': value['signingKp'], + 'encryption_kp': value['encryptionKp'], + 'sign_assertion': value['signAssertion'], + 'sign_logout_request': value['signLogoutRequest'], + 'default_name_id_policy': SAMLNameIDPolicyEnumToJSON(value['defaultNameIdPolicy']), + }; +} + diff --git a/packages/client-ts/src/models/WebAuthnDevice.ts b/packages/client-ts/src/models/WebAuthnDevice.ts new file mode 100644 index 0000000000..6d330f1e9d --- /dev/null +++ b/packages/client-ts/src/models/WebAuthnDevice.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PartialUser } from './PartialUser'; +import { + PartialUserFromJSON, + PartialUserFromJSONTyped, + PartialUserToJSON, + PartialUserToJSONTyped, +} from './PartialUser'; +import type { WebAuthnDeviceType } from './WebAuthnDeviceType'; +import { + WebAuthnDeviceTypeFromJSON, + WebAuthnDeviceTypeFromJSONTyped, + WebAuthnDeviceTypeToJSON, + WebAuthnDeviceTypeToJSONTyped, +} from './WebAuthnDeviceType'; + +/** + * Serializer for WebAuthn authenticator devices + * @export + * @interface WebAuthnDevice + */ +export interface WebAuthnDevice { + /** + * + * @type {number} + * @memberof WebAuthnDevice + */ + readonly pk: number; + /** + * + * @type {string} + * @memberof WebAuthnDevice + */ + name: string; + /** + * + * @type {Date} + * @memberof WebAuthnDevice + */ + readonly createdOn: Date; + /** + * + * @type {WebAuthnDeviceType} + * @memberof WebAuthnDevice + */ + readonly deviceType: WebAuthnDeviceType | null; + /** + * + * @type {string} + * @memberof WebAuthnDevice + */ + readonly aaguid: string; + /** + * + * @type {PartialUser} + * @memberof WebAuthnDevice + */ + readonly user: PartialUser; +} + +/** + * Check if a given object implements the WebAuthnDevice interface. + */ +export function instanceOfWebAuthnDevice(value: object): value is WebAuthnDevice { + if (!('pk' in value) || value['pk'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('createdOn' in value) || value['createdOn'] === undefined) return false; + if (!('deviceType' in value) || value['deviceType'] === undefined) return false; + if (!('aaguid' in value) || value['aaguid'] === undefined) return false; + if (!('user' in value) || value['user'] === undefined) return false; + return true; +} + +export function WebAuthnDeviceFromJSON(json: any): WebAuthnDevice { + return WebAuthnDeviceFromJSONTyped(json, false); +} + +export function WebAuthnDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebAuthnDevice { + if (json == null) { + return json; + } + return { + + 'pk': json['pk'], + 'name': json['name'], + 'createdOn': (new Date(json['created_on'])), + 'deviceType': WebAuthnDeviceTypeFromJSON(json['device_type']), + 'aaguid': json['aaguid'], + 'user': PartialUserFromJSON(json['user']), + }; +} + +export function WebAuthnDeviceToJSON(json: any): WebAuthnDevice { + return WebAuthnDeviceToJSONTyped(json, false); +} + +export function WebAuthnDeviceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/WebAuthnDeviceRequest.ts b/packages/client-ts/src/models/WebAuthnDeviceRequest.ts new file mode 100644 index 0000000000..8dbf97c3c5 --- /dev/null +++ b/packages/client-ts/src/models/WebAuthnDeviceRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Serializer for WebAuthn authenticator devices + * @export + * @interface WebAuthnDeviceRequest + */ +export interface WebAuthnDeviceRequest { + /** + * + * @type {string} + * @memberof WebAuthnDeviceRequest + */ + name: string; +} + +/** + * Check if a given object implements the WebAuthnDeviceRequest interface. + */ +export function instanceOfWebAuthnDeviceRequest(value: object): value is WebAuthnDeviceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; +} + +export function WebAuthnDeviceRequestFromJSON(json: any): WebAuthnDeviceRequest { + return WebAuthnDeviceRequestFromJSONTyped(json, false); +} + +export function WebAuthnDeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebAuthnDeviceRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function WebAuthnDeviceRequestToJSON(json: any): WebAuthnDeviceRequest { + return WebAuthnDeviceRequestToJSONTyped(json, false); +} + +export function WebAuthnDeviceRequestToJSONTyped(value?: WebAuthnDeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + }; +} + diff --git a/packages/client-ts/src/models/WebAuthnDeviceType.ts b/packages/client-ts/src/models/WebAuthnDeviceType.ts new file mode 100644 index 0000000000..ee9fa7e23a --- /dev/null +++ b/packages/client-ts/src/models/WebAuthnDeviceType.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * WebAuthnDeviceType Serializer + * @export + * @interface WebAuthnDeviceType + */ +export interface WebAuthnDeviceType { + /** + * + * @type {string} + * @memberof WebAuthnDeviceType + */ + aaguid: string; + /** + * + * @type {string} + * @memberof WebAuthnDeviceType + */ + description: string; +} + +/** + * Check if a given object implements the WebAuthnDeviceType interface. + */ +export function instanceOfWebAuthnDeviceType(value: object): value is WebAuthnDeviceType { + if (!('aaguid' in value) || value['aaguid'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + return true; +} + +export function WebAuthnDeviceTypeFromJSON(json: any): WebAuthnDeviceType { + return WebAuthnDeviceTypeFromJSONTyped(json, false); +} + +export function WebAuthnDeviceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebAuthnDeviceType { + if (json == null) { + return json; + } + return { + + 'aaguid': json['aaguid'], + 'description': json['description'], + }; +} + +export function WebAuthnDeviceTypeToJSON(json: any): WebAuthnDeviceType { + return WebAuthnDeviceTypeToJSONTyped(json, false); +} + +export function WebAuthnDeviceTypeToJSONTyped(value?: WebAuthnDeviceType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'aaguid': value['aaguid'], + 'description': value['description'], + }; +} + diff --git a/packages/client-ts/src/models/WebAuthnHintEnum.ts b/packages/client-ts/src/models/WebAuthnHintEnum.ts new file mode 100644 index 0000000000..d360d3c769 --- /dev/null +++ b/packages/client-ts/src/models/WebAuthnHintEnum.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const WebAuthnHintEnum = { + SecurityKey: 'security-key', + ClientDevice: 'client-device', + Hybrid: 'hybrid', + UnknownDefaultOpenApi: '11184809' +} as const; +export type WebAuthnHintEnum = typeof WebAuthnHintEnum[keyof typeof WebAuthnHintEnum]; + + +export function instanceOfWebAuthnHintEnum(value: any): boolean { + for (const key in WebAuthnHintEnum) { + if (Object.prototype.hasOwnProperty.call(WebAuthnHintEnum, key)) { + if (WebAuthnHintEnum[key as keyof typeof WebAuthnHintEnum] === value) { + return true; + } + } + } + return false; +} + +export function WebAuthnHintEnumFromJSON(json: any): WebAuthnHintEnum { + return WebAuthnHintEnumFromJSONTyped(json, false); +} + +export function WebAuthnHintEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebAuthnHintEnum { + return json as WebAuthnHintEnum; +} + +export function WebAuthnHintEnumToJSON(value?: WebAuthnHintEnum | null): any { + return value as any; +} + +export function WebAuthnHintEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): WebAuthnHintEnum { + return value as WebAuthnHintEnum; +} + diff --git a/packages/client-ts/src/models/Worker.ts b/packages/client-ts/src/models/Worker.ts new file mode 100644 index 0000000000..55b638986e --- /dev/null +++ b/packages/client-ts/src/models/Worker.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Worker + */ +export interface Worker { + /** + * + * @type {string} + * @memberof Worker + */ + workerId: string; + /** + * + * @type {string} + * @memberof Worker + */ + version: string; + /** + * + * @type {boolean} + * @memberof Worker + */ + versionMatching: boolean; +} + +/** + * Check if a given object implements the Worker interface. + */ +export function instanceOfWorker(value: object): value is Worker { + if (!('workerId' in value) || value['workerId'] === undefined) return false; + if (!('version' in value) || value['version'] === undefined) return false; + if (!('versionMatching' in value) || value['versionMatching'] === undefined) return false; + return true; +} + +export function WorkerFromJSON(json: any): Worker { + return WorkerFromJSONTyped(json, false); +} + +export function WorkerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Worker { + if (json == null) { + return json; + } + return { + + 'workerId': json['worker_id'], + 'version': json['version'], + 'versionMatching': json['version_matching'], + }; +} + +export function WorkerToJSON(json: any): Worker { + return WorkerToJSONTyped(json, false); +} + +export function WorkerToJSONTyped(value?: Worker | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'worker_id': value['workerId'], + 'version': value['version'], + 'version_matching': value['versionMatching'], + }; +} + diff --git a/packages/client-ts/src/models/index.ts b/packages/client-ts/src/models/index.ts new file mode 100644 index 0000000000..955447a666 --- /dev/null +++ b/packages/client-ts/src/models/index.ts @@ -0,0 +1,865 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AccessDeniedChallenge'; +export * from './AgentAuthenticationResponse'; +export * from './AgentConfig'; +export * from './AgentConnector'; +export * from './AgentConnectorRequest'; +export * from './AgentPSSODeviceRegistrationRequest'; +export * from './AgentPSSODeviceRegistrationResponse'; +export * from './AgentPSSOUserRegistrationRequest'; +export * from './AgentTokenResponse'; +export * from './AlgEnum'; +export * from './App'; +export * from './AppEnum'; +export * from './AppleChallengeResponseRequest'; +export * from './AppleLoginChallenge'; +export * from './Application'; +export * from './ApplicationEntitlement'; +export * from './ApplicationEntitlementRequest'; +export * from './ApplicationRequest'; +export * from './AuthTypeEnum'; +export * from './AuthenticatedSession'; +export * from './AuthenticatedSessionAsn'; +export * from './AuthenticatedSessionGeoIp'; +export * from './AuthenticatedSessionUserAgent'; +export * from './AuthenticatedSessionUserAgentDevice'; +export * from './AuthenticatedSessionUserAgentOs'; +export * from './AuthenticatedSessionUserAgentUserAgent'; +export * from './AuthenticationEnum'; +export * from './AuthenticatorAttachmentEnum'; +export * from './AuthenticatorDuoChallenge'; +export * from './AuthenticatorDuoChallengeResponseRequest'; +export * from './AuthenticatorDuoStage'; +export * from './AuthenticatorDuoStageDeviceImportResponse'; +export * from './AuthenticatorDuoStageManualDeviceImportRequest'; +export * from './AuthenticatorDuoStageRequest'; +export * from './AuthenticatorEmailChallenge'; +export * from './AuthenticatorEmailChallengeResponseRequest'; +export * from './AuthenticatorEmailStage'; +export * from './AuthenticatorEmailStageRequest'; +export * from './AuthenticatorEndpointGDTCStage'; +export * from './AuthenticatorEndpointGDTCStageRequest'; +export * from './AuthenticatorSMSChallenge'; +export * from './AuthenticatorSMSChallengeResponseRequest'; +export * from './AuthenticatorSMSStage'; +export * from './AuthenticatorSMSStageRequest'; +export * from './AuthenticatorStaticChallenge'; +export * from './AuthenticatorStaticChallengeResponseRequest'; +export * from './AuthenticatorStaticStage'; +export * from './AuthenticatorStaticStageRequest'; +export * from './AuthenticatorTOTPChallenge'; +export * from './AuthenticatorTOTPChallengeResponseRequest'; +export * from './AuthenticatorTOTPStage'; +export * from './AuthenticatorTOTPStageRequest'; +export * from './AuthenticatorValidateStage'; +export * from './AuthenticatorValidateStageRequest'; +export * from './AuthenticatorValidationChallenge'; +export * from './AuthenticatorValidationChallengeResponseRequest'; +export * from './AuthenticatorWebAuthnChallenge'; +export * from './AuthenticatorWebAuthnChallengeResponseRequest'; +export * from './AuthenticatorWebAuthnStage'; +export * from './AuthenticatorWebAuthnStageRequest'; +export * from './AuthorizationCodeAuthMethodEnum'; +export * from './AutoSubmitChallengeResponseRequest'; +export * from './AutosubmitChallenge'; +export * from './BackendsEnum'; +export * from './BindingTypeEnum'; +export * from './BlueprintFile'; +export * from './BlueprintInstance'; +export * from './BlueprintInstanceRequest'; +export * from './BlueprintInstanceStatusEnum'; +export * from './Brand'; +export * from './BrandRequest'; +export * from './BulkDeleteSessionResponse'; +export * from './Cache'; +export * from './CapabilitiesEnum'; +export * from './CaptchaChallenge'; +export * from './CaptchaChallengeResponseRequest'; +export * from './CaptchaStage'; +export * from './CaptchaStageRequest'; +export * from './CertAttributeEnum'; +export * from './CertificateData'; +export * from './CertificateGenerationRequest'; +export * from './CertificateKeyPair'; +export * from './CertificateKeyPairRequest'; +export * from './ChallengeTypes'; +export * from './ClientTypeEnum'; +export * from './CompatibilityModeEnum'; +export * from './Config'; +export * from './ConnectionToken'; +export * from './ConnectionTokenRequest'; +export * from './Connector'; +export * from './ConsentChallenge'; +export * from './ConsentChallengeResponseRequest'; +export * from './ConsentPermission'; +export * from './ConsentStage'; +export * from './ConsentStageModeEnum'; +export * from './ConsentStageRequest'; +export * from './ContentType'; +export * from './ContentTypeEnum'; +export * from './ContextualFlowInfo'; +export * from './ContextualFlowInfoLayoutEnum'; +export * from './CountryCodeEnum'; +export * from './CurrentBrand'; +export * from './CurrentBrandFlags'; +export * from './DataExport'; +export * from './DeliveryMethodEnum'; +export * from './DeniedActionEnum'; +export * from './DenyStage'; +export * from './DenyStageRequest'; +export * from './DetailedCountry'; +export * from './Device'; +export * from './DeviceAccessGroup'; +export * from './DeviceAccessGroupRequest'; +export * from './DeviceChallenge'; +export * from './DeviceChallengeRequest'; +export * from './DeviceClassesEnum'; +export * from './DeviceConnection'; +export * from './DeviceFactSnapshot'; +export * from './DeviceFacts'; +export * from './DeviceFactsOSFamily'; +export * from './DeviceFactsRequest'; +export * from './DeviceGroup'; +export * from './DeviceGroupRequest'; +export * from './DeviceSummary'; +export * from './DeviceUser'; +export * from './DeviceUserBinding'; +export * from './DeviceUserBindingRequest'; +export * from './DeviceUserRequest'; +export * from './DigestAlgorithmEnum'; +export * from './DigitsEnum'; +export * from './Disk'; +export * from './DiskRequest'; +export * from './DockerServiceConnection'; +export * from './DockerServiceConnectionRequest'; +export * from './Domain'; +export * from './DomainRequest'; +export * from './DummyChallenge'; +export * from './DummyChallengeResponseRequest'; +export * from './DummyPolicy'; +export * from './DummyPolicyRequest'; +export * from './DummyStage'; +export * from './DummyStageRequest'; +export * from './DuoDevice'; +export * from './DuoDeviceEnrollmentStatus'; +export * from './DuoDeviceRequest'; +export * from './DuoResponseEnum'; +export * from './EmailChallenge'; +export * from './EmailChallengeResponseRequest'; +export * from './EmailDevice'; +export * from './EmailDeviceRequest'; +export * from './EmailStage'; +export * from './EmailStageRequest'; +export * from './Endpoint'; +export * from './EndpointAgentChallenge'; +export * from './EndpointAgentChallengeResponseRequest'; +export * from './EndpointAuthModeEnum'; +export * from './EndpointDevice'; +export * from './EndpointDeviceDetails'; +export * from './EndpointDeviceRequest'; +export * from './EndpointRequest'; +export * from './EndpointStage'; +export * from './EndpointStageRequest'; +export * from './EnrollRequest'; +export * from './EnrollmentToken'; +export * from './EnrollmentTokenRequest'; +export * from './ErrorDetail'; +export * from './ErrorReportingConfig'; +export * from './Event'; +export * from './EventActions'; +export * from './EventMatcherPolicy'; +export * from './EventMatcherPolicyRequest'; +export * from './EventRequest'; +export * from './EventTopPerUser'; +export * from './EventVolume'; +export * from './EventsRequestedEnum'; +export * from './ExpiringBaseGrantModel'; +export * from './ExpressionPolicy'; +export * from './ExpressionPolicyRequest'; +export * from './ExtraRoleObjectPermission'; +export * from './FileList'; +export * from './FleetConnector'; +export * from './FleetConnectorRequest'; +export * from './Flow'; +export * from './FlowChallengeResponseRequest'; +export * from './FlowDesignationEnum'; +export * from './FlowDiagram'; +export * from './FlowErrorChallenge'; +export * from './FlowImportResult'; +export * from './FlowInspection'; +export * from './FlowInspectorPlan'; +export * from './FlowLayoutEnum'; +export * from './FlowRequest'; +export * from './FlowSet'; +export * from './FlowStageBinding'; +export * from './FlowStageBindingRequest'; +export * from './FooterLink'; +export * from './FrameChallenge'; +export * from './FrameChallengeResponseRequest'; +export * from './GenericError'; +export * from './GeoIPPolicy'; +export * from './GeoIPPolicyCountriesObjInner'; +export * from './GeoIPPolicyRequest'; +export * from './GeoipBindingEnum'; +export * from './GlobalTaskStatus'; +export * from './GoogleChromeConnector'; +export * from './GoogleChromeConnectorRequest'; +export * from './GoogleEndpointDevice'; +export * from './GoogleEndpointDeviceRequest'; +export * from './GoogleWorkspaceProvider'; +export * from './GoogleWorkspaceProviderGroup'; +export * from './GoogleWorkspaceProviderGroupRequest'; +export * from './GoogleWorkspaceProviderMapping'; +export * from './GoogleWorkspaceProviderMappingRequest'; +export * from './GoogleWorkspaceProviderRequest'; +export * from './GoogleWorkspaceProviderUser'; +export * from './GoogleWorkspaceProviderUserRequest'; +export * from './Group'; +export * from './GroupKerberosSourceConnection'; +export * from './GroupKerberosSourceConnectionRequest'; +export * from './GroupLDAPSourceConnection'; +export * from './GroupLDAPSourceConnectionRequest'; +export * from './GroupMatchingModeEnum'; +export * from './GroupOAuthSourceConnection'; +export * from './GroupOAuthSourceConnectionRequest'; +export * from './GroupPlexSourceConnection'; +export * from './GroupPlexSourceConnectionRequest'; +export * from './GroupRequest'; +export * from './GroupSAMLSourceConnection'; +export * from './GroupSAMLSourceConnectionRequest'; +export * from './GroupSourceConnection'; +export * from './GroupSourceConnectionRequest'; +export * from './GroupTelegramSourceConnection'; +export * from './GroupTelegramSourceConnectionRequest'; +export * from './Hardware'; +export * from './HardwareRequest'; +export * from './IdentificationChallenge'; +export * from './IdentificationChallengeResponseRequest'; +export * from './IdentificationStage'; +export * from './IdentificationStageRequest'; +export * from './IframeLogoutChallenge'; +export * from './IframeLogoutChallengeResponseRequest'; +export * from './ImpersonationRequest'; +export * from './InitialPermissions'; +export * from './InitialPermissionsRequest'; +export * from './InstallID'; +export * from './IntentEnum'; +export * from './InvalidResponseActionEnum'; +export * from './Invitation'; +export * from './InvitationRequest'; +export * from './InvitationSendEmailRequest'; +export * from './InvitationStage'; +export * from './InvitationStageRequest'; +export * from './IssuerModeEnum'; +export * from './KadminTypeEnum'; +export * from './KerberosSource'; +export * from './KerberosSourcePropertyMapping'; +export * from './KerberosSourcePropertyMappingRequest'; +export * from './KerberosSourceRequest'; +export * from './KeyTypeEnum'; +export * from './KubernetesServiceConnection'; +export * from './KubernetesServiceConnectionRequest'; +export * from './LDAPAPIAccessMode'; +export * from './LDAPCheckAccess'; +export * from './LDAPDebug'; +export * from './LDAPOutpostConfig'; +export * from './LDAPProvider'; +export * from './LDAPProviderRequest'; +export * from './LDAPSource'; +export * from './LDAPSourcePropertyMapping'; +export * from './LDAPSourcePropertyMappingRequest'; +export * from './LDAPSourceRequest'; +export * from './LastTaskStatusEnum'; +export * from './License'; +export * from './LicenseFlagsEnum'; +export * from './LicenseForecast'; +export * from './LicenseRequest'; +export * from './LicenseStatusEnum'; +export * from './LicenseSummary'; +export * from './LicenseSummaryStatusEnum'; +export * from './LifecycleIteration'; +export * from './LifecycleIterationRequest'; +export * from './LifecycleIterationStateEnum'; +export * from './LifecycleRule'; +export * from './LifecycleRuleRequest'; +export * from './Link'; +export * from './LogEvent'; +export * from './LogLevelEnum'; +export * from './LoginChallengeTypes'; +export * from './LoginSource'; +export * from './LogoutURL'; +export * from './MDMConfigRequest'; +export * from './MDMConfigResponse'; +export * from './MatchingModeEnum'; +export * from './Metadata'; +export * from './MicrosoftEntraProvider'; +export * from './MicrosoftEntraProviderGroup'; +export * from './MicrosoftEntraProviderGroupRequest'; +export * from './MicrosoftEntraProviderMapping'; +export * from './MicrosoftEntraProviderMappingRequest'; +export * from './MicrosoftEntraProviderRequest'; +export * from './MicrosoftEntraProviderUser'; +export * from './MicrosoftEntraProviderUserRequest'; +export * from './ModelEnum'; +export * from './ModelRequest'; +export * from './MutualTLSStage'; +export * from './MutualTLSStageRequest'; +export * from './NativeLogoutChallenge'; +export * from './NativeLogoutChallengeResponseRequest'; +export * from './Network'; +export * from './NetworkBindingEnum'; +export * from './NetworkInterface'; +export * from './NetworkInterfaceRequest'; +export * from './NetworkRequest'; +export * from './NotConfiguredActionEnum'; +export * from './Notification'; +export * from './NotificationRequest'; +export * from './NotificationRule'; +export * from './NotificationRuleRequest'; +export * from './NotificationTransport'; +export * from './NotificationTransportModeEnum'; +export * from './NotificationTransportRequest'; +export * from './NotificationTransportTest'; +export * from './NotificationWebhookMapping'; +export * from './NotificationWebhookMappingRequest'; +export * from './OAuth2Provider'; +export * from './OAuth2ProviderLogoutMethodEnum'; +export * from './OAuth2ProviderRequest'; +export * from './OAuth2ProviderSetupURLs'; +export * from './OAuthDeviceCodeChallenge'; +export * from './OAuthDeviceCodeChallengeResponseRequest'; +export * from './OAuthDeviceCodeFinishChallenge'; +export * from './OAuthDeviceCodeFinishChallengeResponseRequest'; +export * from './OAuthSource'; +export * from './OAuthSourcePropertyMapping'; +export * from './OAuthSourcePropertyMappingRequest'; +export * from './OAuthSourceRequest'; +export * from './OpenIDConnectConfiguration'; +export * from './OperatingSystem'; +export * from './OperatingSystemRequest'; +export * from './OutgoingSyncDeleteAction'; +export * from './Outpost'; +export * from './OutpostDefaultConfig'; +export * from './OutpostHealth'; +export * from './OutpostRequest'; +export * from './OutpostTypeEnum'; +export * from './PKCEMethodEnum'; +export * from './PaginatedAgentConnectorList'; +export * from './PaginatedApplicationEntitlementList'; +export * from './PaginatedApplicationList'; +export * from './PaginatedAuthenticatedSessionList'; +export * from './PaginatedAuthenticatorDuoStageList'; +export * from './PaginatedAuthenticatorEmailStageList'; +export * from './PaginatedAuthenticatorEndpointGDTCStageList'; +export * from './PaginatedAuthenticatorSMSStageList'; +export * from './PaginatedAuthenticatorStaticStageList'; +export * from './PaginatedAuthenticatorTOTPStageList'; +export * from './PaginatedAuthenticatorValidateStageList'; +export * from './PaginatedAuthenticatorWebAuthnStageList'; +export * from './PaginatedBlueprintInstanceList'; +export * from './PaginatedBrandList'; +export * from './PaginatedCaptchaStageList'; +export * from './PaginatedCertificateKeyPairList'; +export * from './PaginatedConnectionTokenList'; +export * from './PaginatedConnectorList'; +export * from './PaginatedConsentStageList'; +export * from './PaginatedDataExportList'; +export * from './PaginatedDenyStageList'; +export * from './PaginatedDeviceAccessGroupList'; +export * from './PaginatedDeviceUserBindingList'; +export * from './PaginatedDockerServiceConnectionList'; +export * from './PaginatedDomainList'; +export * from './PaginatedDummyPolicyList'; +export * from './PaginatedDummyStageList'; +export * from './PaginatedDuoDeviceList'; +export * from './PaginatedEmailDeviceList'; +export * from './PaginatedEmailStageList'; +export * from './PaginatedEndpointDeviceList'; +export * from './PaginatedEndpointList'; +export * from './PaginatedEndpointStageList'; +export * from './PaginatedEnrollmentTokenList'; +export * from './PaginatedEventList'; +export * from './PaginatedEventMatcherPolicyList'; +export * from './PaginatedExpiringBaseGrantModelList'; +export * from './PaginatedExpressionPolicyList'; +export * from './PaginatedExtraRoleObjectPermissionList'; +export * from './PaginatedFleetConnectorList'; +export * from './PaginatedFlowList'; +export * from './PaginatedFlowStageBindingList'; +export * from './PaginatedGeoIPPolicyList'; +export * from './PaginatedGoogleChromeConnectorList'; +export * from './PaginatedGoogleEndpointDeviceList'; +export * from './PaginatedGoogleWorkspaceProviderGroupList'; +export * from './PaginatedGoogleWorkspaceProviderList'; +export * from './PaginatedGoogleWorkspaceProviderMappingList'; +export * from './PaginatedGoogleWorkspaceProviderUserList'; +export * from './PaginatedGroupKerberosSourceConnectionList'; +export * from './PaginatedGroupLDAPSourceConnectionList'; +export * from './PaginatedGroupList'; +export * from './PaginatedGroupOAuthSourceConnectionList'; +export * from './PaginatedGroupPlexSourceConnectionList'; +export * from './PaginatedGroupSAMLSourceConnectionList'; +export * from './PaginatedGroupSourceConnectionList'; +export * from './PaginatedGroupTelegramSourceConnectionList'; +export * from './PaginatedIdentificationStageList'; +export * from './PaginatedInitialPermissionsList'; +export * from './PaginatedInvitationList'; +export * from './PaginatedInvitationStageList'; +export * from './PaginatedKerberosSourceList'; +export * from './PaginatedKerberosSourcePropertyMappingList'; +export * from './PaginatedKubernetesServiceConnectionList'; +export * from './PaginatedLDAPOutpostConfigList'; +export * from './PaginatedLDAPProviderList'; +export * from './PaginatedLDAPSourceList'; +export * from './PaginatedLDAPSourcePropertyMappingList'; +export * from './PaginatedLicenseList'; +export * from './PaginatedLifecycleIterationList'; +export * from './PaginatedLifecycleRuleList'; +export * from './PaginatedMicrosoftEntraProviderGroupList'; +export * from './PaginatedMicrosoftEntraProviderList'; +export * from './PaginatedMicrosoftEntraProviderMappingList'; +export * from './PaginatedMicrosoftEntraProviderUserList'; +export * from './PaginatedMutualTLSStageList'; +export * from './PaginatedNotificationList'; +export * from './PaginatedNotificationRuleList'; +export * from './PaginatedNotificationTransportList'; +export * from './PaginatedNotificationWebhookMappingList'; +export * from './PaginatedOAuth2ProviderList'; +export * from './PaginatedOAuthSourceList'; +export * from './PaginatedOAuthSourcePropertyMappingList'; +export * from './PaginatedOutpostList'; +export * from './PaginatedPasswordExpiryPolicyList'; +export * from './PaginatedPasswordPolicyList'; +export * from './PaginatedPasswordStageList'; +export * from './PaginatedPermissionList'; +export * from './PaginatedPlexSourceList'; +export * from './PaginatedPlexSourcePropertyMappingList'; +export * from './PaginatedPolicyBindingList'; +export * from './PaginatedPolicyList'; +export * from './PaginatedPromptList'; +export * from './PaginatedPromptStageList'; +export * from './PaginatedPropertyMappingList'; +export * from './PaginatedProviderList'; +export * from './PaginatedProxyOutpostConfigList'; +export * from './PaginatedProxyProviderList'; +export * from './PaginatedRACPropertyMappingList'; +export * from './PaginatedRACProviderList'; +export * from './PaginatedRadiusOutpostConfigList'; +export * from './PaginatedRadiusProviderList'; +export * from './PaginatedRadiusProviderPropertyMappingList'; +export * from './PaginatedRedirectStageList'; +export * from './PaginatedReputationList'; +export * from './PaginatedReputationPolicyList'; +export * from './PaginatedRoleAssignedObjectPermissionList'; +export * from './PaginatedRoleList'; +export * from './PaginatedSAMLPropertyMappingList'; +export * from './PaginatedSAMLProviderList'; +export * from './PaginatedSAMLSourceList'; +export * from './PaginatedSAMLSourcePropertyMappingList'; +export * from './PaginatedSCIMMappingList'; +export * from './PaginatedSCIMProviderGroupList'; +export * from './PaginatedSCIMProviderList'; +export * from './PaginatedSCIMProviderUserList'; +export * from './PaginatedSCIMSourceGroupList'; +export * from './PaginatedSCIMSourceList'; +export * from './PaginatedSCIMSourcePropertyMappingList'; +export * from './PaginatedSCIMSourceUserList'; +export * from './PaginatedSMSDeviceList'; +export * from './PaginatedSSFProviderList'; +export * from './PaginatedSSFStreamList'; +export * from './PaginatedScheduleList'; +export * from './PaginatedScopeMappingList'; +export * from './PaginatedServiceConnectionList'; +export * from './PaginatedSourceList'; +export * from './PaginatedSourceStageList'; +export * from './PaginatedStageList'; +export * from './PaginatedStaticDeviceList'; +export * from './PaginatedTOTPDeviceList'; +export * from './PaginatedTaskList'; +export * from './PaginatedTelegramSourceList'; +export * from './PaginatedTelegramSourcePropertyMappingList'; +export * from './PaginatedTenantList'; +export * from './PaginatedTokenList'; +export * from './PaginatedTokenModelList'; +export * from './PaginatedUniquePasswordPolicyList'; +export * from './PaginatedUserConsentList'; +export * from './PaginatedUserDeleteStageList'; +export * from './PaginatedUserKerberosSourceConnectionList'; +export * from './PaginatedUserLDAPSourceConnectionList'; +export * from './PaginatedUserList'; +export * from './PaginatedUserLoginStageList'; +export * from './PaginatedUserLogoutStageList'; +export * from './PaginatedUserOAuthSourceConnectionList'; +export * from './PaginatedUserPlexSourceConnectionList'; +export * from './PaginatedUserSAMLSourceConnectionList'; +export * from './PaginatedUserSourceConnectionList'; +export * from './PaginatedUserTelegramSourceConnectionList'; +export * from './PaginatedUserWriteStageList'; +export * from './PaginatedWSFederationProviderList'; +export * from './PaginatedWebAuthnDeviceList'; +export * from './PaginatedWebAuthnDeviceTypeList'; +export * from './Pagination'; +export * from './PartialGroup'; +export * from './PartialUser'; +export * from './PasswordChallenge'; +export * from './PasswordChallengeResponseRequest'; +export * from './PasswordExpiryPolicy'; +export * from './PasswordExpiryPolicyRequest'; +export * from './PasswordPolicy'; +export * from './PasswordPolicyRequest'; +export * from './PasswordStage'; +export * from './PasswordStageRequest'; +export * from './PatchedAgentConnectorRequest'; +export * from './PatchedApplicationEntitlementRequest'; +export * from './PatchedApplicationRequest'; +export * from './PatchedAuthenticatorDuoStageRequest'; +export * from './PatchedAuthenticatorEmailStageRequest'; +export * from './PatchedAuthenticatorEndpointGDTCStageRequest'; +export * from './PatchedAuthenticatorSMSStageRequest'; +export * from './PatchedAuthenticatorStaticStageRequest'; +export * from './PatchedAuthenticatorTOTPStageRequest'; +export * from './PatchedAuthenticatorValidateStageRequest'; +export * from './PatchedAuthenticatorWebAuthnStageRequest'; +export * from './PatchedBlueprintInstanceRequest'; +export * from './PatchedBrandRequest'; +export * from './PatchedCaptchaStageRequest'; +export * from './PatchedCertificateKeyPairRequest'; +export * from './PatchedConnectionTokenRequest'; +export * from './PatchedConsentStageRequest'; +export * from './PatchedDenyStageRequest'; +export * from './PatchedDeviceAccessGroupRequest'; +export * from './PatchedDeviceUserBindingRequest'; +export * from './PatchedDockerServiceConnectionRequest'; +export * from './PatchedDomainRequest'; +export * from './PatchedDummyPolicyRequest'; +export * from './PatchedDummyStageRequest'; +export * from './PatchedDuoDeviceRequest'; +export * from './PatchedEmailDeviceRequest'; +export * from './PatchedEmailStageRequest'; +export * from './PatchedEndpointDeviceRequest'; +export * from './PatchedEndpointRequest'; +export * from './PatchedEndpointStageRequest'; +export * from './PatchedEnrollmentTokenRequest'; +export * from './PatchedEventMatcherPolicyRequest'; +export * from './PatchedEventRequest'; +export * from './PatchedExpressionPolicyRequest'; +export * from './PatchedFleetConnectorRequest'; +export * from './PatchedFlowRequest'; +export * from './PatchedFlowStageBindingRequest'; +export * from './PatchedGeoIPPolicyRequest'; +export * from './PatchedGoogleChromeConnectorRequest'; +export * from './PatchedGoogleEndpointDeviceRequest'; +export * from './PatchedGoogleWorkspaceProviderMappingRequest'; +export * from './PatchedGoogleWorkspaceProviderRequest'; +export * from './PatchedGroupKerberosSourceConnectionRequest'; +export * from './PatchedGroupLDAPSourceConnectionRequest'; +export * from './PatchedGroupOAuthSourceConnectionRequest'; +export * from './PatchedGroupPlexSourceConnectionRequest'; +export * from './PatchedGroupRequest'; +export * from './PatchedGroupSAMLSourceConnectionRequest'; +export * from './PatchedGroupSourceConnectionRequest'; +export * from './PatchedGroupTelegramSourceConnectionRequest'; +export * from './PatchedIdentificationStageRequest'; +export * from './PatchedInitialPermissionsRequest'; +export * from './PatchedInvitationRequest'; +export * from './PatchedInvitationStageRequest'; +export * from './PatchedKerberosSourcePropertyMappingRequest'; +export * from './PatchedKerberosSourceRequest'; +export * from './PatchedKubernetesServiceConnectionRequest'; +export * from './PatchedLDAPProviderRequest'; +export * from './PatchedLDAPSourcePropertyMappingRequest'; +export * from './PatchedLDAPSourceRequest'; +export * from './PatchedLicenseRequest'; +export * from './PatchedLifecycleRuleRequest'; +export * from './PatchedMicrosoftEntraProviderMappingRequest'; +export * from './PatchedMicrosoftEntraProviderRequest'; +export * from './PatchedMutualTLSStageRequest'; +export * from './PatchedNotificationRequest'; +export * from './PatchedNotificationRuleRequest'; +export * from './PatchedNotificationTransportRequest'; +export * from './PatchedNotificationWebhookMappingRequest'; +export * from './PatchedOAuth2ProviderRequest'; +export * from './PatchedOAuthSourcePropertyMappingRequest'; +export * from './PatchedOAuthSourceRequest'; +export * from './PatchedOutpostRequest'; +export * from './PatchedPasswordExpiryPolicyRequest'; +export * from './PatchedPasswordPolicyRequest'; +export * from './PatchedPasswordStageRequest'; +export * from './PatchedPermissionAssignRequest'; +export * from './PatchedPlexSourcePropertyMappingRequest'; +export * from './PatchedPlexSourceRequest'; +export * from './PatchedPolicyBindingRequest'; +export * from './PatchedPromptRequest'; +export * from './PatchedPromptStageRequest'; +export * from './PatchedProxyProviderRequest'; +export * from './PatchedRACPropertyMappingRequest'; +export * from './PatchedRACProviderRequest'; +export * from './PatchedRadiusProviderPropertyMappingRequest'; +export * from './PatchedRadiusProviderRequest'; +export * from './PatchedRedirectStageRequest'; +export * from './PatchedReputationPolicyRequest'; +export * from './PatchedRoleRequest'; +export * from './PatchedSAMLPropertyMappingRequest'; +export * from './PatchedSAMLProviderRequest'; +export * from './PatchedSAMLSourcePropertyMappingRequest'; +export * from './PatchedSAMLSourceRequest'; +export * from './PatchedSCIMMappingRequest'; +export * from './PatchedSCIMProviderRequest'; +export * from './PatchedSCIMSourceGroupRequest'; +export * from './PatchedSCIMSourcePropertyMappingRequest'; +export * from './PatchedSCIMSourceRequest'; +export * from './PatchedSCIMSourceUserRequest'; +export * from './PatchedSMSDeviceRequest'; +export * from './PatchedSSFProviderRequest'; +export * from './PatchedScheduleRequest'; +export * from './PatchedScopeMappingRequest'; +export * from './PatchedSettingsRequest'; +export * from './PatchedSettingsRequestFlags'; +export * from './PatchedSourceStageRequest'; +export * from './PatchedStaticDeviceRequest'; +export * from './PatchedTOTPDeviceRequest'; +export * from './PatchedTelegramSourcePropertyMappingRequest'; +export * from './PatchedTelegramSourceRequest'; +export * from './PatchedTenantRequest'; +export * from './PatchedTokenRequest'; +export * from './PatchedUniquePasswordPolicyRequest'; +export * from './PatchedUserDeleteStageRequest'; +export * from './PatchedUserKerberosSourceConnectionRequest'; +export * from './PatchedUserLDAPSourceConnectionRequest'; +export * from './PatchedUserLoginStageRequest'; +export * from './PatchedUserLogoutStageRequest'; +export * from './PatchedUserOAuthSourceConnectionRequest'; +export * from './PatchedUserPlexSourceConnectionRequest'; +export * from './PatchedUserRequest'; +export * from './PatchedUserSAMLSourceConnectionRequest'; +export * from './PatchedUserSourceConnectionRequest'; +export * from './PatchedUserTelegramSourceConnectionRequest'; +export * from './PatchedUserWriteStageRequest'; +export * from './PatchedWSFederationProviderRequest'; +export * from './PatchedWebAuthnDeviceRequest'; +export * from './Permission'; +export * from './PermissionAssignRequest'; +export * from './PermissionAssignResult'; +export * from './PlexAuthenticationChallenge'; +export * from './PlexAuthenticationChallengeResponseRequest'; +export * from './PlexSource'; +export * from './PlexSourcePropertyMapping'; +export * from './PlexSourcePropertyMappingRequest'; +export * from './PlexSourceRequest'; +export * from './PlexTokenRedeemRequest'; +export * from './Policy'; +export * from './PolicyBinding'; +export * from './PolicyBindingRequest'; +export * from './PolicyEngineMode'; +export * from './PolicyTestRequest'; +export * from './PolicyTestResult'; +export * from './Process'; +export * from './ProcessRequest'; +export * from './Prompt'; +export * from './PromptChallenge'; +export * from './PromptChallengeResponseRequest'; +export * from './PromptChoice'; +export * from './PromptRequest'; +export * from './PromptStage'; +export * from './PromptStageRequest'; +export * from './PromptTypeEnum'; +export * from './PropertyMapping'; +export * from './PropertyMappingPreview'; +export * from './PropertyMappingTestRequest'; +export * from './PropertyMappingTestResult'; +export * from './ProtocolEnum'; +export * from './Provider'; +export * from './ProviderEnum'; +export * from './ProviderModelEnum'; +export * from './ProviderTypeEnum'; +export * from './ProxyMode'; +export * from './ProxyOutpostConfig'; +export * from './ProxyProvider'; +export * from './ProxyProviderRequest'; +export * from './RACPropertyMapping'; +export * from './RACPropertyMappingRequest'; +export * from './RACProvider'; +export * from './RACProviderRequest'; +export * from './RadiusCheckAccess'; +export * from './RadiusOutpostConfig'; +export * from './RadiusProvider'; +export * from './RadiusProviderPropertyMapping'; +export * from './RadiusProviderPropertyMappingRequest'; +export * from './RadiusProviderRequest'; +export * from './RedirectChallenge'; +export * from './RedirectChallengeResponseRequest'; +export * from './RedirectStage'; +export * from './RedirectStageModeEnum'; +export * from './RedirectStageRequest'; +export * from './RedirectURI'; +export * from './RedirectURIRequest'; +export * from './RelatedGroup'; +export * from './Reputation'; +export * from './ReputationPolicy'; +export * from './ReputationPolicyRequest'; +export * from './Review'; +export * from './ReviewRequest'; +export * from './ReviewerGroup'; +export * from './ReviewerUser'; +export * from './Role'; +export * from './RoleAssignedObjectPermission'; +export * from './RoleModelPermission'; +export * from './RoleObjectPermission'; +export * from './RoleRequest'; +export * from './SAMLBindingsEnum'; +export * from './SAMLLogoutMethods'; +export * from './SAMLMetadata'; +export * from './SAMLNameIDPolicyEnum'; +export * from './SAMLPropertyMapping'; +export * from './SAMLPropertyMappingRequest'; +export * from './SAMLProvider'; +export * from './SAMLProviderRequest'; +export * from './SAMLSource'; +export * from './SAMLSourcePropertyMapping'; +export * from './SAMLSourcePropertyMappingRequest'; +export * from './SAMLSourceRequest'; +export * from './SCIMAuthenticationModeEnum'; +export * from './SCIMMapping'; +export * from './SCIMMappingRequest'; +export * from './SCIMProvider'; +export * from './SCIMProviderGroup'; +export * from './SCIMProviderGroupRequest'; +export * from './SCIMProviderRequest'; +export * from './SCIMProviderUser'; +export * from './SCIMProviderUserRequest'; +export * from './SCIMSource'; +export * from './SCIMSourceGroup'; +export * from './SCIMSourceGroupRequest'; +export * from './SCIMSourcePropertyMapping'; +export * from './SCIMSourcePropertyMappingRequest'; +export * from './SCIMSourceRequest'; +export * from './SCIMSourceUser'; +export * from './SCIMSourceUserRequest'; +export * from './SMSDevice'; +export * from './SMSDeviceRequest'; +export * from './SSFProvider'; +export * from './SSFProviderRequest'; +export * from './SSFStream'; +export * from './Schedule'; +export * from './ScheduleRequest'; +export * from './ScopeMapping'; +export * from './ScopeMappingRequest'; +export * from './SelectableStage'; +export * from './ServiceConnection'; +export * from './ServiceConnectionState'; +export * from './SessionEndChallenge'; +export * from './SessionUser'; +export * from './Settings'; +export * from './SettingsRequest'; +export * from './SeverityEnum'; +export * from './ShellChallenge'; +export * from './SignatureAlgorithmEnum'; +export * from './Software'; +export * from './SoftwareRequest'; +export * from './Source'; +export * from './SourceStage'; +export * from './SourceStageRequest'; +export * from './SourceType'; +export * from './Stage'; +export * from './StageModeEnum'; +export * from './StagePrompt'; +export * from './StaticDevice'; +export * from './StaticDeviceRequest'; +export * from './StaticDeviceToken'; +export * from './SubModeEnum'; +export * from './SyncObjectModelEnum'; +export * from './SyncObjectRequest'; +export * from './SyncObjectResult'; +export * from './SyncOutgoingTriggerModeEnum'; +export * from './SyncStatus'; +export * from './SystemInfo'; +export * from './SystemInfoRuntime'; +export * from './TOTPDevice'; +export * from './TOTPDeviceRequest'; +export * from './Task'; +export * from './TaskAggregatedStatusEnum'; +export * from './TaskStateEnum'; +export * from './TelegramAuthRequest'; +export * from './TelegramChallengeResponseRequest'; +export * from './TelegramLoginChallenge'; +export * from './TelegramSource'; +export * from './TelegramSourcePropertyMapping'; +export * from './TelegramSourcePropertyMappingRequest'; +export * from './TelegramSourceRequest'; +export * from './Tenant'; +export * from './TenantAdminGroupRequestRequest'; +export * from './TenantRecoveryKeyRequestRequest'; +export * from './TenantRecoveryKeyResponse'; +export * from './TenantRequest'; +export * from './ThemedUrls'; +export * from './Token'; +export * from './TokenModel'; +export * from './TokenRequest'; +export * from './TokenSetKeyRequest'; +export * from './TokenView'; +export * from './TransactionApplicationRequest'; +export * from './TransactionApplicationResponse'; +export * from './TransactionPolicyBindingRequest'; +export * from './TypeCreate'; +export * from './UiThemeEnum'; +export * from './UniquePasswordPolicy'; +export * from './UniquePasswordPolicyRequest'; +export * from './UsedBy'; +export * from './UsedByActionEnum'; +export * from './User'; +export * from './UserAccountRequest'; +export * from './UserAccountSerializerForRoleRequest'; +export * from './UserAttributeEnum'; +export * from './UserConsent'; +export * from './UserCreationModeEnum'; +export * from './UserDeleteStage'; +export * from './UserDeleteStageRequest'; +export * from './UserFieldsEnum'; +export * from './UserKerberosSourceConnection'; +export * from './UserKerberosSourceConnectionRequest'; +export * from './UserLDAPSourceConnection'; +export * from './UserLDAPSourceConnectionRequest'; +export * from './UserLoginChallenge'; +export * from './UserLoginChallengeResponseRequest'; +export * from './UserLoginStage'; +export * from './UserLoginStageRequest'; +export * from './UserLogoutStage'; +export * from './UserLogoutStageRequest'; +export * from './UserMatchingModeEnum'; +export * from './UserOAuthSourceConnection'; +export * from './UserOAuthSourceConnectionRequest'; +export * from './UserPasswordSetRequest'; +export * from './UserPath'; +export * from './UserPlexSourceConnection'; +export * from './UserPlexSourceConnectionRequest'; +export * from './UserRecoveryEmailRequest'; +export * from './UserRecoveryLinkRequest'; +export * from './UserRequest'; +export * from './UserSAMLSourceConnection'; +export * from './UserSAMLSourceConnectionRequest'; +export * from './UserSelf'; +export * from './UserSelfGroups'; +export * from './UserSelfRoles'; +export * from './UserServiceAccountRequest'; +export * from './UserServiceAccountResponse'; +export * from './UserSetting'; +export * from './UserSourceConnection'; +export * from './UserSourceConnectionRequest'; +export * from './UserTelegramSourceConnection'; +export * from './UserTelegramSourceConnectionRequest'; +export * from './UserTypeEnum'; +export * from './UserVerificationEnum'; +export * from './UserWriteStage'; +export * from './UserWriteStageRequest'; +export * from './ValidationError'; +export * from './VendorEnum'; +export * from './Version'; +export * from './VersionHistory'; +export * from './WSFederationProvider'; +export * from './WSFederationProviderRequest'; +export * from './WebAuthnDevice'; +export * from './WebAuthnDeviceRequest'; +export * from './WebAuthnDeviceType'; +export * from './WebAuthnHintEnum'; +export * from './Worker'; diff --git a/packages/client-ts/src/runtime.ts b/packages/client-ts/src/runtime.ts new file mode 100644 index 0000000000..d7efdac7f4 --- /dev/null +++ b/packages/client-ts/src/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * Contact: hello@goauthentik.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "/api/v3".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/scripts/api/ts-templates/tsconfig.esm.mustache b/packages/client-ts/templates/tsconfig.esm.mustache similarity index 100% rename from scripts/api/ts-templates/tsconfig.esm.mustache rename to packages/client-ts/templates/tsconfig.esm.mustache diff --git a/scripts/api/ts-templates/tsconfig.mustache b/packages/client-ts/templates/tsconfig.mustache similarity index 100% rename from scripts/api/ts-templates/tsconfig.mustache rename to packages/client-ts/templates/tsconfig.mustache diff --git a/packages/client-ts/tsconfig.esm.json b/packages/client-ts/tsconfig.esm.json new file mode 100644 index 0000000000..2171201ff8 --- /dev/null +++ b/packages/client-ts/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist/esm", + }, +} diff --git a/packages/client-ts/tsconfig.json b/packages/client-ts/tsconfig.json new file mode 100644 index 0000000000..1226648c81 --- /dev/null +++ b/packages/client-ts/tsconfig.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "composite": true, + "isolatedModules": true, + "incremental": true, + "baseUrl": ".", + "rootDir": "src", + "strict": true, + "newLine": "lf", + "target": "ESNext", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "outDir": "dist", + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + }, + "exclude": ["node_modules", "./out/**/*", "./dist/**/*"], +} diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index cdbe830be9..9e4ed71603 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -41,7 +41,7 @@ export const DefaultIgnorePatterns = [ "**/storybook-static", "**/locale-codes.ts", "**/src/locales", - "**/gen-ts-api", + "packages/client-ts", ]; /** diff --git a/scripts/api/compose.yml b/scripts/api/compose.yml deleted file mode 100644 index f277cb9b65..0000000000 --- a/scripts/api/compose.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -services: - diff: - image: docker.io/openapitools/openapi-diff:2.1.7 - restart: never - network_mode: none - volumes: - - ../../:/local - - gen: - image: docker.io/openapitools/openapi-generator-cli:v7.20.0 - restart: never - network_mode: none - volumes: - - ../../:/local diff --git a/scripts/api/ts-templates/README.mustache b/scripts/api/ts-templates/README.mustache deleted file mode 100644 index a82e58e36d..0000000000 --- a/scripts/api/ts-templates/README.mustache +++ /dev/null @@ -1,38 +0,0 @@ -## @goauthentik/api - -This package provides a generated API Client for [authentik](https://goauthentik.io?utm_source=npm-api-package). - -### Building - -See https://docs.goauthentik.io/docs/developer-docs/api/making-schema-changes#building-the-web-client - -### Consuming - -``` -npm install @goauthentik/api --save -``` - -Create a configuration: - -```typescript -import { Configuration } from "@goauthentik/api"; - -export const DEFAULT_CONFIG = new Configuration({ - // Configure where the API is located - // Can be a full host, ensure CORS is configured - basePath: "", - // Required for POST/PUT/DELETE requests - // getCookie function must return the cookie's contents - headers: { - "X-authentik-CSRF": getCookie("authentik_csrf"), - }, -}); -``` - -Then use the API: - -```typescript -import { CoreApi } from "@goauthentik/api"; - -const user = await new CoreApi(DEFAULT_CONFIG).coreUsersMeRetrieve(); -``` diff --git a/scripts/test_docker.sh b/scripts/test_docker.sh index dfd7f527cb..f8f96e372a 100755 --- a/scripts/test_docker.sh +++ b/scripts/test_docker.sh @@ -20,7 +20,6 @@ if [[ -v BUILD ]]; then # Ensure buildx is installed docker buildx install - make gen-client-ts touch lifecycle/container/.env docker build -t "${AUTHENTIK_IMAGE}:${AUTHENTIK_TAG}" -f lifecycle/container/Dockerfile . diff --git a/web/package-lock.json b/web/package-lock.json index 0b1e82e08a..e2c7ef3dbb 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -23,7 +23,7 @@ "@floating-ui/dom": "^1.7.6", "@formatjs/intl-listformat": "^8.3.1", "@fortawesome/fontawesome-free": "^7.2.0", - "@goauthentik/api": "^2026.2.0-rc1-1770744803", + "@goauthentik/api": "0.0.0", "@goauthentik/core": "^1.0.0", "@goauthentik/esbuild-plugin-live-reload": "^2.0.0", "@goauthentik/eslint-config": "^1.3.0", @@ -1358,9 +1358,8 @@ } }, "node_modules/@goauthentik/api": { - "version": "2026.2.0-rc4-1771862880", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-2026.2.0-rc4-1771862880.tgz", - "integrity": "sha512-w2wxgePjhT8rJ9MIJlSlyfasnvsNxBAElwAPnY1cerPnXEgapcccbG5/Nf3fVukpowA9m0jJRFMp5U2rOporIQ==" + "resolved": "packages/client-ts", + "link": true }, "node_modules/@goauthentik/core": { "resolved": "packages/core", @@ -18440,6 +18439,13 @@ "url": "https://github.com/sponsors/wooorm" } }, + "packages/client-ts": { + "name": "@goauthentik/api", + "version": "0.0.0", + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } + }, "packages/core": { "name": "@goauthentik/core", "version": "1.0.0", @@ -18485,7 +18491,7 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "@goauthentik/api": "^2026.2.0-rc1-1770333267", + "@goauthentik/api": "0.0.0", "@goauthentik/core": "^1.0.0", "@rollup/plugin-commonjs": "^29.0.2", "@rollup/plugin-node-resolve": "^16.0.3", diff --git a/web/package.json b/web/package.json index 17abc35c85..25b4e318b0 100644 --- a/web/package.json +++ b/web/package.json @@ -98,7 +98,7 @@ "@floating-ui/dom": "^1.7.6", "@formatjs/intl-listformat": "^8.3.1", "@fortawesome/fontawesome-free": "^7.2.0", - "@goauthentik/api": "^2026.2.0-rc1-1770744803", + "@goauthentik/api": "0.0.0", "@goauthentik/core": "^1.0.0", "@goauthentik/esbuild-plugin-live-reload": "^2.0.0", "@goauthentik/eslint-config": "^1.3.0", diff --git a/web/packages/client-ts b/web/packages/client-ts new file mode 120000 index 0000000000..2a947d2b6b --- /dev/null +++ b/web/packages/client-ts @@ -0,0 +1 @@ +../../packages/client-ts \ No newline at end of file diff --git a/web/packages/sfe/package.json b/web/packages/sfe/package.json index 4398048bfb..a508ddb5da 100644 --- a/web/packages/sfe/package.json +++ b/web/packages/sfe/package.json @@ -14,7 +14,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@goauthentik/api": "^2026.2.0-rc1-1770333267", + "@goauthentik/api": "0.0.0", "@goauthentik/core": "^1.0.0", "@rollup/plugin-commonjs": "^29.0.2", "@rollup/plugin-node-resolve": "^16.0.3", diff --git a/website/api/clients/node.md b/website/api/clients/node.md index 69e448267c..e70d9c1838 100644 --- a/website/api/clients/node.md +++ b/website/api/clients/node.md @@ -25,9 +25,3 @@ const status = await new AdminApi(DEFAULT_CONFIG).adminSystemRetrieve(); ## Building the Node.js Client The web client is used by the web-interface and web-FlowExecutor to communicate with authentik. To build the client, run `make gen-client-ts`. - -Since the client is normally distributed as an npm package, running `make gen-client-ts` will overwrite the locally installed client with the newly built one. - -:::caution -Running `npm i` in the `/web` folder after using `make gen-client-ts` will overwrite the custom client and revert to the upstream client. -:::